certificate.proto 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. // Copyright 2020 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.appengine.v1;
  16. import "google/protobuf/timestamp.proto";
  17. option csharp_namespace = "Google.Cloud.AppEngine.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "CertificateProto";
  21. option java_package = "com.google.appengine.v1";
  22. option php_namespace = "Google\\Cloud\\AppEngine\\V1";
  23. option ruby_package = "Google::Cloud::AppEngine::V1";
  24. // An SSL certificate that a user has been authorized to administer. A user
  25. // is authorized to administer any certificate that applies to one of their
  26. // authorized domains.
  27. message AuthorizedCertificate {
  28. // Full path to the `AuthorizedCertificate` resource in the API. Example:
  29. // `apps/myapp/authorizedCertificates/12345`.
  30. //
  31. // @OutputOnly
  32. string name = 1;
  33. // Relative name of the certificate. This is a unique value autogenerated
  34. // on `AuthorizedCertificate` resource creation. Example: `12345`.
  35. //
  36. // @OutputOnly
  37. string id = 2;
  38. // The user-specified display name of the certificate. This is not
  39. // guaranteed to be unique. Example: `My Certificate`.
  40. string display_name = 3;
  41. // Topmost applicable domains of this certificate. This certificate
  42. // applies to these domains and their subdomains. Example: `example.com`.
  43. //
  44. // @OutputOnly
  45. repeated string domain_names = 4;
  46. // The time when this certificate expires. To update the renewal time on this
  47. // certificate, upload an SSL certificate with a different expiration time
  48. // using [`AuthorizedCertificates.UpdateAuthorizedCertificate`]().
  49. //
  50. // @OutputOnly
  51. google.protobuf.Timestamp expire_time = 5;
  52. // The SSL certificate serving the `AuthorizedCertificate` resource. This
  53. // must be obtained independently from a certificate authority.
  54. CertificateRawData certificate_raw_data = 6;
  55. // Only applicable if this certificate is managed by App Engine. Managed
  56. // certificates are tied to the lifecycle of a `DomainMapping` and cannot be
  57. // updated or deleted via the `AuthorizedCertificates` API. If this
  58. // certificate is manually administered by the user, this field will be empty.
  59. //
  60. // @OutputOnly
  61. ManagedCertificate managed_certificate = 7;
  62. // The full paths to user visible Domain Mapping resources that have this
  63. // certificate mapped. Example: `apps/myapp/domainMappings/example.com`.
  64. //
  65. // This may not represent the full list of mapped domain mappings if the user
  66. // does not have `VIEWER` permissions on all of the applications that have
  67. // this certificate mapped. See `domain_mappings_count` for a complete count.
  68. //
  69. // Only returned by `GET` or `LIST` requests when specifically requested by
  70. // the `view=FULL_CERTIFICATE` option.
  71. //
  72. // @OutputOnly
  73. repeated string visible_domain_mappings = 8;
  74. // Aggregate count of the domain mappings with this certificate mapped. This
  75. // count includes domain mappings on applications for which the user does not
  76. // have `VIEWER` permissions.
  77. //
  78. // Only returned by `GET` or `LIST` requests when specifically requested by
  79. // the `view=FULL_CERTIFICATE` option.
  80. //
  81. // @OutputOnly
  82. int32 domain_mappings_count = 9;
  83. }
  84. // An SSL certificate obtained from a certificate authority.
  85. message CertificateRawData {
  86. // PEM encoded x.509 public key certificate. This field is set once on
  87. // certificate creation. Must include the header and footer. Example:
  88. // <pre>
  89. // -----BEGIN CERTIFICATE-----
  90. // <certificate_value>
  91. // -----END CERTIFICATE-----
  92. // </pre>
  93. string public_certificate = 1;
  94. // Unencrypted PEM encoded RSA private key. This field is set once on
  95. // certificate creation and then encrypted. The key size must be 2048
  96. // bits or fewer. Must include the header and footer. Example:
  97. // <pre>
  98. // -----BEGIN RSA PRIVATE KEY-----
  99. // <unencrypted_key_value>
  100. // -----END RSA PRIVATE KEY-----
  101. // </pre>
  102. // @InputOnly
  103. string private_key = 2;
  104. }
  105. // State of certificate management. Refers to the most recent certificate
  106. // acquisition or renewal attempt.
  107. enum ManagementStatus {
  108. MANAGEMENT_STATUS_UNSPECIFIED = 0;
  109. // Certificate was successfully obtained and inserted into the serving
  110. // system.
  111. OK = 1;
  112. // Certificate is under active attempts to acquire or renew.
  113. PENDING = 2;
  114. // Most recent renewal failed due to an invalid DNS setup and will be
  115. // retried. Renewal attempts will continue to fail until the certificate
  116. // domain's DNS configuration is fixed. The last successfully provisioned
  117. // certificate may still be serving.
  118. FAILED_RETRYING_NOT_VISIBLE = 4;
  119. // All renewal attempts have been exhausted, likely due to an invalid DNS
  120. // setup.
  121. FAILED_PERMANENT = 6;
  122. // Most recent renewal failed due to an explicit CAA record that does not
  123. // include one of the in-use CAs (Google CA and Let's Encrypt). Renewals will
  124. // continue to fail until the CAA is reconfigured. The last successfully
  125. // provisioned certificate may still be serving.
  126. FAILED_RETRYING_CAA_FORBIDDEN = 7;
  127. // Most recent renewal failed due to a CAA retrieval failure. This means that
  128. // the domain's DNS provider does not properly handle CAA records, failing
  129. // requests for CAA records when no CAA records are defined. Renewals will
  130. // continue to fail until the DNS provider is changed or a CAA record is
  131. // added for the given domain. The last successfully provisioned certificate
  132. // may still be serving.
  133. FAILED_RETRYING_CAA_CHECKING = 8;
  134. }
  135. // A certificate managed by App Engine.
  136. message ManagedCertificate {
  137. // Time at which the certificate was last renewed. The renewal process is
  138. // fully managed. Certificate renewal will automatically occur before the
  139. // certificate expires. Renewal errors can be tracked via `ManagementStatus`.
  140. //
  141. // @OutputOnly
  142. google.protobuf.Timestamp last_renewal_time = 1;
  143. // Status of certificate management. Refers to the most recent certificate
  144. // acquisition or renewal attempt.
  145. //
  146. // @OutputOnly
  147. ManagementStatus status = 2;
  148. }