resources.proto 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. // Copyright 2022 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.cloud.security.privateca.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/duration.proto";
  19. import "google/protobuf/timestamp.proto";
  20. import "google/type/expr.proto";
  21. option cc_enable_arenas = true;
  22. option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/cloud/security/privateca/v1;privateca";
  24. option java_multiple_files = true;
  25. option java_outer_classname = "PrivateCaResourcesProto";
  26. option java_package = "com.google.cloud.security.privateca.v1";
  27. option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1";
  28. option ruby_package = "Google::Cloud::Security::PrivateCA::V1";
  29. // A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] represents an individual Certificate Authority.
  30. // A [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] can be used to create [Certificates][google.cloud.security.privateca.v1.Certificate].
  31. message CertificateAuthority {
  32. option (google.api.resource) = {
  33. type: "privateca.googleapis.com/CertificateAuthority"
  34. pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}"
  35. };
  36. // The type of a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], indicating its issuing chain.
  37. enum Type {
  38. // Not specified.
  39. TYPE_UNSPECIFIED = 0;
  40. // Self-signed CA.
  41. SELF_SIGNED = 1;
  42. // Subordinate CA. Could be issued by a Private CA [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  43. // or an unmanaged CA.
  44. SUBORDINATE = 2;
  45. }
  46. // The state of a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], indicating if it can be used.
  47. enum State {
  48. // Not specified.
  49. STATE_UNSPECIFIED = 0;
  50. // Certificates can be issued from this CA. CRLs will be generated for this
  51. // CA. The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will be
  52. // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool].
  53. ENABLED = 1;
  54. // Certificates cannot be issued from this CA. CRLs will still be generated.
  55. // The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but will not be
  56. // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool].
  57. DISABLED = 2;
  58. // Certificates can be issued from this CA. CRLs will be generated for this
  59. // CA. The CA will be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but will not
  60. // be used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool].
  61. STAGED = 3;
  62. // Certificates cannot be issued from this CA. CRLs will not be generated.
  63. // The CA will not be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will not be
  64. // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool].
  65. AWAITING_USER_ACTIVATION = 4;
  66. // Certificates cannot be issued from this CA. CRLs will not be generated.
  67. // The CA may still be recovered by calling
  68. // [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority] before
  69. // [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time].
  70. // The CA will not be part of the [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and will not be
  71. // used to issue certificates from the [CaPool][google.cloud.security.privateca.v1.CaPool].
  72. DELETED = 5;
  73. }
  74. // URLs where a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will publish content.
  75. message AccessUrls {
  76. // The URL where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate is
  77. // published. This will only be set for CAs that have been activated.
  78. string ca_certificate_access_url = 1;
  79. // The URLs where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRLs are published. This
  80. // will only be set for CAs that have been activated.
  81. repeated string crl_access_urls = 2;
  82. }
  83. // A Cloud KMS key configuration that a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will use.
  84. message KeyVersionSpec {
  85. oneof KeyVersion {
  86. // The resource name for an existing Cloud KMS CryptoKeyVersion in the
  87. // format
  88. // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
  89. // This option enables full flexibility in the key's capabilities and
  90. // properties.
  91. string cloud_kms_key_version = 1;
  92. // The algorithm to use for creating a managed Cloud KMS key for a for a
  93. // simplified experience. All managed keys will be have their
  94. // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
  95. SignHashAlgorithm algorithm = 2;
  96. }
  97. }
  98. // The algorithm of a Cloud KMS CryptoKeyVersion of a
  99. // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
  100. // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
  101. // `ASYMMETRIC_SIGN`. These values correspond to the
  102. // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
  103. // values. For RSA signing algorithms, the PSS algorithms should be preferred,
  104. // use PKCS1 algorithms if required for compatibility. For further
  105. // recommendations, see
  106. // https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations.
  107. enum SignHashAlgorithm {
  108. // Not specified.
  109. SIGN_HASH_ALGORITHM_UNSPECIFIED = 0;
  110. // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
  111. RSA_PSS_2048_SHA256 = 1;
  112. // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
  113. RSA_PSS_3072_SHA256 = 2;
  114. // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
  115. RSA_PSS_4096_SHA256 = 3;
  116. // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
  117. RSA_PKCS1_2048_SHA256 = 6;
  118. // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
  119. RSA_PKCS1_3072_SHA256 = 7;
  120. // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
  121. RSA_PKCS1_4096_SHA256 = 8;
  122. // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
  123. EC_P256_SHA256 = 4;
  124. // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
  125. EC_P384_SHA384 = 5;
  126. }
  127. // Output only. The resource name for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the
  128. // format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
  129. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  130. // Required. Immutable. The [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  131. Type type = 2 [
  132. (google.api.field_behavior) = REQUIRED,
  133. (google.api.field_behavior) = IMMUTABLE
  134. ];
  135. // Required. Immutable. The config used to create a self-signed X.509 certificate or CSR.
  136. CertificateConfig config = 3 [
  137. (google.api.field_behavior) = REQUIRED,
  138. (google.api.field_behavior) = IMMUTABLE
  139. ];
  140. // Required. Immutable. The desired lifetime of the CA certificate. Used to create the
  141. // "not_before_time" and "not_after_time" fields inside an X.509
  142. // certificate.
  143. google.protobuf.Duration lifetime = 4 [
  144. (google.api.field_behavior) = REQUIRED,
  145. (google.api.field_behavior) = IMMUTABLE
  146. ];
  147. // Required. Immutable. Used when issuing certificates for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. If this
  148. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] is a self-signed CertificateAuthority, this key
  149. // is also used to sign the self-signed CA certificate. Otherwise, it
  150. // is used to sign a CSR.
  151. KeyVersionSpec key_spec = 5 [
  152. (google.api.field_behavior) = REQUIRED,
  153. (google.api.field_behavior) = IMMUTABLE
  154. ];
  155. // Optional. If this is a subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], this field will be set
  156. // with the subordinate configuration, which describes its issuers. This may
  157. // be updated, but this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] must continue to validate.
  158. SubordinateConfig subordinate_config = 6 [(google.api.field_behavior) = OPTIONAL];
  159. // Output only. The [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
  160. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  161. CaPool.Tier tier = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  162. // Output only. The [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  163. State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  164. // Output only. This [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate chain, including the current
  165. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate. Ordered such that the root issuer
  166. // is the final element (consistent with RFC 5246). For a self-signed CA, this
  167. // will only list the current [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s certificate.
  168. repeated string pem_ca_certificates = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  169. // Output only. A structured description of this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate
  170. // and its issuers. Ordered as self-to-root.
  171. repeated CertificateDescription ca_certificate_descriptions = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  172. // Immutable. The name of a Cloud Storage bucket where this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will
  173. // publish content, such as the CA certificate and CRLs. This must be a bucket
  174. // name, without any prefixes (such as `gs://`) or suffixes (such as
  175. // `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
  176. // would simply specify `my-bucket`. If not specified, a managed bucket will
  177. // be created.
  178. string gcs_bucket = 11 [(google.api.field_behavior) = IMMUTABLE];
  179. // Output only. URLs for accessing content published by this CA, such as the CA certificate
  180. // and CRLs.
  181. AccessUrls access_urls = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  182. // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was created.
  183. google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  184. // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was last updated.
  185. google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  186. // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] was soft deleted, if
  187. // it is in the [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED] state.
  188. google.protobuf.Timestamp delete_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
  189. // Output only. The time at which this [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] will be permanently purged,
  190. // if it is in the [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED] state.
  191. google.protobuf.Timestamp expire_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  192. // Optional. Labels with user-defined metadata.
  193. map<string, string> labels = 17 [(google.api.field_behavior) = OPTIONAL];
  194. }
  195. // A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
  196. // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority] that form a trust anchor. A
  197. // [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage issuance policies for one or more
  198. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] resources and to rotate CA certificates in and out
  199. // of the trust anchor.
  200. message CaPool {
  201. option (google.api.resource) = {
  202. type: "privateca.googleapis.com/CaPool"
  203. pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}"
  204. };
  205. // The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool], indicating its supported functionality and/or
  206. // billing SKU.
  207. enum Tier {
  208. // Not specified.
  209. TIER_UNSPECIFIED = 0;
  210. // Enterprise tier.
  211. ENTERPRISE = 1;
  212. // DevOps tier.
  213. DEVOPS = 2;
  214. }
  215. // Options relating to the publication of each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA
  216. // certificate and CRLs and their inclusion as extensions in issued
  217. // [Certificates][google.cloud.security.privateca.v1.Certificate]. The options set here apply to certificates
  218. // issued by any [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the [CaPool][google.cloud.security.privateca.v1.CaPool].
  219. message PublishingOptions {
  220. // Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CA certificate and
  221. // includes its URL in the "Authority Information Access" X.509 extension
  222. // in all issued [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, the CA
  223. // certificate will not be published and the corresponding X.509 extension
  224. // will not be written in issued certificates.
  225. bool publish_ca_cert = 1 [(google.api.field_behavior) = OPTIONAL];
  226. // Optional. When true, publishes each [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s CRL and includes its
  227. // URL in the "CRL Distribution Points" X.509 extension in all issued
  228. // [Certificates][google.cloud.security.privateca.v1.Certificate]. If this is false, CRLs will not be published
  229. // and the corresponding X.509 extension will not be written in issued
  230. // certificates.
  231. // CRLs will expire 7 days from their creation. However, we will rebuild
  232. // daily. CRLs are also rebuilt shortly after a certificate is revoked.
  233. bool publish_crl = 2 [(google.api.field_behavior) = OPTIONAL];
  234. }
  235. // Defines controls over all certificate issuance within a [CaPool][google.cloud.security.privateca.v1.CaPool].
  236. message IssuancePolicy {
  237. // Describes a "type" of key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued
  238. // from a [CaPool][google.cloud.security.privateca.v1.CaPool].
  239. // Note that a single [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType] may refer to either a
  240. // fully-qualified key algorithm, such as RSA 4096, or a family of key
  241. // algorithms, such as any RSA key.
  242. message AllowedKeyType {
  243. // Describes an RSA key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued from
  244. // a [CaPool][google.cloud.security.privateca.v1.CaPool].
  245. message RsaKeyType {
  246. // Optional. The minimum allowed RSA modulus size (inclusive), in bits. If this is
  247. // not set, or if set to zero, the service-level min RSA modulus size
  248. // will continue to apply.
  249. int64 min_modulus_size = 1 [(google.api.field_behavior) = OPTIONAL];
  250. // Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is
  251. // not set, or if set to zero, the service will not enforce an explicit
  252. // upper bound on RSA modulus sizes.
  253. int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL];
  254. }
  255. // Describes an Elliptic Curve key that may be used in a [Certificate][google.cloud.security.privateca.v1.Certificate]
  256. // issued from a [CaPool][google.cloud.security.privateca.v1.CaPool].
  257. message EcKeyType {
  258. // Describes an elliptic curve-based signature algorithm that may be
  259. // used in a [Certificate][google.cloud.security.privateca.v1.Certificate] issued from a [CaPool][google.cloud.security.privateca.v1.CaPool].
  260. enum EcSignatureAlgorithm {
  261. // Not specified. Signifies that any signature algorithm may be used.
  262. EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0;
  263. // Refers to the Elliptic Curve Digital Signature Algorithm over the
  264. // NIST P-256 curve.
  265. ECDSA_P256 = 1;
  266. // Refers to the Elliptic Curve Digital Signature Algorithm over the
  267. // NIST P-384 curve.
  268. ECDSA_P384 = 2;
  269. // Refers to the Edwards-curve Digital Signature Algorithm over curve
  270. // 25519, as described in RFC 8410.
  271. EDDSA_25519 = 3;
  272. }
  273. // Optional. A signature algorithm that must be used. If this is omitted, any
  274. // EC-based signature algorithm will be allowed.
  275. EcSignatureAlgorithm signature_algorithm = 1 [(google.api.field_behavior) = OPTIONAL];
  276. }
  277. oneof key_type {
  278. // Represents an allowed RSA key type.
  279. RsaKeyType rsa = 1;
  280. // Represents an allowed Elliptic Curve key type.
  281. EcKeyType elliptic_curve = 2;
  282. }
  283. }
  284. // [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes] specifies the allowed ways in which
  285. // [Certificates][google.cloud.security.privateca.v1.Certificate] may be requested from this
  286. // [CaPool][google.cloud.security.privateca.v1.CaPool].
  287. message IssuanceModes {
  288. // Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
  289. // specifying a CSR.
  290. bool allow_csr_based_issuance = 1 [(google.api.field_behavior) = OPTIONAL];
  291. // Optional. When true, allows callers to create [Certificates][google.cloud.security.privateca.v1.Certificate] by
  292. // specifying a [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
  293. bool allow_config_based_issuance = 2 [(google.api.field_behavior) = OPTIONAL];
  294. }
  295. // Optional. If any [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType] is specified, then the certificate request's
  296. // public key must match one of the key types listed here. Otherwise,
  297. // any key may be used.
  298. repeated AllowedKeyType allowed_key_types = 1 [(google.api.field_behavior) = OPTIONAL];
  299. // Optional. The maximum lifetime allowed for issued [Certificates][google.cloud.security.privateca.v1.Certificate]. Note
  300. // that if the issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] expires before a
  301. // [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested maximum_lifetime, the effective lifetime will
  302. // be explicitly truncated to match it.
  303. google.protobuf.Duration maximum_lifetime = 2 [(google.api.field_behavior) = OPTIONAL];
  304. // Optional. If specified, then only methods allowed in the [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes] may be
  305. // used to issue [Certificates][google.cloud.security.privateca.v1.Certificate].
  306. IssuanceModes allowed_issuance_modes = 3 [(google.api.field_behavior) = OPTIONAL];
  307. // Optional. A set of X.509 values that will be applied to all certificates issued
  308. // through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a certificate request includes conflicting
  309. // values for the same properties, they will be overwritten by the values
  310. // defined here. If a certificate request uses a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
  311. // that defines conflicting
  312. // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values] for the same
  313. // properties, the certificate issuance request will fail.
  314. X509Parameters baseline_values = 4 [(google.api.field_behavior) = OPTIONAL];
  315. // Optional. Describes constraints on identities that may appear in
  316. // [Certificates][google.cloud.security.privateca.v1.Certificate] issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
  317. // If this is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool] will not add restrictions on a
  318. // certificate's identity.
  319. CertificateIdentityConstraints identity_constraints = 5 [(google.api.field_behavior) = OPTIONAL];
  320. // Optional. Describes the set of X.509 extensions that may appear in a
  321. // [Certificate][google.cloud.security.privateca.v1.Certificate] issued through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a certificate request
  322. // sets extensions that don't appear in the [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
  323. // those extensions will be dropped. If a certificate request uses a
  324. // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] with
  325. // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values] that don't
  326. // appear here, the certificate issuance request will fail. If this is
  327. // omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool] will not add restrictions on a
  328. // certificate's X.509 extensions. These constraints do not apply to X.509
  329. // extensions set in this [CaPool][google.cloud.security.privateca.v1.CaPool]'s [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
  330. CertificateExtensionConstraints passthrough_extensions = 6 [(google.api.field_behavior) = OPTIONAL];
  331. }
  332. // Output only. The resource name for this [CaPool][google.cloud.security.privateca.v1.CaPool] in the
  333. // format `projects/*/locations/*/caPools/*`.
  334. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  335. // Required. Immutable. The [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this [CaPool][google.cloud.security.privateca.v1.CaPool].
  336. Tier tier = 2 [
  337. (google.api.field_behavior) = REQUIRED,
  338. (google.api.field_behavior) = IMMUTABLE
  339. ];
  340. // Optional. The [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] to control how [Certificates][google.cloud.security.privateca.v1.Certificate]
  341. // will be issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
  342. IssuancePolicy issuance_policy = 3 [(google.api.field_behavior) = OPTIONAL];
  343. // Optional. The [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions] to follow when issuing
  344. // [Certificates][google.cloud.security.privateca.v1.Certificate] from any [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in this
  345. // [CaPool][google.cloud.security.privateca.v1.CaPool].
  346. PublishingOptions publishing_options = 4 [(google.api.field_behavior) = OPTIONAL];
  347. // Optional. Labels with user-defined metadata.
  348. map<string, string> labels = 5 [(google.api.field_behavior) = OPTIONAL];
  349. }
  350. // A [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] corresponds to a signed X.509 certificate
  351. // Revocation List (CRL). A CRL contains the serial numbers of certificates that
  352. // should no longer be trusted.
  353. message CertificateRevocationList {
  354. option (google.api.resource) = {
  355. type: "privateca.googleapis.com/CertificateRevocationList"
  356. pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}"
  357. };
  358. // Describes a revoked [Certificate][google.cloud.security.privateca.v1.Certificate].
  359. message RevokedCertificate {
  360. // The resource name for the [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
  361. // `projects/*/locations/*/caPools/*/certificates/*`.
  362. string certificate = 1 [(google.api.resource_reference) = {
  363. type: "privateca.googleapis.com/Certificate"
  364. }];
  365. // The serial number of the [Certificate][google.cloud.security.privateca.v1.Certificate].
  366. string hex_serial_number = 2;
  367. // The reason the [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked.
  368. RevocationReason revocation_reason = 3;
  369. }
  370. // The state of a [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList], indicating if it is current.
  371. enum State {
  372. // Not specified.
  373. STATE_UNSPECIFIED = 0;
  374. // The [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] is up to date.
  375. ACTIVE = 1;
  376. // The [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] is no longer current.
  377. SUPERSEDED = 2;
  378. }
  379. // Output only. The resource name for this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] in
  380. // the format
  381. // `projects/*/locations/*/caPools/*certificateAuthorities/*/
  382. // certificateRevocationLists/*`.
  383. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  384. // Output only. The CRL sequence number that appears in pem_crl.
  385. int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  386. // Output only. The revoked serial numbers that appear in pem_crl.
  387. repeated RevokedCertificate revoked_certificates = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  388. // Output only. The PEM-encoded X.509 CRL.
  389. string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  390. // Output only. The location where 'pem_crl' can be accessed.
  391. string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  392. // Output only. The [State][google.cloud.security.privateca.v1.CertificateRevocationList.State] for this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
  393. State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  394. // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] was created.
  395. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  396. // Output only. The time at which this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList] was updated.
  397. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  398. // Output only. The revision ID of this [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]. A new revision is
  399. // committed whenever a new CRL is published. The format is an 8-character
  400. // hexadecimal string.
  401. string revision_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  402. // Optional. Labels with user-defined metadata.
  403. map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
  404. }
  405. // A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds to a signed X.509 certificate issued by a
  406. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
  407. message Certificate {
  408. option (google.api.resource) = {
  409. type: "privateca.googleapis.com/Certificate"
  410. pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}"
  411. };
  412. // Describes fields that are relavent to the revocation of a [Certificate][google.cloud.security.privateca.v1.Certificate].
  413. message RevocationDetails {
  414. // Indicates why a [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked.
  415. RevocationReason revocation_state = 1;
  416. // The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was revoked.
  417. google.protobuf.Timestamp revocation_time = 2;
  418. }
  419. // Output only. The resource name for this [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
  420. // `projects/*/locations/*/caPools/*/certificates/*`.
  421. string name = 1 [
  422. (google.api.field_behavior) = OUTPUT_ONLY,
  423. (google.api.resource_reference) = {
  424. type: "privateca.googleapis.com/Certificate"
  425. }
  426. ];
  427. // The config used to create a signed X.509 certificate.
  428. oneof certificate_config {
  429. // Immutable. A pem-encoded X.509 certificate signing request (CSR).
  430. string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE];
  431. // Immutable. A description of the certificate and key that does not require X.509 or
  432. // ASN.1.
  433. CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE];
  434. }
  435. // Output only. The resource name of the issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] in the format
  436. // `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
  437. string issuer_certificate_authority = 4 [
  438. (google.api.field_behavior) = OUTPUT_ONLY,
  439. (google.api.resource_reference) = {
  440. type: "privateca.googleapis.com/CertificateAuthority"
  441. }
  442. ];
  443. // Required. Immutable. The desired lifetime of a certificate. Used to create the
  444. // "not_before_time" and "not_after_time" fields inside an X.509
  445. // certificate. Note that the lifetime may be truncated if it would extend
  446. // past the life of any certificate authority in the issuing chain.
  447. google.protobuf.Duration lifetime = 5 [
  448. (google.api.field_behavior) = REQUIRED,
  449. (google.api.field_behavior) = IMMUTABLE
  450. ];
  451. // Immutable. The resource name for a [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] used to issue this
  452. // certificate, in the format
  453. // `projects/*/locations/*/certificateTemplates/*`.
  454. // If this is specified, the caller must have the necessary permission to
  455. // use this template. If this is omitted, no template will be used.
  456. // This template must be in the same location as the [Certificate][google.cloud.security.privateca.v1.Certificate].
  457. string certificate_template = 6 [
  458. (google.api.field_behavior) = IMMUTABLE,
  459. (google.api.resource_reference) = {
  460. type: "privateca.googleapis.com/CertificateTemplate"
  461. }
  462. ];
  463. // Immutable. Specifies how the [Certificate][google.cloud.security.privateca.v1.Certificate]'s identity fields are to be decided.
  464. // If this is omitted, the `DEFAULT` subject mode will be used.
  465. SubjectRequestMode subject_mode = 7 [(google.api.field_behavior) = IMMUTABLE];
  466. // Output only. Details regarding the revocation of this [Certificate][google.cloud.security.privateca.v1.Certificate]. This
  467. // [Certificate][google.cloud.security.privateca.v1.Certificate] is considered revoked if and only if this field is present.
  468. RevocationDetails revocation_details = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  469. // Output only. The pem-encoded, signed X.509 certificate.
  470. string pem_certificate = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  471. // Output only. A structured description of the issued X.509 certificate.
  472. CertificateDescription certificate_description = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  473. // Output only. The chain that may be used to verify the X.509 certificate. Expected to be
  474. // in issuer-to-root order according to RFC 5246.
  475. repeated string pem_certificate_chain = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  476. // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was created.
  477. google.protobuf.Timestamp create_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  478. // Output only. The time at which this [Certificate][google.cloud.security.privateca.v1.Certificate] was updated.
  479. google.protobuf.Timestamp update_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  480. // Optional. Labels with user-defined metadata.
  481. map<string, string> labels = 14 [(google.api.field_behavior) = OPTIONAL];
  482. }
  483. // A [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] refers to a managed template for certificate
  484. // issuance.
  485. message CertificateTemplate {
  486. option (google.api.resource) = {
  487. type: "privateca.googleapis.com/CertificateTemplate"
  488. pattern: "projects/{project}/locations/{location}/certificateTemplates/{certificate_template}"
  489. };
  490. // Output only. The resource name for this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] in the format
  491. // `projects/*/locations/*/certificateTemplates/*`.
  492. string name = 1 [
  493. (google.api.field_behavior) = OUTPUT_ONLY,
  494. (google.api.resource_reference) = {
  495. type: "privateca.googleapis.com/CertificateTemplate"
  496. }
  497. ];
  498. // Optional. A set of X.509 values that will be applied to all issued certificates that
  499. // use this template. If the certificate request includes conflicting values
  500. // for the same properties, they will be overwritten by the values defined
  501. // here. If the issuing [CaPool][google.cloud.security.privateca.v1.CaPool]'s [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
  502. // defines conflicting
  503. // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values] for the same
  504. // properties, the certificate issuance request will fail.
  505. X509Parameters predefined_values = 2 [(google.api.field_behavior) = OPTIONAL];
  506. // Optional. Describes constraints on identities that may be appear in
  507. // [Certificates][google.cloud.security.privateca.v1.Certificate] issued using this template. If this is omitted,
  508. // then this template will not add restrictions on a certificate's identity.
  509. CertificateIdentityConstraints identity_constraints = 3 [(google.api.field_behavior) = OPTIONAL];
  510. // Optional. Describes the set of X.509 extensions that may appear in a
  511. // [Certificate][google.cloud.security.privateca.v1.Certificate] issued using this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]. If a certificate
  512. // request sets extensions that don't appear in the
  513. // [passthrough_extensions][google.cloud.security.privateca.v1.CertificateTemplate.passthrough_extensions], those extensions will be dropped. If the
  514. // issuing [CaPool][google.cloud.security.privateca.v1.CaPool]'s [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy] defines
  515. // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values] that don't appear
  516. // here, the certificate issuance request will fail. If this is omitted, then
  517. // this template will not add restrictions on a certificate's X.509
  518. // extensions. These constraints do not apply to X.509 extensions set in this
  519. // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]'s [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values].
  520. CertificateExtensionConstraints passthrough_extensions = 4 [(google.api.field_behavior) = OPTIONAL];
  521. // Optional. A human-readable description of scenarios this template is intended for.
  522. string description = 5 [(google.api.field_behavior) = OPTIONAL];
  523. // Output only. The time at which this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] was created.
  524. google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  525. // Output only. The time at which this [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate] was updated.
  526. google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  527. // Optional. Labels with user-defined metadata.
  528. map<string, string> labels = 8 [(google.api.field_behavior) = OPTIONAL];
  529. }
  530. // An [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] is used to describe certain fields of an
  531. // X.509 certificate, such as the key usage fields, fields specific to CA
  532. // certificates, certificate policy extensions and custom extensions.
  533. message X509Parameters {
  534. // Describes values that are relevant in a CA certificate.
  535. message CaOptions {
  536. // Optional. Refers to the "CA" X.509 extension, which is a boolean value. When this
  537. // value is missing, the extension will be omitted from the CA certificate.
  538. optional bool is_ca = 1 [(google.api.field_behavior) = OPTIONAL];
  539. // Optional. Refers to the path length restriction X.509 extension. For a CA
  540. // certificate, this value describes the depth of subordinate CA
  541. // certificates that are allowed.
  542. // If this value is less than 0, the request will fail.
  543. // If this value is missing, the max path length will be omitted from the
  544. // CA certificate.
  545. optional int32 max_issuer_path_length = 2 [(google.api.field_behavior) = OPTIONAL];
  546. }
  547. // Optional. Indicates the intended use for keys that correspond to a certificate.
  548. KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL];
  549. // Optional. Describes options in this [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] that are relevant in a CA
  550. // certificate.
  551. CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL];
  552. // Optional. Describes the X.509 certificate policy object identifiers, per
  553. // https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
  554. repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL];
  555. // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses
  556. // that appear in the "Authority Information Access" extension in the
  557. // certificate.
  558. repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL];
  559. // Optional. Describes custom X.509 extensions.
  560. repeated X509Extension additional_extensions = 5 [(google.api.field_behavior) = OPTIONAL];
  561. }
  562. // Describes a subordinate CA's issuers. This is either a resource name to a
  563. // known issuing [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], or a PEM issuer certificate chain.
  564. message SubordinateConfig {
  565. // This message describes a subordinate CA's issuer certificate chain. This
  566. // wrapper exists for compatibility reasons.
  567. message SubordinateConfigChain {
  568. // Required. Expected to be in leaf-to-root order according to RFC 5246.
  569. repeated string pem_certificates = 1 [(google.api.field_behavior) = REQUIRED];
  570. }
  571. oneof subordinate_config {
  572. // Required. This can refer to a [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] that was used to create a
  573. // subordinate [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]. This field is used for information
  574. // and usability purposes only. The resource name is in the format
  575. // `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
  576. string certificate_authority = 1 [
  577. (google.api.field_behavior) = REQUIRED,
  578. (google.api.resource_reference) = {
  579. type: "privateca.googleapis.com/CertificateAuthority"
  580. }
  581. ];
  582. // Required. Contains the PEM certificate chain for the issuers of this
  583. // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority], but not pem certificate for this CA itself.
  584. SubordinateConfigChain pem_issuer_chain = 2 [(google.api.field_behavior) = REQUIRED];
  585. }
  586. }
  587. // A [PublicKey][google.cloud.security.privateca.v1.PublicKey] describes a public key.
  588. message PublicKey {
  589. // Types of public keys formats that are supported. Currently, only `PEM`
  590. // format is supported.
  591. enum KeyFormat {
  592. // Default unspecified value.
  593. KEY_FORMAT_UNSPECIFIED = 0;
  594. // The key is PEM-encoded as defined in [RFC
  595. // 7468](https://tools.ietf.org/html/rfc7468). It can be any of the
  596. // following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey
  597. // structure, an RFC 5280
  598. // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
  599. // or a PEM-encoded X.509 certificate signing request (CSR). If a
  600. // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
  601. // is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey
  602. // or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified,
  603. // it will used solely for the purpose of extracting the public key. When
  604. // generated by the service, it will always be an RFC 5280
  605. // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
  606. // structure containing an algorithm identifier and a key.
  607. PEM = 1;
  608. }
  609. // Required. A public key. The padding and encoding
  610. // must match with the `KeyFormat` value specified for the `format` field.
  611. bytes key = 1 [(google.api.field_behavior) = REQUIRED];
  612. // Required. The format of the public key.
  613. KeyFormat format = 2 [(google.api.field_behavior) = REQUIRED];
  614. }
  615. // A [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig] describes an X.509 certificate or CSR that is to be
  616. // created, as an alternative to using ASN.1.
  617. message CertificateConfig {
  618. // These values are used to create the distinguished name and subject
  619. // alternative name fields in an X.509 certificate.
  620. message SubjectConfig {
  621. // Required. Contains distinguished name fields such as the common name, location and
  622. // organization.
  623. Subject subject = 1 [(google.api.field_behavior) = REQUIRED];
  624. // Optional. The subject alternative name fields.
  625. SubjectAltNames subject_alt_name = 2 [(google.api.field_behavior) = OPTIONAL];
  626. }
  627. // Required. Specifies some of the values in a certificate that are related to the
  628. // subject.
  629. SubjectConfig subject_config = 1 [(google.api.field_behavior) = REQUIRED];
  630. // Required. Describes how some of the technical X.509 fields in a certificate should be
  631. // populated.
  632. X509Parameters x509_config = 2 [(google.api.field_behavior) = REQUIRED];
  633. // Optional. The public key that corresponds to this config. This is, for example, used
  634. // when issuing [Certificates][google.cloud.security.privateca.v1.Certificate], but not when creating a
  635. // self-signed [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] or [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority] CSR.
  636. PublicKey public_key = 3 [(google.api.field_behavior) = OPTIONAL];
  637. }
  638. // A [CertificateDescription][google.cloud.security.privateca.v1.CertificateDescription] describes an X.509 certificate or CSR that has
  639. // been issued, as an alternative to using ASN.1 / X.509.
  640. message CertificateDescription {
  641. // These values describe fields in an issued X.509 certificate such as the
  642. // distinguished name, subject alternative names, serial number, and lifetime.
  643. message SubjectDescription {
  644. // Contains distinguished name fields such as the common name, location and
  645. // / organization.
  646. Subject subject = 1;
  647. // The subject alternative name fields.
  648. SubjectAltNames subject_alt_name = 2;
  649. // The serial number encoded in lowercase hexadecimal.
  650. string hex_serial_number = 3;
  651. // For convenience, the actual lifetime of an issued certificate.
  652. google.protobuf.Duration lifetime = 4;
  653. // The time at which the certificate becomes valid.
  654. google.protobuf.Timestamp not_before_time = 5;
  655. // The time after which the certificate is expired.
  656. // Per RFC 5280, the validity period for a certificate is the period of time
  657. // from not_before_time through not_after_time, inclusive.
  658. // Corresponds to 'not_before_time' + 'lifetime' - 1 second.
  659. google.protobuf.Timestamp not_after_time = 6;
  660. }
  661. // A KeyId identifies a specific public key, usually by hashing the public
  662. // key.
  663. message KeyId {
  664. // Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most
  665. // likely the 160 bit SHA-1 hash of the public key.
  666. string key_id = 1 [(google.api.field_behavior) = OPTIONAL];
  667. }
  668. // A group of fingerprints for the x509 certificate.
  669. message CertificateFingerprint {
  670. // The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
  671. string sha256_hash = 1;
  672. }
  673. // Describes some of the values in a certificate that are related to the
  674. // subject and lifetime.
  675. SubjectDescription subject_description = 1;
  676. // Describes some of the technical X.509 fields in a certificate.
  677. X509Parameters x509_description = 2;
  678. // The public key that corresponds to an issued certificate.
  679. PublicKey public_key = 3;
  680. // Provides a means of identifiying certificates that contain a particular
  681. // public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
  682. KeyId subject_key_id = 4;
  683. // Identifies the subject_key_id of the parent certificate, per
  684. // https://tools.ietf.org/html/rfc5280#section-4.2.1.1
  685. KeyId authority_key_id = 5;
  686. // Describes a list of locations to obtain CRL information, i.e.
  687. // the DistributionPoint.fullName described by
  688. // https://tools.ietf.org/html/rfc5280#section-4.2.1.13
  689. repeated string crl_distribution_points = 6;
  690. // Describes lists of issuer CA certificate URLs that appear in the
  691. // "Authority Information Access" extension in the certificate.
  692. repeated string aia_issuing_certificate_urls = 7;
  693. // The hash of the x.509 certificate.
  694. CertificateFingerprint cert_fingerprint = 8;
  695. }
  696. // An [ObjectId][google.cloud.security.privateca.v1.ObjectId] specifies an object identifier (OID). These provide context
  697. // and describe types in ASN.1 messages.
  698. message ObjectId {
  699. // Required. The parts of an OID path. The most significant parts of the path come
  700. // first.
  701. repeated int32 object_id_path = 1 [(google.api.field_behavior) = REQUIRED];
  702. }
  703. // An [X509Extension][google.cloud.security.privateca.v1.X509Extension] specifies an X.509 extension, which may be used in
  704. // different parts of X.509 objects like certificates, CSRs, and CRLs.
  705. message X509Extension {
  706. // Required. The OID for this X.509 extension.
  707. ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED];
  708. // Optional. Indicates whether or not this extension is critical (i.e., if the client
  709. // does not know how to handle this extension, the client should consider this
  710. // to be an error).
  711. bool critical = 2 [(google.api.field_behavior) = OPTIONAL];
  712. // Required. The value of this X.509 extension.
  713. bytes value = 3 [(google.api.field_behavior) = REQUIRED];
  714. }
  715. // A [KeyUsage][google.cloud.security.privateca.v1.KeyUsage] describes key usage values that may appear in an X.509
  716. // certificate.
  717. message KeyUsage {
  718. // [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions] corresponds to the key usage values
  719. // described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
  720. message KeyUsageOptions {
  721. // The key may be used for digital signatures.
  722. bool digital_signature = 1;
  723. // The key may be used for cryptographic commitments. Note that this may
  724. // also be referred to as "non-repudiation".
  725. bool content_commitment = 2;
  726. // The key may be used to encipher other keys.
  727. bool key_encipherment = 3;
  728. // The key may be used to encipher data.
  729. bool data_encipherment = 4;
  730. // The key may be used in a key agreement protocol.
  731. bool key_agreement = 5;
  732. // The key may be used to sign certificates.
  733. bool cert_sign = 6;
  734. // The key may be used sign certificate revocation lists.
  735. bool crl_sign = 7;
  736. // The key may be used to encipher only.
  737. bool encipher_only = 8;
  738. // The key may be used to decipher only.
  739. bool decipher_only = 9;
  740. }
  741. // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions] has fields that correspond to
  742. // certain common OIDs that could be specified as an extended key usage value.
  743. message ExtendedKeyUsageOptions {
  744. // Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
  745. // server authentication", though regularly used for non-WWW TLS.
  746. bool server_auth = 1;
  747. // Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
  748. // client authentication", though regularly used for non-WWW TLS.
  749. bool client_auth = 2;
  750. // Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
  751. // downloadable executable code client authentication".
  752. bool code_signing = 3;
  753. // Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
  754. // protection".
  755. bool email_protection = 4;
  756. // Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
  757. // the hash of an object to a time".
  758. bool time_stamping = 5;
  759. // Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
  760. // OCSP responses".
  761. bool ocsp_signing = 6;
  762. }
  763. // Describes high-level ways in which a key may be used.
  764. KeyUsageOptions base_key_usage = 1;
  765. // Detailed scenarios in which a key may be used.
  766. ExtendedKeyUsageOptions extended_key_usage = 2;
  767. // Used to describe extended key usages that are not listed in the
  768. // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions] message.
  769. repeated ObjectId unknown_extended_key_usages = 3;
  770. }
  771. // [Subject][google.cloud.security.privateca.v1.Subject] describes parts of a distinguished name that, in turn,
  772. // describes the subject of the certificate.
  773. message Subject {
  774. // The "common name" of the subject.
  775. string common_name = 1;
  776. // The country code of the subject.
  777. string country_code = 2;
  778. // The organization of the subject.
  779. string organization = 3;
  780. // The organizational_unit of the subject.
  781. string organizational_unit = 4;
  782. // The locality or city of the subject.
  783. string locality = 5;
  784. // The province, territory, or regional state of the subject.
  785. string province = 6;
  786. // The street address of the subject.
  787. string street_address = 7;
  788. // The postal code of the subject.
  789. string postal_code = 8;
  790. }
  791. // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] corresponds to a more modern way of listing what
  792. // the asserted identity is in a certificate (i.e., compared to the "common
  793. // name" in the distinguished name).
  794. message SubjectAltNames {
  795. // Contains only valid, fully-qualified host names.
  796. repeated string dns_names = 1;
  797. // Contains only valid RFC 3986 URIs.
  798. repeated string uris = 2;
  799. // Contains only valid RFC 2822 E-mail addresses.
  800. repeated string email_addresses = 3;
  801. // Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
  802. repeated string ip_addresses = 4;
  803. // Contains additional subject alternative name values.
  804. // For each custom_san, the `value` field must contain an ASN.1 encoded
  805. // UTF8String.
  806. repeated X509Extension custom_sans = 5;
  807. }
  808. // Describes constraints on a [Certificate][google.cloud.security.privateca.v1.Certificate]'s [Subject][google.cloud.security.privateca.v1.Subject] and
  809. // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames].
  810. message CertificateIdentityConstraints {
  811. // Optional. A CEL expression that may be used to validate the resolved X.509 Subject
  812. // and/or Subject Alternative Name before a certificate is signed.
  813. // To see the full allowed syntax and some examples, see
  814. // https://cloud.google.com/certificate-authority-service/docs/using-cel
  815. google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL];
  816. // Required. If this is true, the [Subject][google.cloud.security.privateca.v1.Subject] field may be copied from a certificate
  817. // request into the signed certificate. Otherwise, the requested [Subject][google.cloud.security.privateca.v1.Subject]
  818. // will be discarded.
  819. optional bool allow_subject_passthrough = 2 [(google.api.field_behavior) = REQUIRED];
  820. // Required. If this is true, the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension may be copied from a
  821. // certificate request into the signed certificate. Otherwise, the requested
  822. // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be discarded.
  823. optional bool allow_subject_alt_names_passthrough = 3 [(google.api.field_behavior) = REQUIRED];
  824. }
  825. // Describes a set of X.509 extensions that may be part of some certificate
  826. // issuance controls.
  827. message CertificateExtensionConstraints {
  828. // Describes well-known X.509 extensions that can appear in a [Certificate][google.cloud.security.privateca.v1.Certificate],
  829. // not including the [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] extension.
  830. enum KnownCertificateExtension {
  831. // Not specified.
  832. KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0;
  833. // Refers to a certificate's Key Usage extension, as described in [RFC 5280
  834. // section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3).
  835. // This corresponds to the [KeyUsage.base_key_usage][google.cloud.security.privateca.v1.KeyUsage.base_key_usage] field.
  836. BASE_KEY_USAGE = 1;
  837. // Refers to a certificate's Extended Key Usage extension, as described in
  838. // [RFC 5280
  839. // section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12).
  840. // This corresponds to the [KeyUsage.extended_key_usage][google.cloud.security.privateca.v1.KeyUsage.extended_key_usage] message.
  841. EXTENDED_KEY_USAGE = 2;
  842. // Refers to a certificate's Basic Constraints extension, as described in
  843. // [RFC 5280
  844. // section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9).
  845. // This corresponds to the [X509Parameters.ca_options][google.cloud.security.privateca.v1.X509Parameters.ca_options] field.
  846. CA_OPTIONS = 3;
  847. // Refers to a certificate's Policy object identifiers, as described in
  848. // [RFC 5280
  849. // section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4).
  850. // This corresponds to the [X509Parameters.policy_ids][google.cloud.security.privateca.v1.X509Parameters.policy_ids] field.
  851. POLICY_IDS = 4;
  852. // Refers to OCSP servers in a certificate's Authority Information Access
  853. // extension, as described in
  854. // [RFC 5280
  855. // section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1),
  856. // This corresponds to the [X509Parameters.aia_ocsp_servers][google.cloud.security.privateca.v1.X509Parameters.aia_ocsp_servers] field.
  857. AIA_OCSP_SERVERS = 5;
  858. }
  859. // Optional. A set of named X.509 extensions. Will be combined with
  860. // [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions] to determine the full set of X.509 extensions.
  861. repeated KnownCertificateExtension known_extensions = 1 [(google.api.field_behavior) = OPTIONAL];
  862. // Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId] identifying custom X.509 extensions.
  863. // Will be combined with [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions] to determine the full set of
  864. // X.509 extensions.
  865. repeated ObjectId additional_extensions = 2 [(google.api.field_behavior) = OPTIONAL];
  866. }
  867. // A [RevocationReason][google.cloud.security.privateca.v1.RevocationReason] indicates whether a [Certificate][google.cloud.security.privateca.v1.Certificate] has been revoked,
  868. // and the reason for revocation. These correspond to standard revocation
  869. // reasons from RFC 5280. Note that the enum labels and values in this
  870. // definition are not the same ASN.1 values defined in RFC 5280. These values
  871. // will be translated to the correct ASN.1 values when a CRL is created.
  872. enum RevocationReason {
  873. // Default unspecified value. This value does indicate that a [Certificate][google.cloud.security.privateca.v1.Certificate]
  874. // has been revoked, but that a reason has not been recorded.
  875. REVOCATION_REASON_UNSPECIFIED = 0;
  876. // Key material for this [Certificate][google.cloud.security.privateca.v1.Certificate] may have leaked.
  877. KEY_COMPROMISE = 1;
  878. // The key material for a certificate authority in the issuing path may have
  879. // leaked.
  880. CERTIFICATE_AUTHORITY_COMPROMISE = 2;
  881. // The subject or other attributes in this [Certificate][google.cloud.security.privateca.v1.Certificate] have changed.
  882. AFFILIATION_CHANGED = 3;
  883. // This [Certificate][google.cloud.security.privateca.v1.Certificate] has been superseded.
  884. SUPERSEDED = 4;
  885. // This [Certificate][google.cloud.security.privateca.v1.Certificate] or entities in the issuing path have ceased to
  886. // operate.
  887. CESSATION_OF_OPERATION = 5;
  888. // This [Certificate][google.cloud.security.privateca.v1.Certificate] should not be considered valid, it is expected that it
  889. // may become valid in the future.
  890. CERTIFICATE_HOLD = 6;
  891. // This [Certificate][google.cloud.security.privateca.v1.Certificate] no longer has permission to assert the listed
  892. // attributes.
  893. PRIVILEGE_WITHDRAWN = 7;
  894. // The authority which determines appropriate attributes for a [Certificate][google.cloud.security.privateca.v1.Certificate]
  895. // may have been compromised.
  896. ATTRIBUTE_AUTHORITY_COMPROMISE = 8;
  897. }
  898. // Describes the way in which a [Certificate][google.cloud.security.privateca.v1.Certificate]'s [Subject][google.cloud.security.privateca.v1.Subject] and/or
  899. // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be resolved.
  900. enum SubjectRequestMode {
  901. // Not specified.
  902. SUBJECT_REQUEST_MODE_UNSPECIFIED = 0;
  903. // The default mode used in most cases. Indicates that the certificate's
  904. // [Subject][google.cloud.security.privateca.v1.Subject] and/or [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] are specified in the certificate
  905. // request. This mode requires the caller to have the
  906. // `privateca.certificates.create` permission.
  907. DEFAULT = 1;
  908. // A mode reserved for special cases. Indicates that the certificate should
  909. // have one or more SPIFFE [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] set by the service based
  910. // on the caller's identity. This mode will ignore any explicitly specified
  911. // [Subject][google.cloud.security.privateca.v1.Subject] and/or [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] in the certificate request.
  912. // This mode requires the caller to have the
  913. // `privateca.certificates.createForSelf` permission.
  914. REFLECTED_SPIFFE = 2;
  915. }