go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/common/proto/googleapis/google/cloud/security/privateca/v1/resources.proto (about)

     1  // Copyright 2023 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  
    15  syntax = "proto3";
    16  
    17  package google.cloud.security.privateca.v1;
    18  
    19  import "google/api/field_behavior.proto";
    20  import "google/api/resource.proto";
    21  import "google/protobuf/duration.proto";
    22  import "google/protobuf/timestamp.proto";
    23  import "google/type/expr.proto";
    24  
    25  option cc_enable_arenas = true;
    26  option csharp_namespace = "Google.Cloud.Security.PrivateCA.V1";
    27  option go_package = "cloud.google.com/go/security/privateca/apiv1/privatecapb;privatecapb";
    28  option java_multiple_files = true;
    29  option java_outer_classname = "PrivateCaResourcesProto";
    30  option java_package = "com.google.cloud.security.privateca.v1";
    31  option php_namespace = "Google\\Cloud\\Security\\PrivateCA\\V1";
    32  option ruby_package = "Google::Cloud::Security::PrivateCA::V1";
    33  
    34  // A
    35  // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    36  // represents an individual Certificate Authority. A
    37  // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    38  // can be used to create
    39  // [Certificates][google.cloud.security.privateca.v1.Certificate].
    40  message CertificateAuthority {
    41    option (google.api.resource) = {
    42      type: "privateca.googleapis.com/CertificateAuthority"
    43      pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}"
    44    };
    45  
    46    // The type of a
    47    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
    48    // indicating its issuing chain.
    49    enum Type {
    50      // Not specified.
    51      TYPE_UNSPECIFIED = 0;
    52  
    53      // Self-signed CA.
    54      SELF_SIGNED = 1;
    55  
    56      // Subordinate CA. Could be issued by a Private CA
    57      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
    58      // or an unmanaged CA.
    59      SUBORDINATE = 2;
    60    }
    61  
    62    // The state of a
    63    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
    64    // indicating if it can be used.
    65    enum State {
    66      // Not specified.
    67      STATE_UNSPECIFIED = 0;
    68  
    69      // Certificates can be issued from this CA. CRLs will be generated for this
    70      // CA. The CA will be part of the
    71      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
    72      // will be used to issue certificates from the
    73      // [CaPool][google.cloud.security.privateca.v1.CaPool].
    74      ENABLED = 1;
    75  
    76      // Certificates cannot be issued from this CA. CRLs will still be generated.
    77      // The CA will be part of the
    78      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
    79      // will not be used to issue certificates from the
    80      // [CaPool][google.cloud.security.privateca.v1.CaPool].
    81      DISABLED = 2;
    82  
    83      // Certificates can be issued from this CA. CRLs will be generated for this
    84      // CA. The CA will be part of the
    85      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, but
    86      // will not be used to issue certificates from the
    87      // [CaPool][google.cloud.security.privateca.v1.CaPool].
    88      STAGED = 3;
    89  
    90      // Certificates cannot be issued from this CA. CRLs will not be generated.
    91      // The CA will not be part of the
    92      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
    93      // will not be used to issue certificates from the
    94      // [CaPool][google.cloud.security.privateca.v1.CaPool].
    95      AWAITING_USER_ACTIVATION = 4;
    96  
    97      // Certificates cannot be issued from this CA. CRLs will not be generated.
    98      // The CA may still be recovered by calling
    99      // [CertificateAuthorityService.UndeleteCertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthorityService.UndeleteCertificateAuthority]
   100      // before
   101      // [expire_time][google.cloud.security.privateca.v1.CertificateAuthority.expire_time].
   102      // The CA will not be part of the
   103      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s trust anchor, and
   104      // will not be used to issue certificates from the
   105      // [CaPool][google.cloud.security.privateca.v1.CaPool].
   106      DELETED = 5;
   107    }
   108  
   109    // URLs where a
   110    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   111    // will publish content.
   112    message AccessUrls {
   113      // The URL where this
   114      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   115      // CA certificate is published. This will only be set for CAs that have been
   116      // activated.
   117      string ca_certificate_access_url = 1;
   118  
   119      // The URLs where this
   120      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   121      // CRLs are published. This will only be set for CAs that have been
   122      // activated.
   123      repeated string crl_access_urls = 2;
   124    }
   125  
   126    // A Cloud KMS key configuration that a
   127    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   128    // will use.
   129    message KeyVersionSpec {
   130      oneof KeyVersion {
   131        // The resource name for an existing Cloud KMS CryptoKeyVersion in the
   132        // format
   133        // `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
   134        // This option enables full flexibility in the key's capabilities and
   135        // properties.
   136        string cloud_kms_key_version = 1;
   137  
   138        // The algorithm to use for creating a managed Cloud KMS key for a for a
   139        // simplified experience. All managed keys will be have their
   140        // [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] as `HSM`.
   141        SignHashAlgorithm algorithm = 2;
   142      }
   143    }
   144  
   145    // The algorithm of a Cloud KMS CryptoKeyVersion of a
   146    // [CryptoKey][google.cloud.kms.v1.CryptoKey] with the
   147    // [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] value
   148    // `ASYMMETRIC_SIGN`. These values correspond to the
   149    // [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm]
   150    // values. For RSA signing algorithms, the PSS algorithms should be preferred,
   151    // use PKCS1 algorithms if required for compatibility. For further
   152    // recommendations, see
   153    // https://cloud.google.com/kms/docs/algorithms#algorithm_recommendations.
   154    enum SignHashAlgorithm {
   155      // Not specified.
   156      SIGN_HASH_ALGORITHM_UNSPECIFIED = 0;
   157  
   158      // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256
   159      RSA_PSS_2048_SHA256 = 1;
   160  
   161      // maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256
   162      RSA_PSS_3072_SHA256 = 2;
   163  
   164      // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256
   165      RSA_PSS_4096_SHA256 = 3;
   166  
   167      // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256
   168      RSA_PKCS1_2048_SHA256 = 6;
   169  
   170      // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256
   171      RSA_PKCS1_3072_SHA256 = 7;
   172  
   173      // maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256
   174      RSA_PKCS1_4096_SHA256 = 8;
   175  
   176      // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256
   177      EC_P256_SHA256 = 4;
   178  
   179      // maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384
   180      EC_P384_SHA384 = 5;
   181    }
   182  
   183    // Output only. The resource name for this
   184    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   185    // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
   186    string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
   187  
   188    // Required. Immutable. The
   189    // [Type][google.cloud.security.privateca.v1.CertificateAuthority.Type] of
   190    // this
   191    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   192    Type type = 2 [
   193      (google.api.field_behavior) = REQUIRED,
   194      (google.api.field_behavior) = IMMUTABLE
   195    ];
   196  
   197    // Required. Immutable. The config used to create a self-signed X.509
   198    // certificate or CSR.
   199    CertificateConfig config = 3 [
   200      (google.api.field_behavior) = REQUIRED,
   201      (google.api.field_behavior) = IMMUTABLE
   202    ];
   203  
   204    // Required. Immutable. The desired lifetime of the CA certificate. Used to
   205    // create the "not_before_time" and "not_after_time" fields inside an X.509
   206    // certificate.
   207    google.protobuf.Duration lifetime = 4 [
   208      (google.api.field_behavior) = REQUIRED,
   209      (google.api.field_behavior) = IMMUTABLE
   210    ];
   211  
   212    // Required. Immutable. Used when issuing certificates for this
   213    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   214    // If this
   215    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   216    // is a self-signed CertificateAuthority, this key is also used to sign the
   217    // self-signed CA certificate. Otherwise, it is used to sign a CSR.
   218    KeyVersionSpec key_spec = 5 [
   219      (google.api.field_behavior) = REQUIRED,
   220      (google.api.field_behavior) = IMMUTABLE
   221    ];
   222  
   223    // Optional. If this is a subordinate
   224    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   225    // this field will be set with the subordinate configuration, which describes
   226    // its issuers. This may be updated, but this
   227    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   228    // must continue to validate.
   229    SubordinateConfig subordinate_config = 6
   230        [(google.api.field_behavior) = OPTIONAL];
   231  
   232    // Output only. The
   233    // [CaPool.Tier][google.cloud.security.privateca.v1.CaPool.Tier] of the
   234    // [CaPool][google.cloud.security.privateca.v1.CaPool] that includes this
   235    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   236    CaPool.Tier tier = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
   237  
   238    // Output only. The
   239    // [State][google.cloud.security.privateca.v1.CertificateAuthority.State] for
   240    // this
   241    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   242    State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
   243  
   244    // Output only. This
   245    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   246    // certificate chain, including the current
   247    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   248    // certificate. Ordered such that the root issuer is the final element
   249    // (consistent with RFC 5246). For a self-signed CA, this will only list the
   250    // current
   251    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   252    // certificate.
   253    repeated string pem_ca_certificates = 9
   254        [(google.api.field_behavior) = OUTPUT_ONLY];
   255  
   256    // Output only. A structured description of this
   257    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   258    // CA certificate and its issuers. Ordered as self-to-root.
   259    repeated CertificateDescription ca_certificate_descriptions = 10
   260        [(google.api.field_behavior) = OUTPUT_ONLY];
   261  
   262    // Immutable. The name of a Cloud Storage bucket where this
   263    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   264    // will publish content, such as the CA certificate and CRLs. This must be a
   265    // bucket name, without any prefixes (such as `gs://`) or suffixes (such as
   266    // `.googleapis.com`). For example, to use a bucket named `my-bucket`, you
   267    // would simply specify `my-bucket`. If not specified, a managed bucket will
   268    // be created.
   269    string gcs_bucket = 11 [(google.api.field_behavior) = IMMUTABLE];
   270  
   271    // Output only. URLs for accessing content published by this CA, such as the
   272    // CA certificate and CRLs.
   273    AccessUrls access_urls = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
   274  
   275    // Output only. The time at which this
   276    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   277    // was created.
   278    google.protobuf.Timestamp create_time = 13
   279        [(google.api.field_behavior) = OUTPUT_ONLY];
   280  
   281    // Output only. The time at which this
   282    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   283    // was last updated.
   284    google.protobuf.Timestamp update_time = 14
   285        [(google.api.field_behavior) = OUTPUT_ONLY];
   286  
   287    // Output only. The time at which this
   288    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   289    // was soft deleted, if it is in the
   290    // [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   291    // state.
   292    google.protobuf.Timestamp delete_time = 15
   293        [(google.api.field_behavior) = OUTPUT_ONLY];
   294  
   295    // Output only. The time at which this
   296    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   297    // will be permanently purged, if it is in the
   298    // [DELETED][google.cloud.security.privateca.v1.CertificateAuthority.State.DELETED]
   299    // state.
   300    google.protobuf.Timestamp expire_time = 16
   301        [(google.api.field_behavior) = OUTPUT_ONLY];
   302  
   303    // Optional. Labels with user-defined metadata.
   304    map<string, string> labels = 17 [(google.api.field_behavior) = OPTIONAL];
   305  }
   306  
   307  // A [CaPool][google.cloud.security.privateca.v1.CaPool] represents a group of
   308  // [CertificateAuthorities][google.cloud.security.privateca.v1.CertificateAuthority]
   309  // that form a trust anchor. A
   310  // [CaPool][google.cloud.security.privateca.v1.CaPool] can be used to manage
   311  // issuance policies for one or more
   312  // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   313  // resources and to rotate CA certificates in and out of the trust anchor.
   314  message CaPool {
   315    option (google.api.resource) = {
   316      type: "privateca.googleapis.com/CaPool"
   317      pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}"
   318    };
   319  
   320    // The tier of a [CaPool][google.cloud.security.privateca.v1.CaPool],
   321    // indicating its supported functionality and/or billing SKU.
   322    enum Tier {
   323      // Not specified.
   324      TIER_UNSPECIFIED = 0;
   325  
   326      // Enterprise tier.
   327      ENTERPRISE = 1;
   328  
   329      // DevOps tier.
   330      DEVOPS = 2;
   331    }
   332  
   333    // Options relating to the publication of each
   334    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   335    // CA certificate and CRLs and their inclusion as extensions in issued
   336    // [Certificates][google.cloud.security.privateca.v1.Certificate]. The options
   337    // set here apply to certificates issued by any
   338    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   339    // in the [CaPool][google.cloud.security.privateca.v1.CaPool].
   340    message PublishingOptions {
   341      // Optional. When true, publishes each
   342      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   343      // CA certificate and includes its URL in the "Authority Information Access"
   344      // X.509 extension in all issued
   345      // [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
   346      // is false, the CA certificate will not be published and the corresponding
   347      // X.509 extension will not be written in issued certificates.
   348      bool publish_ca_cert = 1 [(google.api.field_behavior) = OPTIONAL];
   349  
   350      // Optional. When true, publishes each
   351      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]'s
   352      // CRL and includes its URL in the "CRL Distribution Points" X.509 extension
   353      // in all issued
   354      // [Certificates][google.cloud.security.privateca.v1.Certificate]. If this
   355      // is false, CRLs will not be published and the corresponding X.509
   356      // extension will not be written in issued certificates. CRLs will expire 7
   357      // days from their creation. However, we will rebuild daily. CRLs are also
   358      // rebuilt shortly after a certificate is revoked.
   359      bool publish_crl = 2 [(google.api.field_behavior) = OPTIONAL];
   360    }
   361  
   362    // Defines controls over all certificate issuance within a
   363    // [CaPool][google.cloud.security.privateca.v1.CaPool].
   364    message IssuancePolicy {
   365      // Describes a "type" of key that may be used in a
   366      // [Certificate][google.cloud.security.privateca.v1.Certificate] issued from
   367      // a [CaPool][google.cloud.security.privateca.v1.CaPool]. Note that a single
   368      // [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
   369      // may refer to either a fully-qualified key algorithm, such as RSA 4096, or
   370      // a family of key algorithms, such as any RSA key.
   371      message AllowedKeyType {
   372        // Describes an RSA key that may be used in a
   373        // [Certificate][google.cloud.security.privateca.v1.Certificate] issued
   374        // from a [CaPool][google.cloud.security.privateca.v1.CaPool].
   375        message RsaKeyType {
   376          // Optional. The minimum allowed RSA modulus size (inclusive), in bits.
   377          // If this is not set, or if set to zero, the service-level min RSA
   378          // modulus size will continue to apply.
   379          int64 min_modulus_size = 1 [(google.api.field_behavior) = OPTIONAL];
   380  
   381          // Optional. The maximum allowed RSA modulus size (inclusive), in bits.
   382          // If this is not set, or if set to zero, the service will not enforce
   383          // an explicit upper bound on RSA modulus sizes.
   384          int64 max_modulus_size = 2 [(google.api.field_behavior) = OPTIONAL];
   385        }
   386  
   387        // Describes an Elliptic Curve key that may be used in a
   388        // [Certificate][google.cloud.security.privateca.v1.Certificate] issued
   389        // from a [CaPool][google.cloud.security.privateca.v1.CaPool].
   390        message EcKeyType {
   391          // Describes an elliptic curve-based signature algorithm that may be
   392          // used in a
   393          // [Certificate][google.cloud.security.privateca.v1.Certificate] issued
   394          // from a [CaPool][google.cloud.security.privateca.v1.CaPool].
   395          enum EcSignatureAlgorithm {
   396            // Not specified. Signifies that any signature algorithm may be used.
   397            EC_SIGNATURE_ALGORITHM_UNSPECIFIED = 0;
   398  
   399            // Refers to the Elliptic Curve Digital Signature Algorithm over the
   400            // NIST P-256 curve.
   401            ECDSA_P256 = 1;
   402  
   403            // Refers to the Elliptic Curve Digital Signature Algorithm over the
   404            // NIST P-384 curve.
   405            ECDSA_P384 = 2;
   406  
   407            // Refers to the Edwards-curve Digital Signature Algorithm over curve
   408            // 25519, as described in RFC 8410.
   409            EDDSA_25519 = 3;
   410          }
   411  
   412          // Optional. A signature algorithm that must be used. If this is
   413          // omitted, any EC-based signature algorithm will be allowed.
   414          EcSignatureAlgorithm signature_algorithm = 1
   415              [(google.api.field_behavior) = OPTIONAL];
   416        }
   417  
   418        oneof key_type {
   419          // Represents an allowed RSA key type.
   420          RsaKeyType rsa = 1;
   421  
   422          // Represents an allowed Elliptic Curve key type.
   423          EcKeyType elliptic_curve = 2;
   424        }
   425      }
   426  
   427      // [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
   428      // specifies the allowed ways in which
   429      // [Certificates][google.cloud.security.privateca.v1.Certificate] may be
   430      // requested from this [CaPool][google.cloud.security.privateca.v1.CaPool].
   431      message IssuanceModes {
   432        // Optional. When true, allows callers to create
   433        // [Certificates][google.cloud.security.privateca.v1.Certificate] by
   434        // specifying a CSR.
   435        bool allow_csr_based_issuance = 1
   436            [(google.api.field_behavior) = OPTIONAL];
   437  
   438        // Optional. When true, allows callers to create
   439        // [Certificates][google.cloud.security.privateca.v1.Certificate] by
   440        // specifying a
   441        // [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig].
   442        bool allow_config_based_issuance = 2
   443            [(google.api.field_behavior) = OPTIONAL];
   444      }
   445  
   446      // Optional. If any
   447      // [AllowedKeyType][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.AllowedKeyType]
   448      // is specified, then the certificate request's public key must match one of
   449      // the key types listed here. Otherwise, any key may be used.
   450      repeated AllowedKeyType allowed_key_types = 1
   451          [(google.api.field_behavior) = OPTIONAL];
   452  
   453      // Optional. The maximum lifetime allowed for issued
   454      // [Certificates][google.cloud.security.privateca.v1.Certificate]. Note that
   455      // if the issuing
   456      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   457      // expires before a
   458      // [Certificate][google.cloud.security.privateca.v1.Certificate]'s requested
   459      // maximum_lifetime, the effective lifetime will be explicitly truncated to
   460      // match it.
   461      google.protobuf.Duration maximum_lifetime = 2
   462          [(google.api.field_behavior) = OPTIONAL];
   463  
   464      // Optional. If specified, then only methods allowed in the
   465      // [IssuanceModes][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.IssuanceModes]
   466      // may be used to issue
   467      // [Certificates][google.cloud.security.privateca.v1.Certificate].
   468      IssuanceModes allowed_issuance_modes = 3
   469          [(google.api.field_behavior) = OPTIONAL];
   470  
   471      // Optional. A set of X.509 values that will be applied to all certificates
   472      // issued through this [CaPool][google.cloud.security.privateca.v1.CaPool].
   473      // If a certificate request includes conflicting values for the same
   474      // properties, they will be overwritten by the values defined here. If a
   475      // certificate request uses a
   476      // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   477      // that defines conflicting
   478      // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
   479      // for the same properties, the certificate issuance request will fail.
   480      X509Parameters baseline_values = 4 [(google.api.field_behavior) = OPTIONAL];
   481  
   482      // Optional. Describes constraints on identities that may appear in
   483      // [Certificates][google.cloud.security.privateca.v1.Certificate] issued
   484      // through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If this
   485      // is omitted, then this [CaPool][google.cloud.security.privateca.v1.CaPool]
   486      // will not add restrictions on a certificate's identity.
   487      CertificateIdentityConstraints identity_constraints = 5
   488          [(google.api.field_behavior) = OPTIONAL];
   489  
   490      // Optional. Describes the set of X.509 extensions that may appear in a
   491      // [Certificate][google.cloud.security.privateca.v1.Certificate] issued
   492      // through this [CaPool][google.cloud.security.privateca.v1.CaPool]. If a
   493      // certificate request sets extensions that don't appear in the
   494      // [passthrough_extensions][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.passthrough_extensions],
   495      // those extensions will be dropped. If a certificate request uses a
   496      // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   497      // with
   498      // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values]
   499      // that don't appear here, the certificate issuance request will fail. If
   500      // this is omitted, then this
   501      // [CaPool][google.cloud.security.privateca.v1.CaPool] will not add
   502      // restrictions on a certificate's X.509 extensions. These constraints do
   503      // not apply to X.509 extensions set in this
   504      // [CaPool][google.cloud.security.privateca.v1.CaPool]'s
   505      // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values].
   506      CertificateExtensionConstraints passthrough_extensions = 6
   507          [(google.api.field_behavior) = OPTIONAL];
   508    }
   509  
   510    // Output only. The resource name for this
   511    // [CaPool][google.cloud.security.privateca.v1.CaPool] in the format
   512    // `projects/*/locations/*/caPools/*`.
   513    string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
   514  
   515    // Required. Immutable. The
   516    // [Tier][google.cloud.security.privateca.v1.CaPool.Tier] of this
   517    // [CaPool][google.cloud.security.privateca.v1.CaPool].
   518    Tier tier = 2 [
   519      (google.api.field_behavior) = REQUIRED,
   520      (google.api.field_behavior) = IMMUTABLE
   521    ];
   522  
   523    // Optional. The
   524    // [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   525    // to control how
   526    // [Certificates][google.cloud.security.privateca.v1.Certificate] will be
   527    // issued from this [CaPool][google.cloud.security.privateca.v1.CaPool].
   528    IssuancePolicy issuance_policy = 3 [(google.api.field_behavior) = OPTIONAL];
   529  
   530    // Optional. The
   531    // [PublishingOptions][google.cloud.security.privateca.v1.CaPool.PublishingOptions]
   532    // to follow when issuing
   533    // [Certificates][google.cloud.security.privateca.v1.Certificate] from any
   534    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   535    // in this [CaPool][google.cloud.security.privateca.v1.CaPool].
   536    PublishingOptions publishing_options = 4
   537        [(google.api.field_behavior) = OPTIONAL];
   538  
   539    // Optional. Labels with user-defined metadata.
   540    map<string, string> labels = 5 [(google.api.field_behavior) = OPTIONAL];
   541  }
   542  
   543  // A
   544  // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   545  // corresponds to a signed X.509 certificate Revocation List (CRL). A CRL
   546  // contains the serial numbers of certificates that should no longer be trusted.
   547  message CertificateRevocationList {
   548    option (google.api.resource) = {
   549      type: "privateca.googleapis.com/CertificateRevocationList"
   550      pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificateAuthorities/{certificate_authority}/certificateRevocationLists/{certificate_revocation_list}"
   551    };
   552  
   553    // Describes a revoked
   554    // [Certificate][google.cloud.security.privateca.v1.Certificate].
   555    message RevokedCertificate {
   556      // The resource name for the
   557      // [Certificate][google.cloud.security.privateca.v1.Certificate] in the
   558      // format `projects/*/locations/*/caPools/*/certificates/*`.
   559      string certificate = 1 [(google.api.resource_reference) = {
   560        type: "privateca.googleapis.com/Certificate"
   561      }];
   562  
   563      // The serial number of the
   564      // [Certificate][google.cloud.security.privateca.v1.Certificate].
   565      string hex_serial_number = 2;
   566  
   567      // The reason the
   568      // [Certificate][google.cloud.security.privateca.v1.Certificate] was
   569      // revoked.
   570      RevocationReason revocation_reason = 3;
   571    }
   572  
   573    // The state of a
   574    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList],
   575    // indicating if it is current.
   576    enum State {
   577      // Not specified.
   578      STATE_UNSPECIFIED = 0;
   579  
   580      // The
   581      // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   582      // is up to date.
   583      ACTIVE = 1;
   584  
   585      // The
   586      // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   587      // is no longer current.
   588      SUPERSEDED = 2;
   589    }
   590  
   591    // Output only. The resource name for this
   592    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   593    // in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/
   594    //    certificateRevocationLists/*`.
   595    string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
   596  
   597    // Output only. The CRL sequence number that appears in pem_crl.
   598    int64 sequence_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
   599  
   600    // Output only. The revoked serial numbers that appear in pem_crl.
   601    repeated RevokedCertificate revoked_certificates = 3
   602        [(google.api.field_behavior) = OUTPUT_ONLY];
   603  
   604    // Output only. The PEM-encoded X.509 CRL.
   605    string pem_crl = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
   606  
   607    // Output only. The location where 'pem_crl' can be accessed.
   608    string access_url = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
   609  
   610    // Output only. The
   611    // [State][google.cloud.security.privateca.v1.CertificateRevocationList.State]
   612    // for this
   613    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
   614    State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
   615  
   616    // Output only. The time at which this
   617    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   618    // was created.
   619    google.protobuf.Timestamp create_time = 7
   620        [(google.api.field_behavior) = OUTPUT_ONLY];
   621  
   622    // Output only. The time at which this
   623    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList]
   624    // was updated.
   625    google.protobuf.Timestamp update_time = 8
   626        [(google.api.field_behavior) = OUTPUT_ONLY];
   627  
   628    // Output only. The revision ID of this
   629    // [CertificateRevocationList][google.cloud.security.privateca.v1.CertificateRevocationList].
   630    // A new revision is committed whenever a new CRL is published. The format is
   631    // an 8-character hexadecimal string.
   632    string revision_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
   633  
   634    // Optional. Labels with user-defined metadata.
   635    map<string, string> labels = 10 [(google.api.field_behavior) = OPTIONAL];
   636  }
   637  
   638  // A [Certificate][google.cloud.security.privateca.v1.Certificate] corresponds
   639  // to a signed X.509 certificate issued by a
   640  // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   641  message Certificate {
   642    option (google.api.resource) = {
   643      type: "privateca.googleapis.com/Certificate"
   644      pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}/certificates/{certificate}"
   645    };
   646  
   647    // Describes fields that are relavent to the revocation of a
   648    // [Certificate][google.cloud.security.privateca.v1.Certificate].
   649    message RevocationDetails {
   650      // Indicates why a
   651      // [Certificate][google.cloud.security.privateca.v1.Certificate] was
   652      // revoked.
   653      RevocationReason revocation_state = 1;
   654  
   655      // The time at which this
   656      // [Certificate][google.cloud.security.privateca.v1.Certificate] was
   657      // revoked.
   658      google.protobuf.Timestamp revocation_time = 2;
   659    }
   660  
   661    // Output only. The resource name for this
   662    // [Certificate][google.cloud.security.privateca.v1.Certificate] in the format
   663    // `projects/*/locations/*/caPools/*/certificates/*`.
   664    string name = 1 [
   665      (google.api.field_behavior) = OUTPUT_ONLY,
   666      (google.api.resource_reference) = {
   667        type: "privateca.googleapis.com/Certificate"
   668      }
   669    ];
   670  
   671    // The config used to create a signed X.509 certificate.
   672    oneof certificate_config {
   673      // Immutable. A pem-encoded X.509 certificate signing request (CSR).
   674      string pem_csr = 2 [(google.api.field_behavior) = IMMUTABLE];
   675  
   676      // Immutable. A description of the certificate and key that does not require
   677      // X.509 or ASN.1.
   678      CertificateConfig config = 3 [(google.api.field_behavior) = IMMUTABLE];
   679    }
   680  
   681    // Output only. The resource name of the issuing
   682    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   683    // in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
   684    string issuer_certificate_authority = 4 [
   685      (google.api.field_behavior) = OUTPUT_ONLY,
   686      (google.api.resource_reference) = {
   687        type: "privateca.googleapis.com/CertificateAuthority"
   688      }
   689    ];
   690  
   691    // Required. Immutable. The desired lifetime of a certificate. Used to create
   692    // the "not_before_time" and "not_after_time" fields inside an X.509
   693    // certificate. Note that the lifetime may be truncated if it would extend
   694    // past the life of any certificate authority in the issuing chain.
   695    google.protobuf.Duration lifetime = 5 [
   696      (google.api.field_behavior) = REQUIRED,
   697      (google.api.field_behavior) = IMMUTABLE
   698    ];
   699  
   700    // Immutable. The resource name for a
   701    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   702    // used to issue this certificate, in the format
   703    // `projects/*/locations/*/certificateTemplates/*`.
   704    // If this is specified, the caller must have the necessary permission to
   705    // use this template. If this is omitted, no template will be used.
   706    // This template must be in the same location as the
   707    // [Certificate][google.cloud.security.privateca.v1.Certificate].
   708    string certificate_template = 6 [
   709      (google.api.field_behavior) = IMMUTABLE,
   710      (google.api.resource_reference) = {
   711        type: "privateca.googleapis.com/CertificateTemplate"
   712      }
   713    ];
   714  
   715    // Immutable. Specifies how the
   716    // [Certificate][google.cloud.security.privateca.v1.Certificate]'s identity
   717    // fields are to be decided. If this is omitted, the `DEFAULT` subject mode
   718    // will be used.
   719    SubjectRequestMode subject_mode = 7 [(google.api.field_behavior) = IMMUTABLE];
   720  
   721    // Output only. Details regarding the revocation of this
   722    // [Certificate][google.cloud.security.privateca.v1.Certificate]. This
   723    // [Certificate][google.cloud.security.privateca.v1.Certificate] is considered
   724    // revoked if and only if this field is present.
   725    RevocationDetails revocation_details = 8
   726        [(google.api.field_behavior) = OUTPUT_ONLY];
   727  
   728    // Output only. The pem-encoded, signed X.509 certificate.
   729    string pem_certificate = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
   730  
   731    // Output only. A structured description of the issued X.509 certificate.
   732    CertificateDescription certificate_description = 10
   733        [(google.api.field_behavior) = OUTPUT_ONLY];
   734  
   735    // Output only. The chain that may be used to verify the X.509 certificate.
   736    // Expected to be in issuer-to-root order according to RFC 5246.
   737    repeated string pem_certificate_chain = 11
   738        [(google.api.field_behavior) = OUTPUT_ONLY];
   739  
   740    // Output only. The time at which this
   741    // [Certificate][google.cloud.security.privateca.v1.Certificate] was created.
   742    google.protobuf.Timestamp create_time = 12
   743        [(google.api.field_behavior) = OUTPUT_ONLY];
   744  
   745    // Output only. The time at which this
   746    // [Certificate][google.cloud.security.privateca.v1.Certificate] was updated.
   747    google.protobuf.Timestamp update_time = 13
   748        [(google.api.field_behavior) = OUTPUT_ONLY];
   749  
   750    // Optional. Labels with user-defined metadata.
   751    map<string, string> labels = 14 [(google.api.field_behavior) = OPTIONAL];
   752  }
   753  
   754  // A
   755  // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   756  // refers to a managed template for certificate issuance.
   757  message CertificateTemplate {
   758    option (google.api.resource) = {
   759      type: "privateca.googleapis.com/CertificateTemplate"
   760      pattern: "projects/{project}/locations/{location}/certificateTemplates/{certificate_template}"
   761    };
   762  
   763    // Output only. The resource name for this
   764    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   765    // in the format `projects/*/locations/*/certificateTemplates/*`.
   766    string name = 1 [
   767      (google.api.field_behavior) = OUTPUT_ONLY,
   768      (google.api.resource_reference) = {
   769        type: "privateca.googleapis.com/CertificateTemplate"
   770      }
   771    ];
   772  
   773    // Optional. A set of X.509 values that will be applied to all issued
   774    // certificates that use this template. If the certificate request includes
   775    // conflicting values for the same properties, they will be overwritten by the
   776    // values defined here. If the issuing
   777    // [CaPool][google.cloud.security.privateca.v1.CaPool]'s
   778    // [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   779    // defines conflicting
   780    // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values]
   781    // for the same properties, the certificate issuance request will fail.
   782    X509Parameters predefined_values = 2 [(google.api.field_behavior) = OPTIONAL];
   783  
   784    // Optional. Describes constraints on identities that may be appear in
   785    // [Certificates][google.cloud.security.privateca.v1.Certificate] issued using
   786    // this template. If this is omitted, then this template will not add
   787    // restrictions on a certificate's identity.
   788    CertificateIdentityConstraints identity_constraints = 3
   789        [(google.api.field_behavior) = OPTIONAL];
   790  
   791    // Optional. Describes the set of X.509 extensions that may appear in a
   792    // [Certificate][google.cloud.security.privateca.v1.Certificate] issued using
   793    // this
   794    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate].
   795    // If a certificate request sets extensions that don't appear in the
   796    // [passthrough_extensions][google.cloud.security.privateca.v1.CertificateTemplate.passthrough_extensions],
   797    // those extensions will be dropped. If the issuing
   798    // [CaPool][google.cloud.security.privateca.v1.CaPool]'s
   799    // [IssuancePolicy][google.cloud.security.privateca.v1.CaPool.IssuancePolicy]
   800    // defines
   801    // [baseline_values][google.cloud.security.privateca.v1.CaPool.IssuancePolicy.baseline_values]
   802    // that don't appear here, the certificate issuance request will fail. If this
   803    // is omitted, then this template will not add restrictions on a certificate's
   804    // X.509 extensions. These constraints do not apply to X.509 extensions set in
   805    // this
   806    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]'s
   807    // [predefined_values][google.cloud.security.privateca.v1.CertificateTemplate.predefined_values].
   808    CertificateExtensionConstraints passthrough_extensions = 4
   809        [(google.api.field_behavior) = OPTIONAL];
   810  
   811    // Optional. A human-readable description of scenarios this template is
   812    // intended for.
   813    string description = 5 [(google.api.field_behavior) = OPTIONAL];
   814  
   815    // Output only. The time at which this
   816    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   817    // was created.
   818    google.protobuf.Timestamp create_time = 6
   819        [(google.api.field_behavior) = OUTPUT_ONLY];
   820  
   821    // Output only. The time at which this
   822    // [CertificateTemplate][google.cloud.security.privateca.v1.CertificateTemplate]
   823    // was updated.
   824    google.protobuf.Timestamp update_time = 7
   825        [(google.api.field_behavior) = OUTPUT_ONLY];
   826  
   827    // Optional. Labels with user-defined metadata.
   828    map<string, string> labels = 8 [(google.api.field_behavior) = OPTIONAL];
   829  }
   830  
   831  // An [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] is
   832  // used to describe certain fields of an X.509 certificate, such as the key
   833  // usage fields, fields specific to CA certificates, certificate policy
   834  // extensions and custom extensions.
   835  message X509Parameters {
   836    // Describes values that are relevant in a CA certificate.
   837    message CaOptions {
   838      // Optional. Refers to the "CA" X.509 extension, which is a boolean value.
   839      // When this value is missing, the extension will be omitted from the CA
   840      // certificate.
   841      optional bool is_ca = 1 [(google.api.field_behavior) = OPTIONAL];
   842  
   843      // Optional. Refers to the path length restriction X.509 extension. For a CA
   844      // certificate, this value describes the depth of subordinate CA
   845      // certificates that are allowed.
   846      // If this value is less than 0, the request will fail.
   847      // If this value is missing, the max path length will be omitted from the
   848      // CA certificate.
   849      optional int32 max_issuer_path_length = 2
   850          [(google.api.field_behavior) = OPTIONAL];
   851    }
   852  
   853    // Describes the X.509 name constraints extension, per
   854    // https://tools.ietf.org/html/rfc5280#section-4.2.1.10
   855    message NameConstraints {
   856      // Indicates whether or not the name constraints are marked critical.
   857      bool critical = 1;
   858  
   859      // Contains permitted DNS names. Any DNS name that can be
   860      // constructed by simply adding zero or more labels to
   861      // the left-hand side of the name satisfies the name constraint.
   862      // For example, `example.com`, `www.example.com`, `www.sub.example.com`
   863      // would satisfy `example.com` while `example1.com` does not.
   864      repeated string permitted_dns_names = 2;
   865  
   866      // Contains excluded DNS names. Any DNS name that can be
   867      // constructed by simply adding zero or more labels to
   868      // the left-hand side of the name satisfies the name constraint.
   869      // For example, `example.com`, `www.example.com`, `www.sub.example.com`
   870      // would satisfy `example.com` while `example1.com` does not.
   871      repeated string excluded_dns_names = 3;
   872  
   873      // Contains the permitted IP ranges. For IPv4 addresses, the ranges
   874      // are expressed using CIDR notation as specified in RFC 4632.
   875      // For IPv6 addresses, the ranges are expressed in similar encoding as IPv4
   876      // addresses.
   877      repeated string permitted_ip_ranges = 4;
   878  
   879      // Contains the excluded IP ranges. For IPv4 addresses, the ranges
   880      // are expressed using CIDR notation as specified in RFC 4632.
   881      // For IPv6 addresses, the ranges are expressed in similar encoding as IPv4
   882      // addresses.
   883      repeated string excluded_ip_ranges = 5;
   884  
   885      // Contains the permitted email addresses. The value can be a particular
   886      // email address, a hostname to indicate all email addresses on that host or
   887      // a domain with a leading period (e.g. `.example.com`) to indicate
   888      // all email addresses in that domain.
   889      repeated string permitted_email_addresses = 6;
   890  
   891      // Contains the excluded email addresses. The value can be a particular
   892      // email address, a hostname to indicate all email addresses on that host or
   893      // a domain with a leading period (e.g. `.example.com`) to indicate
   894      // all email addresses in that domain.
   895      repeated string excluded_email_addresses = 7;
   896  
   897      // Contains the permitted URIs that apply to the host part of the name.
   898      // The value can be a hostname or a domain with a
   899      // leading period (like `.example.com`)
   900      repeated string permitted_uris = 8;
   901  
   902      // Contains the excluded URIs that apply to the host part of the name.
   903      // The value can be a hostname or a domain with a
   904      // leading period (like `.example.com`)
   905      repeated string excluded_uris = 9;
   906    }
   907  
   908    // Optional. Indicates the intended use for keys that correspond to a
   909    // certificate.
   910    KeyUsage key_usage = 1 [(google.api.field_behavior) = OPTIONAL];
   911  
   912    // Optional. Describes options in this
   913    // [X509Parameters][google.cloud.security.privateca.v1.X509Parameters] that
   914    // are relevant in a CA certificate.
   915    CaOptions ca_options = 2 [(google.api.field_behavior) = OPTIONAL];
   916  
   917    // Optional. Describes the X.509 certificate policy object identifiers, per
   918    // https://tools.ietf.org/html/rfc5280#section-4.2.1.4.
   919    repeated ObjectId policy_ids = 3 [(google.api.field_behavior) = OPTIONAL];
   920  
   921    // Optional. Describes Online Certificate Status Protocol (OCSP) endpoint
   922    // addresses that appear in the "Authority Information Access" extension in
   923    // the certificate.
   924    repeated string aia_ocsp_servers = 4 [(google.api.field_behavior) = OPTIONAL];
   925  
   926    // Optional. Describes the X.509 name constraints extension.
   927    NameConstraints name_constraints = 6 [(google.api.field_behavior) = OPTIONAL];
   928  
   929    // Optional. Describes custom X.509 extensions.
   930    repeated X509Extension additional_extensions = 5
   931        [(google.api.field_behavior) = OPTIONAL];
   932  }
   933  
   934  // Describes a subordinate CA's issuers. This is either a resource name to a
   935  // known issuing
   936  // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   937  // or a PEM issuer certificate chain.
   938  message SubordinateConfig {
   939    // This message describes a subordinate CA's issuer certificate chain. This
   940    // wrapper exists for compatibility reasons.
   941    message SubordinateConfigChain {
   942      // Required. Expected to be in leaf-to-root order according to RFC 5246.
   943      repeated string pem_certificates = 1
   944          [(google.api.field_behavior) = REQUIRED];
   945    }
   946  
   947    oneof subordinate_config {
   948      // Required. This can refer to a
   949      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
   950      // that was used to create a subordinate
   951      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority].
   952      // This field is used for information and usability purposes only. The
   953      // resource name is in the format
   954      // `projects/*/locations/*/caPools/*/certificateAuthorities/*`.
   955      string certificate_authority = 1 [
   956        (google.api.field_behavior) = REQUIRED,
   957        (google.api.resource_reference) = {
   958          type: "privateca.googleapis.com/CertificateAuthority"
   959        }
   960      ];
   961  
   962      // Required. Contains the PEM certificate chain for the issuers of this
   963      // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority],
   964      // but not pem certificate for this CA itself.
   965      SubordinateConfigChain pem_issuer_chain = 2
   966          [(google.api.field_behavior) = REQUIRED];
   967    }
   968  }
   969  
   970  // A [PublicKey][google.cloud.security.privateca.v1.PublicKey] describes a
   971  // public key.
   972  message PublicKey {
   973    // Types of public keys formats that are supported. Currently, only `PEM`
   974    // format is supported.
   975    enum KeyFormat {
   976      // Default unspecified value.
   977      KEY_FORMAT_UNSPECIFIED = 0;
   978  
   979      // The key is PEM-encoded as defined in [RFC
   980      // 7468](https://tools.ietf.org/html/rfc7468). It can be any of the
   981      // following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey
   982      // structure, an RFC 5280
   983      // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
   984      // or a PEM-encoded X.509 certificate signing request (CSR). If a
   985      // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
   986      // is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey
   987      // or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified,
   988      // it will used solely for the purpose of extracting the public key. When
   989      // generated by the service, it will always be an RFC 5280
   990      // [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1)
   991      // structure containing an algorithm identifier and a key.
   992      PEM = 1;
   993    }
   994  
   995    // Required. A public key. The padding and encoding
   996    // must match with the `KeyFormat` value specified for the `format` field.
   997    bytes key = 1 [(google.api.field_behavior) = REQUIRED];
   998  
   999    // Required. The format of the public key.
  1000    KeyFormat format = 2 [(google.api.field_behavior) = REQUIRED];
  1001  }
  1002  
  1003  // A [CertificateConfig][google.cloud.security.privateca.v1.CertificateConfig]
  1004  // describes an X.509 certificate or CSR that is to be created, as an
  1005  // alternative to using ASN.1.
  1006  message CertificateConfig {
  1007    // These values are used to create the distinguished name and subject
  1008    // alternative name fields in an X.509 certificate.
  1009    message SubjectConfig {
  1010      // Required. Contains distinguished name fields such as the common name,
  1011      // location and organization.
  1012      Subject subject = 1 [(google.api.field_behavior) = REQUIRED];
  1013  
  1014      // Optional. The subject alternative name fields.
  1015      SubjectAltNames subject_alt_name = 2
  1016          [(google.api.field_behavior) = OPTIONAL];
  1017    }
  1018  
  1019    // Required. Specifies some of the values in a certificate that are related to
  1020    // the subject.
  1021    SubjectConfig subject_config = 1 [(google.api.field_behavior) = REQUIRED];
  1022  
  1023    // Required. Describes how some of the technical X.509 fields in a certificate
  1024    // should be populated.
  1025    X509Parameters x509_config = 2 [(google.api.field_behavior) = REQUIRED];
  1026  
  1027    // Optional. The public key that corresponds to this config. This is, for
  1028    // example, used when issuing
  1029    // [Certificates][google.cloud.security.privateca.v1.Certificate], but not
  1030    // when creating a self-signed
  1031    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  1032    // or
  1033    // [CertificateAuthority][google.cloud.security.privateca.v1.CertificateAuthority]
  1034    // CSR.
  1035    PublicKey public_key = 3 [(google.api.field_behavior) = OPTIONAL];
  1036  }
  1037  
  1038  // A
  1039  // [CertificateDescription][google.cloud.security.privateca.v1.CertificateDescription]
  1040  // describes an X.509 certificate or CSR that has been issued, as an alternative
  1041  // to using ASN.1 / X.509.
  1042  message CertificateDescription {
  1043    // These values describe fields in an issued X.509 certificate such as the
  1044    // distinguished name, subject alternative names, serial number, and lifetime.
  1045    message SubjectDescription {
  1046      // Contains distinguished name fields such as the common name, location and
  1047      // / organization.
  1048      Subject subject = 1;
  1049  
  1050      // The subject alternative name fields.
  1051      SubjectAltNames subject_alt_name = 2;
  1052  
  1053      // The serial number encoded in lowercase hexadecimal.
  1054      string hex_serial_number = 3;
  1055  
  1056      // For convenience, the actual lifetime of an issued certificate.
  1057      google.protobuf.Duration lifetime = 4;
  1058  
  1059      // The time at which the certificate becomes valid.
  1060      google.protobuf.Timestamp not_before_time = 5;
  1061  
  1062      // The time after which the certificate is expired.
  1063      // Per RFC 5280, the validity period for a certificate is the period of time
  1064      // from not_before_time through not_after_time, inclusive.
  1065      // Corresponds to 'not_before_time' + 'lifetime' - 1 second.
  1066      google.protobuf.Timestamp not_after_time = 6;
  1067    }
  1068  
  1069    // A KeyId identifies a specific public key, usually by hashing the public
  1070    // key.
  1071    message KeyId {
  1072      // Optional. The value of this KeyId encoded in lowercase hexadecimal. This
  1073      // is most likely the 160 bit SHA-1 hash of the public key.
  1074      string key_id = 1 [(google.api.field_behavior) = OPTIONAL];
  1075    }
  1076  
  1077    // A group of fingerprints for the x509 certificate.
  1078    message CertificateFingerprint {
  1079      // The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.
  1080      string sha256_hash = 1;
  1081    }
  1082  
  1083    // Describes some of the values in a certificate that are related to the
  1084    // subject and lifetime.
  1085    SubjectDescription subject_description = 1;
  1086  
  1087    // Describes some of the technical X.509 fields in a certificate.
  1088    X509Parameters x509_description = 2;
  1089  
  1090    // The public key that corresponds to an issued certificate.
  1091    PublicKey public_key = 3;
  1092  
  1093    // Provides a means of identifiying certificates that contain a particular
  1094    // public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2.
  1095    KeyId subject_key_id = 4;
  1096  
  1097    // Identifies the subject_key_id of the parent certificate, per
  1098    // https://tools.ietf.org/html/rfc5280#section-4.2.1.1
  1099    KeyId authority_key_id = 5;
  1100  
  1101    // Describes a list of locations to obtain CRL information, i.e.
  1102    // the DistributionPoint.fullName described by
  1103    // https://tools.ietf.org/html/rfc5280#section-4.2.1.13
  1104    repeated string crl_distribution_points = 6;
  1105  
  1106    // Describes lists of issuer CA certificate URLs that appear in the
  1107    // "Authority Information Access" extension in the certificate.
  1108    repeated string aia_issuing_certificate_urls = 7;
  1109  
  1110    // The hash of the x.509 certificate.
  1111    CertificateFingerprint cert_fingerprint = 8;
  1112  }
  1113  
  1114  // An [ObjectId][google.cloud.security.privateca.v1.ObjectId] specifies an
  1115  // object identifier (OID). These provide context and describe types in ASN.1
  1116  // messages.
  1117  message ObjectId {
  1118    // Required. The parts of an OID path. The most significant parts of the path
  1119    // come first.
  1120    repeated int32 object_id_path = 1 [(google.api.field_behavior) = REQUIRED];
  1121  }
  1122  
  1123  // An [X509Extension][google.cloud.security.privateca.v1.X509Extension]
  1124  // specifies an X.509 extension, which may be used in different parts of X.509
  1125  // objects like certificates, CSRs, and CRLs.
  1126  message X509Extension {
  1127    // Required. The OID for this X.509 extension.
  1128    ObjectId object_id = 1 [(google.api.field_behavior) = REQUIRED];
  1129  
  1130    // Optional. Indicates whether or not this extension is critical (i.e., if the
  1131    // client does not know how to handle this extension, the client should
  1132    // consider this to be an error).
  1133    bool critical = 2 [(google.api.field_behavior) = OPTIONAL];
  1134  
  1135    // Required. The value of this X.509 extension.
  1136    bytes value = 3 [(google.api.field_behavior) = REQUIRED];
  1137  }
  1138  
  1139  // A [KeyUsage][google.cloud.security.privateca.v1.KeyUsage] describes key usage
  1140  // values that may appear in an X.509 certificate.
  1141  message KeyUsage {
  1142    // [KeyUsage.KeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.KeyUsageOptions]
  1143    // corresponds to the key usage values described in
  1144    // https://tools.ietf.org/html/rfc5280#section-4.2.1.3.
  1145    message KeyUsageOptions {
  1146      // The key may be used for digital signatures.
  1147      bool digital_signature = 1;
  1148  
  1149      // The key may be used for cryptographic commitments. Note that this may
  1150      // also be referred to as "non-repudiation".
  1151      bool content_commitment = 2;
  1152  
  1153      // The key may be used to encipher other keys.
  1154      bool key_encipherment = 3;
  1155  
  1156      // The key may be used to encipher data.
  1157      bool data_encipherment = 4;
  1158  
  1159      // The key may be used in a key agreement protocol.
  1160      bool key_agreement = 5;
  1161  
  1162      // The key may be used to sign certificates.
  1163      bool cert_sign = 6;
  1164  
  1165      // The key may be used sign certificate revocation lists.
  1166      bool crl_sign = 7;
  1167  
  1168      // The key may be used to encipher only.
  1169      bool encipher_only = 8;
  1170  
  1171      // The key may be used to decipher only.
  1172      bool decipher_only = 9;
  1173    }
  1174  
  1175    // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions]
  1176    // has fields that correspond to certain common OIDs that could be specified
  1177    // as an extended key usage value.
  1178    message ExtendedKeyUsageOptions {
  1179      // Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as "TLS WWW
  1180      // server authentication", though regularly used for non-WWW TLS.
  1181      bool server_auth = 1;
  1182  
  1183      // Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as "TLS WWW
  1184      // client authentication", though regularly used for non-WWW TLS.
  1185      bool client_auth = 2;
  1186  
  1187      // Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as "Signing of
  1188      // downloadable executable code client authentication".
  1189      bool code_signing = 3;
  1190  
  1191      // Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as "Email
  1192      // protection".
  1193      bool email_protection = 4;
  1194  
  1195      // Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as "Binding
  1196      // the hash of an object to a time".
  1197      bool time_stamping = 5;
  1198  
  1199      // Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as "Signing
  1200      // OCSP responses".
  1201      bool ocsp_signing = 6;
  1202    }
  1203  
  1204    // Describes high-level ways in which a key may be used.
  1205    KeyUsageOptions base_key_usage = 1;
  1206  
  1207    // Detailed scenarios in which a key may be used.
  1208    ExtendedKeyUsageOptions extended_key_usage = 2;
  1209  
  1210    // Used to describe extended key usages that are not listed in the
  1211    // [KeyUsage.ExtendedKeyUsageOptions][google.cloud.security.privateca.v1.KeyUsage.ExtendedKeyUsageOptions]
  1212    // message.
  1213    repeated ObjectId unknown_extended_key_usages = 3;
  1214  }
  1215  
  1216  // [Subject][google.cloud.security.privateca.v1.Subject] describes parts of a
  1217  // distinguished name that, in turn, describes the subject of the certificate.
  1218  message Subject {
  1219    // The "common name" of the subject.
  1220    string common_name = 1;
  1221  
  1222    // The country code of the subject.
  1223    string country_code = 2;
  1224  
  1225    // The organization of the subject.
  1226    string organization = 3;
  1227  
  1228    // The organizational_unit of the subject.
  1229    string organizational_unit = 4;
  1230  
  1231    // The locality or city of the subject.
  1232    string locality = 5;
  1233  
  1234    // The province, territory, or regional state of the subject.
  1235    string province = 6;
  1236  
  1237    // The street address of the subject.
  1238    string street_address = 7;
  1239  
  1240    // The postal code of the subject.
  1241    string postal_code = 8;
  1242  }
  1243  
  1244  // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames]
  1245  // corresponds to a more modern way of listing what the asserted identity is in
  1246  // a certificate (i.e., compared to the "common name" in the distinguished
  1247  // name).
  1248  message SubjectAltNames {
  1249    // Contains only valid, fully-qualified host names.
  1250    repeated string dns_names = 1;
  1251  
  1252    // Contains only valid RFC 3986 URIs.
  1253    repeated string uris = 2;
  1254  
  1255    // Contains only valid RFC 2822 E-mail addresses.
  1256    repeated string email_addresses = 3;
  1257  
  1258    // Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.
  1259    repeated string ip_addresses = 4;
  1260  
  1261    // Contains additional subject alternative name values.
  1262    // For each custom_san, the `value` field must contain an ASN.1 encoded
  1263    // UTF8String.
  1264    repeated X509Extension custom_sans = 5;
  1265  }
  1266  
  1267  // Describes constraints on a
  1268  // [Certificate][google.cloud.security.privateca.v1.Certificate]'s
  1269  // [Subject][google.cloud.security.privateca.v1.Subject] and
  1270  // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames].
  1271  message CertificateIdentityConstraints {
  1272    // Optional. A CEL expression that may be used to validate the resolved X.509
  1273    // Subject and/or Subject Alternative Name before a certificate is signed. To
  1274    // see the full allowed syntax and some examples, see
  1275    // https://cloud.google.com/certificate-authority-service/docs/using-cel
  1276    google.type.Expr cel_expression = 1 [(google.api.field_behavior) = OPTIONAL];
  1277  
  1278    // Required. If this is true, the
  1279    // [Subject][google.cloud.security.privateca.v1.Subject] field may be copied
  1280    // from a certificate request into the signed certificate. Otherwise, the
  1281    // requested [Subject][google.cloud.security.privateca.v1.Subject] will be
  1282    // discarded.
  1283    optional bool allow_subject_passthrough = 2
  1284        [(google.api.field_behavior) = REQUIRED];
  1285  
  1286    // Required. If this is true, the
  1287    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames]
  1288    // extension may be copied from a certificate request into the signed
  1289    // certificate. Otherwise, the requested
  1290    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will
  1291    // be discarded.
  1292    optional bool allow_subject_alt_names_passthrough = 3
  1293        [(google.api.field_behavior) = REQUIRED];
  1294  }
  1295  
  1296  // Describes a set of X.509 extensions that may be part of some certificate
  1297  // issuance controls.
  1298  message CertificateExtensionConstraints {
  1299    // Describes well-known X.509 extensions that can appear in a
  1300    // [Certificate][google.cloud.security.privateca.v1.Certificate], not
  1301    // including the
  1302    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames]
  1303    // extension.
  1304    enum KnownCertificateExtension {
  1305      // Not specified.
  1306      KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED = 0;
  1307  
  1308      // Refers to a certificate's Key Usage extension, as described in [RFC 5280
  1309      // section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3).
  1310      // This corresponds to the
  1311      // [KeyUsage.base_key_usage][google.cloud.security.privateca.v1.KeyUsage.base_key_usage]
  1312      // field.
  1313      BASE_KEY_USAGE = 1;
  1314  
  1315      // Refers to a certificate's Extended Key Usage extension, as described in
  1316      // [RFC 5280
  1317      // section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12).
  1318      // This corresponds to the
  1319      // [KeyUsage.extended_key_usage][google.cloud.security.privateca.v1.KeyUsage.extended_key_usage]
  1320      // message.
  1321      EXTENDED_KEY_USAGE = 2;
  1322  
  1323      // Refers to a certificate's Basic Constraints extension, as described in
  1324      // [RFC 5280
  1325      // section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9).
  1326      // This corresponds to the
  1327      // [X509Parameters.ca_options][google.cloud.security.privateca.v1.X509Parameters.ca_options]
  1328      // field.
  1329      CA_OPTIONS = 3;
  1330  
  1331      // Refers to a certificate's Policy object identifiers, as described in
  1332      // [RFC 5280
  1333      // section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4).
  1334      // This corresponds to the
  1335      // [X509Parameters.policy_ids][google.cloud.security.privateca.v1.X509Parameters.policy_ids]
  1336      // field.
  1337      POLICY_IDS = 4;
  1338  
  1339      // Refers to OCSP servers in a certificate's Authority Information Access
  1340      // extension, as described in
  1341      // [RFC 5280
  1342      // section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1),
  1343      // This corresponds to the
  1344      // [X509Parameters.aia_ocsp_servers][google.cloud.security.privateca.v1.X509Parameters.aia_ocsp_servers]
  1345      // field.
  1346      AIA_OCSP_SERVERS = 5;
  1347  
  1348      // Refers to Name Constraints extension as described in
  1349      // [RFC 5280
  1350      // section 4.2.1.10](https://tools.ietf.org/html/rfc5280#section-4.2.1.10)
  1351      NAME_CONSTRAINTS = 6;
  1352    }
  1353  
  1354    // Optional. A set of named X.509 extensions. Will be combined with
  1355    // [additional_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.additional_extensions]
  1356    // to determine the full set of X.509 extensions.
  1357    repeated KnownCertificateExtension known_extensions = 1
  1358        [(google.api.field_behavior) = OPTIONAL];
  1359  
  1360    // Optional. A set of [ObjectIds][google.cloud.security.privateca.v1.ObjectId]
  1361    // identifying custom X.509 extensions. Will be combined with
  1362    // [known_extensions][google.cloud.security.privateca.v1.CertificateExtensionConstraints.known_extensions]
  1363    // to determine the full set of X.509 extensions.
  1364    repeated ObjectId additional_extensions = 2
  1365        [(google.api.field_behavior) = OPTIONAL];
  1366  }
  1367  
  1368  // A [RevocationReason][google.cloud.security.privateca.v1.RevocationReason]
  1369  // indicates whether a
  1370  // [Certificate][google.cloud.security.privateca.v1.Certificate] has been
  1371  // revoked, and the reason for revocation. These correspond to standard
  1372  // revocation reasons from RFC 5280. Note that the enum labels and values in
  1373  // this definition are not the same ASN.1 values defined in RFC 5280. These
  1374  // values will be translated to the correct ASN.1 values when a CRL is created.
  1375  enum RevocationReason {
  1376    // Default unspecified value. This value does indicate that a
  1377    // [Certificate][google.cloud.security.privateca.v1.Certificate] has been
  1378    // revoked, but that a reason has not been recorded.
  1379    REVOCATION_REASON_UNSPECIFIED = 0;
  1380  
  1381    // Key material for this
  1382    // [Certificate][google.cloud.security.privateca.v1.Certificate] may have
  1383    // leaked.
  1384    KEY_COMPROMISE = 1;
  1385  
  1386    // The key material for a certificate authority in the issuing path may have
  1387    // leaked.
  1388    CERTIFICATE_AUTHORITY_COMPROMISE = 2;
  1389  
  1390    // The subject or other attributes in this
  1391    // [Certificate][google.cloud.security.privateca.v1.Certificate] have changed.
  1392    AFFILIATION_CHANGED = 3;
  1393  
  1394    // This [Certificate][google.cloud.security.privateca.v1.Certificate] has been
  1395    // superseded.
  1396    SUPERSEDED = 4;
  1397  
  1398    // This [Certificate][google.cloud.security.privateca.v1.Certificate] or
  1399    // entities in the issuing path have ceased to operate.
  1400    CESSATION_OF_OPERATION = 5;
  1401  
  1402    // This [Certificate][google.cloud.security.privateca.v1.Certificate] should
  1403    // not be considered valid, it is expected that it may become valid in the
  1404    // future.
  1405    CERTIFICATE_HOLD = 6;
  1406  
  1407    // This [Certificate][google.cloud.security.privateca.v1.Certificate] no
  1408    // longer has permission to assert the listed attributes.
  1409    PRIVILEGE_WITHDRAWN = 7;
  1410  
  1411    // The authority which determines appropriate attributes for a
  1412    // [Certificate][google.cloud.security.privateca.v1.Certificate] may have been
  1413    // compromised.
  1414    ATTRIBUTE_AUTHORITY_COMPROMISE = 8;
  1415  }
  1416  
  1417  // Describes the way in which a
  1418  // [Certificate][google.cloud.security.privateca.v1.Certificate]'s
  1419  // [Subject][google.cloud.security.privateca.v1.Subject] and/or
  1420  // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] will be
  1421  // resolved.
  1422  enum SubjectRequestMode {
  1423    // Not specified.
  1424    SUBJECT_REQUEST_MODE_UNSPECIFIED = 0;
  1425  
  1426    // The default mode used in most cases. Indicates that the certificate's
  1427    // [Subject][google.cloud.security.privateca.v1.Subject] and/or
  1428    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] are
  1429    // specified in the certificate request. This mode requires the caller to have
  1430    // the `privateca.certificates.create` permission.
  1431    DEFAULT = 1;
  1432  
  1433    // A mode reserved for special cases. Indicates that the certificate should
  1434    // have one SPIFFE
  1435    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] set
  1436    // by the service based on the caller's identity. This mode will ignore any
  1437    // explicitly specified [Subject][google.cloud.security.privateca.v1.Subject]
  1438    // and/or
  1439    // [SubjectAltNames][google.cloud.security.privateca.v1.SubjectAltNames] in
  1440    // the certificate request. This mode requires the caller to have the
  1441    // `privateca.certificates.createForSelf` permission.
  1442    REFLECTED_SPIFFE = 2;
  1443  }