certificate.proto 6.5 KB

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