使用自定义限制条件管理 CA 服务资源

本页面介绍了如何使用组织政策服务自定义限制条件来限制对以下 Google Cloud 资源执行的特定操作:

  • privateca.googleapis.com/CaPool
  • privateca.googleapis.com/CertificateAuthority
  • privateca.googleapis.com/CertificateTemplate

如需详细了解组织政策,请参阅自定义组织政策

组织政策和限制条件简介

借助 Google Cloud 组织政策服务,您可以对组织的资源进行程序化集中控制。作为组织政策管理员,您可以定义组织政策,这是一组称为限制条件的限制,会应用于 Google Cloud 资源层次结构中的Google Cloud 资源及其后代。您可以在组织、文件夹或项目级强制执行组织政策。

组织政策为各种 Google Cloud 服务提供内置的托管式限制。但是,如果您想要更精细地控制和自定义组织政策中受限的特定字段,还可以创建自定义限制条件并在组织政策中使用这些自定义限制条件。

政策继承

如果您对资源强制执行政策,默认情况下,该资源的后代会继承组织政策。例如,如果您对某个文件夹强制执行一项政策, Google Cloud 会对该文件夹中的所有项目强制执行该政策。如需详细了解此行为及其更改方式,请参阅层次结构评估规则

准备工作

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Install the Google Cloud CLI.

  5. 如果您使用的是外部身份提供方 (IdP),则必须先使用联合身份登录 gcloud CLI

  6. 如需初始化 gcloud CLI,请运行以下命令:

    gcloud init
  7. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  8. Verify that billing is enabled for your Google Cloud project.

  9. Install the Google Cloud CLI.

  10. 如果您使用的是外部身份提供方 (IdP),则必须先使用联合身份登录 gcloud CLI

  11. 如需初始化 gcloud CLI,请运行以下命令:

    gcloud init
  12. 请确保您知道您的组织 ID
  13. 所需的角色

    如需获得管理自定义组织政策所需的权限,请让您的管理员为您授予组织资源的 Organization Policy Administrator (roles/orgpolicy.policyAdmin) IAM 角色。 如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

    您也可以通过自定义角色或其他预定义角色来获取所需的权限。

    设置自定义限制条件

    自定义限制条件是在 YAML 文件中,由实施组织政策的服务所支持的资源、方法、条件和操作定义的。自定义限制条件的条件使用通用表达式语言 (CEL) 进行定义。如需详细了解如何使用 CEL 构建自定义限制条件中的条件,请参阅创建和管理自定义限制条件的 CEL 部分。

    控制台

    如需创建自定义限制条件,请执行以下操作:

    1. 在 Google Cloud 控制台中,转到组织政策页面。

      转到组织政策

    2. 在项目选择器中,选择要为其设置组织政策的项目。
    3. 点击 自定义限制条件
    4. 显示名称框中,为限制条件输入一个人类可读名称。此名称会在错误消息中使用,并可用于识别和调试用途。请勿在显示名称中使用个人身份信息或敏感数据,因为此名称可能会在错误消息中公开。此字段最多可包含 200 个字符。
    5. 限制条件 ID 框中,为新的自定义限制条件输入所需的名称。自定义限制条件只能包含字母(包括大写和小写)或数字,例如 custom.disableGkeAutoUpgrade。此字段最多可包含 70 个字符,不计算前缀 (custom.),例如 organizations/123456789/customConstraints/custom。请勿在限制条件 ID 中包含个人身份信息或敏感数据,因为该 ID 可能会在错误消息中公开。
    6. 说明框中,输入人类可读的限制条件说明。当违反政策时,此说明将用作错误消息。请包含有关发生违规的原因以及如何解决违规问题的详细信息。请勿在说明中包含个人身份信息或敏感数据,因为该说明可能会在错误消息中公开。 此字段最多可包含 2000 个字符。
    7. 资源类型框中,选择包含要限制的对象和字段的 Google Cloud REST 资源的名称,例如 container.googleapis.com/NodePool。大多数资源类型最多支持 20 个自定义限制条件。如果您尝试创建更多自定义限制条件,操作将会失败。
    8. 强制执行方法下,选择是对 REST CREATE 方法强制执行限制条件,还是同时对 CREATEUPDATE 方法强制执行限制条件。如果您对违反限制条件的资源使用 UPDATE 方法强制执行限制条件,除非更改解决了违规问题,否则组织政策会阻止对该资源的更改。
    9. 并非所有 Google Cloud 服务都支持这两种方法。如需查看每种服务支持的方法,请在支持的服务中找到相应服务。

    10. 如需定义条件,请点击 修改条件
      1. 添加条件面板中,创建一个引用受支持服务资源的 CEL 条件,例如 resource.management.autoUpgrade == false。此字段最多可包含 1,000 个字符。如需详细了解 CEL 用法,请参阅通用表达式语言。 如需详细了解可在自定义限制条件中使用的服务资源,请参阅自定义限制条件支持的服务
      2. 点击保存
    11. 操作下,选择在满足条件时是允许还是拒绝评估的方法。
    12. 拒绝操作意味着,如果条件计算结果为 true,则创建或更新资源的操作会被阻止。

      允许操作意味着,仅当条件计算结果为 true 时,才允许执行创建或更新资源的操作。除了条件中明确列出的情况之外,其他所有情况都会被阻止。

    13. 点击创建限制条件
    14. 在每个字段中输入值后,右侧将显示此自定义限制条件的等效 YAML 配置。

    gcloud

    1. 如需创建自定义限制条件,请使用以下格式创建 YAML 文件:
    2.       name: organizations/ORGANIZATION_ID/customConstraints/CONSTRAINT_NAME
            resourceTypes:
            - RESOURCE_NAME
            methodTypes:
            - CREATE
      - UPDATE
      condition: "CONDITION" actionType: ACTION displayName: DISPLAY_NAME description: DESCRIPTION

      请替换以下内容:

      • ORGANIZATION_ID:您的组织 ID,例如 123456789
      • CONSTRAINT_NAME:新的自定义限制条件的名称。自定义限制条件只能包含字母(包括大写和小写)或数字,例如 custom.enforceCaPoolEncodingFormat。此字段最多可包含 70 个字符。
      • RESOURCE_NAME:包含要限制的对象和字段的 Google Cloud资源的完全限定名称。例如 privateca.googleapis.com/CaPool
      • CONDITION:针对受支持服务资源的表示形式编写的 CEL 条件。此字段最多可包含 1,000 个字符。例如 "resource.publishingOptions.encodingFormat == 'DER'"
      • 如需详细了解可针对其编写条件的资源,请参阅支持的资源

      • ACTION:满足 condition 时要执行的操作。 可能的值包括 ALLOWDENY
      • 允许操作意味着,如果条件计算结果为 true,则允许执行创建或更新资源的操作。这也意味着,除了条件中明确列出的情况之外,其他所有情况都会被阻止。

        拒绝操作意味着,如果条件计算结果为 true,则创建或更新资源的操作会被阻止。

      • DISPLAY_NAME:限制条件的直观易记名称。此字段最多可包含 200 个字符。
      • DESCRIPTION:直观易懂的限制条件说明,当违反政策时会作为错误消息显示。此字段最多可包含 2000 个字符。
    3. 为新的自定义限制条件创建 YAML 文件后,您必须对其进行设置,以使其可用于组织中的组织政策。如需设置自定义限制条件,请使用 gcloud org-policies set-custom-constraint 命令:
    4.         gcloud org-policies set-custom-constraint CONSTRAINT_PATH
            

      CONSTRAINT_PATH 替换为自定义限制条件文件的完整路径。例如 /home/user/customconstraint.yaml

      此操作完成后,您的自定义限制条件将作为组织政策显示在您的 Google Cloud 组织政策列表中。

    5. 如需验证自定义限制条件是否存在,请使用 gcloud org-policies list-custom-constraints 命令:
    6.       gcloud org-policies list-custom-constraints --organization=ORGANIZATION_ID
            

      ORGANIZATION_ID 替换为您的组织资源的 ID。

      如需了解详情,请参阅查看组织政策

    强制执行自定义组织政策

    如需强制执行限制条件,您可以创建引用该限制条件的组织政策,并将该组织政策应用于 Google Cloud 资源。

    控制台

    1. 在 Google Cloud 控制台中,前往组织政策页面。

      转到组织政策

    2. 在项目选择器中,选择要为其设置组织政策的项目。
    3. 组织政策页面上的列表中选择您的限制条件,以查看该限制条件的政策详情页面。
    4. 如需为该资源配置组织政策,请点击管理政策
    5. 修改政策页面,选择覆盖父级政策
    6. 点击添加规则
    7. 强制执行部分中,选择是否强制执行此组织政策。
    8. (可选)如需使组织政策成为基于某个标记的条件性政策,请点击添加条件。请注意,如果您向组织政策添加条件规则,则必须至少添加一个无条件规则,否则无法保存政策。如需了解详情,请参阅设置带有标记的组织政策
    9. 点击测试更改以模拟组织政策的效果。如需了解详情,请参阅使用 Policy Simulator 测试组织政策更改
    10. 如需在试运行模式下强制执行组织政策,请点击设置试运行政策。如需了解详情,请参阅在试运行模式下创建组织政策
    11. 验证试运行模式下的组织政策按预期运行后,点击设置政策来设置现行政策。

    gcloud

    1. 如需创建包含布尔值规则的组织政策,请创建引用该限制条件的 YAML 政策文件:
    2.         name: projects/PROJECT_ID/policies/CONSTRAINT_NAME
              spec:
                rules:
                - enforce: true
              
              dryRunSpec:
                rules:
                - enforce: true
              
            

      请替换以下内容:

      • PROJECT_ID:要对其强制执行您的限制条件的项目。
      • CONSTRAINT_NAME:您为自定义限制条件定义的名称。例如,custom.enforceCaPoolEncodingFormat
    3. 如需在试运行模式下强制执行组织政策,请运行以下带有 dryRunSpec 标志的命令:
    4.         gcloud org-policies set-policy POLICY_PATH \
                --update-mask=dryRunSpec
            

      POLICY_PATH 替换为组织政策 YAML 文件的完整路径。该政策最长需要 15 分钟才能生效。

    5. 验证试运行模式下的组织政策按预期运行后,使用 org-policies set-policy 命令和 spec 标志设置现行政策:
    6.         gcloud org-policies set-policy POLICY_PATH \
                --update-mask=spec
            

      POLICY_PATH 替换为组织政策 YAML 文件的完整路径。该政策最长需要 15 分钟才能生效。

    测试自定义组织政策

    以下示例创建自定义限制条件和政策,要求特定项目中的所有证书授权机构池 (CaPool) 资源颁发的证书的最长证书有效期不得超过 30 天。

    在开始之前,您应该了解以下信息:

    • 您的组织 ID
    • 项目 ID

    所需的角色

    如需获得管理自定义限制、启用 API 和管理本指南中的 CA Service 资源所需的权限,请让管理员为您授予以下 IAM 角色:

    如需详细了解如何授予角色,请参阅管理对项目、文件夹和组织的访问权限

    您也可以通过自定义角色或其他预定义角色来获取所需的权限。

    启用 Organization Policy Service API

    gcloud org-policies 命令需要 orgpolicy.googleapis.com API。在项目中启用此 API:

         gcloud services enable orgpolicy.googleapis.com --project=PROJECT_ID
    

    PROJECT_ID 替换为您的项目 ID。

    创建限制条件

    1. 将以下文件保存为 constraint-cas-capool-lifetime.yaml

      name: organizations/ORGANIZATION_ID/customConstraints/custom.enforceCasMaxLifetime30d
      resourceTypes:
      - privateca.googleapis.com/CaPool
      methodTypes:
      - CREATE
      - UPDATE
      condition: "!has(resource.issuancePolicy.maximumLifetime) || duration(resource.issuancePolicy.maximumLifetime) > duration('2592000s')"
      actionType: DENY
      displayName: Enforce Max Certificate Lifetime (30 Days)
      description: Only allows CaPools where the issuancePolicy.maximumLifetime field is set to 30 days (2592000 seconds) or less.
      

      ORGANIZATION_ID 替换为您的组织 ID。

    2. 应用以下限制条件:

      gcloud org-policies set-custom-constraint ~/constraint-cas-capool-lifetime.yaml
      
    3. 验证限制条件存在:

      gcloud org-policies list-custom-constraints --organization=ORGANIZATION_ID
      

      ORGANIZATION_ID 替换为您的组织 ID。

    创建政策

    1. 将以下文件保存为 policy-cas-capool-lifetime.yaml

      name: projects/PROJECT_ID/policies/custom.enforceCasMaxLifetime30d
      spec:
        rules:
        - enforce: true
      

      PROJECT_ID 替换为您的项目 ID。

    2. 应用以下政策:

      gcloud org-policies set-policy ~/policy-cas-capool-lifetime.yaml
      
    3. 验证政策存在:

      gcloud org-policies list --project=PROJECT_ID
      

      PROJECT_ID 替换为您的项目 ID。

    应用政策后,请等待大约 15 分钟,以便 Google Cloud 开始强制执行政策。如需了解详情,请参阅创建和管理组织政策

    测试政策

    如需测试自定义限制条件,您将使用 gcloud CLI 创建并更新 CA 服务池。

    为测试资源定义变量:

    • PROJECT_ID:您的 Google Cloud 项目 ID
    • LOCATION:CA 池的区域,例如 us-west1
    • POOL_NAME:测试 CA 池的名称,例如 my-test-pool
    1. 创建最长使用期限超过 30 天的 CA 池:

      创建一个名为 capool_violating.yaml 的 YAML 文件,其中包含一个超过 30 天的 maximumLifetime(例如 31 天,即 2,678,400 秒)。maximumLifetime 字段以秒为单位设置。

      # capool_violating.yaml
      maximumLifetime: 2678400s
      

      如需创建违反该政策的 CA 池,请运行以下命令:

      # This creation should be blocked by the policy
      gcloud privateca pools create POOL_NAME-violating \
        --location LOCATION \
        --project PROJECT_ID \
        --issuance-policy capool_violating.yaml
      

      该命令失败,并显示 FAILED_PRECONDITION 错误,表明违反了 customConstraints/custom.enforceCasMaxLifetime30d 限制。

    2. 创建符合要求的最大使用期限的 CA 池:

      创建一个名为 capool_compliant.yaml 的 YAML 文件,并将 maximumLifetime 设置为 30 天(2,592,000 秒)。maximumLifetime 字段以秒为单位设置。

      # capool_compliant.yaml
      maximumLifetime: 2592000s
      

      如需创建 CA 池,请运行以下命令:

      gcloud privateca pools create POOL_NAME \
        --location "LOCATION" \
        --project "PROJECT_ID" \
        --issuance-policy capool_compliant.yaml
      

      命令成功完成。

    3. 尝试将 CA 池更新为不合规的最大使用期限:

      运行以下命令以应用来自 capool_violating.yaml 的设置:

      # This update is blocked by the policy
      gcloud privateca pools update POOL_NAME \
        --location "LOCATION" \
        --project "PROJECT_ID" \
        --issuance-policy capool_violating.yaml
      

      此命令失败并显示 FAILED_PRECONDITION 错误,表明违反了 customConstraints/custom.enforceCasMaxLifetime30d 限制。

    4. 将 CA 池更新为其他合规的最大使用期限

      创建一个名为 capool_compliant_update.yaml 的 YAML 文件,并将 maximumLifetime 设置为 15 天(1,296,000 秒)。maximumLifetime 字段以秒为单位设置。

      # capool_compliant_update.yaml
      maximumLifetime: 1296000s
      

      如需更新 CA 池,请运行以下命令:

      gcloud privateca pools update POOL_NAME \
        --location "LOCATION" \
        --project "PROJECT_ID" \
        --issuance-policy capool_compliant_update.yaml
      

      命令成功完成。

    5. 清理测试资源。

      删除测试期间创建的 CA 池:

      gcloud privateca pools delete POOL_NAME \
        --location "LOCATION" \
        --project "PROJECT_ID" \
      

    常见用例的自定义组织政策示例

    下表提供了一些常见自定义限制条件的语法示例。

    说明 限制条件语法
    针对所有 CA 强制执行特定的密钥算法

    确保任何新的证书授权机构都使用允许的密钥算法之一。

    name: organizations/ORGANIZATION_ID/customConstraints/custom.casAllowedKeyAlgos
    resourceTypes:
    - privateca.googleapis.com/CertificateAuthority
    methodTypes:
    - CREATE
    - UPDATE
    condition: "resource.keySpec.algorithm in ['EC_P256_SHA256', 'RSA_PSS_3072_SHA256']"
    actionType: ALLOW
    displayName: Restrict CA Key Algorithms
    description: Only allows specific key algorithms for new CAs.
        
    要求在 CA 主题中包含特定组织名称

    确保所有新 CA 的主题中都有标准化的 organization 字段。

    name: organizations/ORGANIZATION_ID/customConstraints/custom.casRequireSubjectOrg
    resourceTypes:
    - privateca.googleapis.com/CertificateAuthority
    methodTypes:
    - CREATE
    - UPDATE
    condition: "resource.config.subjectConfig.subject.organization == 'Example Company Inc.'"
    actionType: ALLOW
    displayName: Enforce CA Subject Organization
    description: Requires new CAs to have the specified organization name.
        
    针对 CaPool 强制执行最长证书有效期

    确保 CaPool 配置为颁发最长有效期不超过 30 天的证书。

    name: organizations/ORGANIZATION_ID/customConstraints/custom.enforceCasMaxLifetime30d
    resourceTypes:
    - privateca.googleapis.com/CaPool
    methodTypes:
    - CREATE
    - UPDATE
    condition: "!has(resource.issuancePolicy.maximumLifetime) || duration(resource.issuancePolicy.maximumLifetime) > duration('2592000s')"
    actionType: DENY
    displayName: Enforce Max Certificate Lifetime (30 Days)
    description: Only allows CaPools where the issuancePolicy.maximumLifetime field is set to 30 days (2592000 seconds) or less.
        

    Certificate Authority Service 支持的资源

    下表列出了您可以在自定义限制条件中引用的 Certificate Authority Service 资源。

    资源 字段
    privateca.googleapis.com/CaPool resource.issuancePolicy.allowedIssuanceModes.allowConfigBasedIssuance
    resource.issuancePolicy.allowedIssuanceModes.allowCsrBasedIssuance
    resource.issuancePolicy.allowedKeyTypes.ellipticCurve.signatureAlgorithm
    resource.issuancePolicy.allowedKeyTypes.rsa.maxModulusSize
    resource.issuancePolicy.allowedKeyTypes.rsa.minModulusSize
    resource.issuancePolicy.backdateDuration
    resource.issuancePolicy.baselineValues.additionalExtensions.critical
    resource.issuancePolicy.baselineValues.additionalExtensions.objectId.objectIdPath
    resource.issuancePolicy.baselineValues.additionalExtensions.value
    resource.issuancePolicy.baselineValues.aiaOcspServers
    resource.issuancePolicy.baselineValues.caOptions.isCa
    resource.issuancePolicy.baselineValues.caOptions.maxIssuerPathLength
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.certSign
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.contentCommitment
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.crlSign
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.dataEncipherment
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.decipherOnly
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.digitalSignature
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.encipherOnly
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyAgreement
    resource.issuancePolicy.baselineValues.keyUsage.baseKeyUsage.keyEncipherment
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.clientAuth
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.codeSigning
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.emailProtection
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.ocspSigning
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.serverAuth
    resource.issuancePolicy.baselineValues.keyUsage.extendedKeyUsage.timeStamping
    resource.issuancePolicy.baselineValues.keyUsage.unknownExtendedKeyUsages.objectIdPath
    resource.issuancePolicy.baselineValues.nameConstraints.critical
    resource.issuancePolicy.baselineValues.nameConstraints.excludedDnsNames
    resource.issuancePolicy.baselineValues.nameConstraints.excludedEmailAddresses
    resource.issuancePolicy.baselineValues.nameConstraints.excludedIpRanges
    resource.issuancePolicy.baselineValues.nameConstraints.excludedUris
    resource.issuancePolicy.baselineValues.nameConstraints.permittedDnsNames
    resource.issuancePolicy.baselineValues.nameConstraints.permittedEmailAddresses
    resource.issuancePolicy.baselineValues.nameConstraints.permittedIpRanges
    resource.issuancePolicy.baselineValues.nameConstraints.permittedUris
    resource.issuancePolicy.baselineValues.policyIds.objectIdPath
    resource.issuancePolicy.identityConstraints.allowSubjectAltNamesPassthrough
    resource.issuancePolicy.identityConstraints.allowSubjectPassthrough
    resource.issuancePolicy.identityConstraints.celExpression
    resource.issuancePolicy.maximumLifetime
    resource.issuancePolicy.passthroughExtensions.additionalExtensions.objectIdPath
    resource.issuancePolicy.passthroughExtensions.knownExtensions
    resource.name
    resource.publishingOptions.encodingFormat
    resource.publishingOptions.publishCaCert
    resource.publishingOptions.publishCrl
    resource.tier
    privateca.googleapis.com/CertificateAuthority resource.config.subjectConfig.subject.commonName
    resource.config.subjectConfig.subject.countryCode
    resource.config.subjectConfig.subject.locality
    resource.config.subjectConfig.subject.organization
    resource.config.subjectConfig.subject.organizationalUnit
    resource.config.subjectConfig.subject.postalCode
    resource.config.subjectConfig.subject.province
    resource.config.subjectConfig.subject.streetAddress
    resource.config.subjectConfig.subjectAltName.customSans.critical
    resource.config.subjectConfig.subjectAltName.customSans.objectId.objectIdPath
    resource.config.subjectConfig.subjectAltName.customSans.value
    resource.config.subjectConfig.subjectAltName.dnsNames
    resource.config.subjectConfig.subjectAltName.emailAddresses
    resource.config.subjectConfig.subjectAltName.ipAddresses
    resource.config.subjectConfig.subjectAltName.uris
    resource.config.subjectKeyId.keyId
    resource.config.x509Config.additionalExtensions.critical
    resource.config.x509Config.additionalExtensions.objectId.objectIdPath
    resource.config.x509Config.additionalExtensions.value
    resource.config.x509Config.aiaOcspServers
    resource.config.x509Config.caOptions.isCa
    resource.config.x509Config.caOptions.maxIssuerPathLength
    resource.config.x509Config.keyUsage.baseKeyUsage.certSign
    resource.config.x509Config.keyUsage.baseKeyUsage.contentCommitment
    resource.config.x509Config.keyUsage.baseKeyUsage.crlSign
    resource.config.x509Config.keyUsage.baseKeyUsage.dataEncipherment
    resource.config.x509Config.keyUsage.baseKeyUsage.decipherOnly
    resource.config.x509Config.keyUsage.baseKeyUsage.digitalSignature
    resource.config.x509Config.keyUsage.baseKeyUsage.encipherOnly
    resource.config.x509Config.keyUsage.baseKeyUsage.keyAgreement
    resource.config.x509Config.keyUsage.baseKeyUsage.keyEncipherment
    resource.config.x509Config.keyUsage.extendedKeyUsage.clientAuth
    resource.config.x509Config.keyUsage.extendedKeyUsage.codeSigning
    resource.config.x509Config.keyUsage.extendedKeyUsage.emailProtection
    resource.config.x509Config.keyUsage.extendedKeyUsage.ocspSigning
    resource.config.x509Config.keyUsage.extendedKeyUsage.serverAuth
    resource.config.x509Config.keyUsage.extendedKeyUsage.timeStamping
    resource.config.x509Config.keyUsage.unknownExtendedKeyUsages.objectIdPath
    resource.config.x509Config.nameConstraints.critical
    resource.config.x509Config.nameConstraints.excludedDnsNames
    resource.config.x509Config.nameConstraints.excludedEmailAddresses
    resource.config.x509Config.nameConstraints.excludedIpRanges
    resource.config.x509Config.nameConstraints.excludedUris
    resource.config.x509Config.nameConstraints.permittedDnsNames
    resource.config.x509Config.nameConstraints.permittedEmailAddresses
    resource.config.x509Config.nameConstraints.permittedIpRanges
    resource.config.x509Config.nameConstraints.permittedUris
    resource.config.x509Config.policyIds.objectIdPath
    resource.gcsBucket
    resource.keySpec.algorithm
    resource.keySpec.cloudKmsKeyVersion
    resource.lifetime
    resource.name
    resource.subordinateConfig.certificateAuthority
    resource.subordinateConfig.pemIssuerChain.pemCertificates
    resource.type
    resource.userDefinedAccessUrls.aiaIssuingCertificateUrls
    resource.userDefinedAccessUrls.crlAccessUrls
    privateca.googleapis.com/CertificateTemplate resource.description
    resource.identityConstraints.allowSubjectAltNamesPassthrough
    resource.identityConstraints.allowSubjectPassthrough
    resource.identityConstraints.celExpression
    resource.maximumLifetime
    resource.name
    resource.passthroughExtensions.additionalExtensions.objectIdPath
    resource.passthroughExtensions.knownExtensions
    resource.predefinedValues.additionalExtensions.critical
    resource.predefinedValues.additionalExtensions.objectId.objectIdPath
    resource.predefinedValues.additionalExtensions.value
    resource.predefinedValues.aiaOcspServers
    resource.predefinedValues.caOptions.isCa
    resource.predefinedValues.caOptions.maxIssuerPathLength
    resource.predefinedValues.keyUsage.baseKeyUsage.certSign
    resource.predefinedValues.keyUsage.baseKeyUsage.contentCommitment
    resource.predefinedValues.keyUsage.baseKeyUsage.crlSign
    resource.predefinedValues.keyUsage.baseKeyUsage.dataEncipherment
    resource.predefinedValues.keyUsage.baseKeyUsage.decipherOnly
    resource.predefinedValues.keyUsage.baseKeyUsage.digitalSignature
    resource.predefinedValues.keyUsage.baseKeyUsage.encipherOnly
    resource.predefinedValues.keyUsage.baseKeyUsage.keyAgreement
    resource.predefinedValues.keyUsage.baseKeyUsage.keyEncipherment
    resource.predefinedValues.keyUsage.extendedKeyUsage.clientAuth
    resource.predefinedValues.keyUsage.extendedKeyUsage.codeSigning
    resource.predefinedValues.keyUsage.extendedKeyUsage.emailProtection
    resource.predefinedValues.keyUsage.extendedKeyUsage.ocspSigning
    resource.predefinedValues.keyUsage.extendedKeyUsage.serverAuth
    resource.predefinedValues.keyUsage.extendedKeyUsage.timeStamping
    resource.predefinedValues.keyUsage.unknownExtendedKeyUsages.objectIdPath
    resource.predefinedValues.nameConstraints.critical
    resource.predefinedValues.nameConstraints.excludedDnsNames
    resource.predefinedValues.nameConstraints.excludedEmailAddresses
    resource.predefinedValues.nameConstraints.excludedIpRanges
    resource.predefinedValues.nameConstraints.excludedUris
    resource.predefinedValues.nameConstraints.permittedDnsNames
    resource.predefinedValues.nameConstraints.permittedEmailAddresses
    resource.predefinedValues.nameConstraints.permittedIpRanges
    resource.predefinedValues.nameConstraints.permittedUris
    resource.predefinedValues.policyIds.objectIdPath

    后续步骤