Create a subordinate certificate authority
This page describes how to create subordinate certificate authorities (CAs) in a CA pool.
Subordinate CAs are responsible for issuing certificates directly to end-entities such as users, computers, and devices. Subordinate CAs are cryptographically signed by a parent CA, which is often the root CA. As a result, systems that trust the root CA, automatically trust the subordinate CAs and the end-entity certificates that the subordinate CAs issue.
Before you begin
- Make sure you have the CA Service Operation Manager
(
roles/privateca.caManager
) or the CA Service Admin (roles/privateca.admin
) IAM role. For information, see Configure IAM policies. - Create a CA pool.
- Select your root CA.
Create a subordinate CA
Subordinate CAs are easier to revoke and rotate than root CAs. If you have multiple certificate issuance scenarios, you can create a subordinate CA for each of those scenarios. Adding multiple subordinate CAs in a CA pool helps you achieve better load-balancing of certificate requests and a higher total effective QPS.
To create a subordinate CA, do the following:
Console
Go to the Certificate Authority Service page in the Google Cloud console.
Click the CA manager tab.
Click Create CA.
Select CA type
- Click Subordinate CA.
- Click Root CA is in Google Cloud.
- In the Valid for field, enter the duration for which you want the CA certificate to be valid.
- Optional: Choose the tier for the CA. The default tier is Enterprise. For more information, see Select the operation tiers.
- Click Region to select a location for the CA. For more information, see Locations.
- Optional: Under Initialized state, select the state the CA must be in at creation.
- Optional: Under Set up an issuance scenario, click Certificate profile and select the certificate profile that best suits your requirements from the list. For more information, see Certificate profiles.
- Click Next.
- In the Organization (O) field, enter the name of your company.
- Optional: In the Organization unit (OU) field, enter the company subdivision or business unit.
- Optional: In the Country name field, enter a two letter country code.
- Optional: In the State or province name field, enter the name of your state.
- Optional: In the Locality name field, enter the name of your city.
- In the CA common name (CN) field, enter the CA name.
- In the Pool ID field, enter the CA pool name. You cannot change the CA pool after creating the CA.
- Click Next.
- Choose the key algorithm that best meets your needs. For information about deciding the suitable key algorithm, see Choose a key algorithm.
- Click Next.
The following steps are optional. If you skip these steps, the default settings apply.
- Choose whether you want to use a Google-managed or a self-managed Cloud Storage bucket.
- Choose whether you want to disable the publication of certificate revocation lists (CRLs) and CA certificates to the Cloud Storage bucket.
- Click Next.
If you don't select a self-managed Cloud Storage bucket, CA Service creates a Google-managed bucket in the same location as the CA.
The publication of CRL and CA certificate on a Cloud Storage bucket is enabled by default. To disable these settings, click the toggles.
The following steps are optional.
If you want to add labels to the CA, do the following:
- Click Add item.
- In the Key 1 field, enter the label key.
- In the Value 1 field, enter the label value.
- If you want to add another label, click Add item. Then, add the label key and value as mentioned in steps 2 and 3.
- Click Next.
Carefully review all the settings, then click Create to create the CA.
gcloud
Create a CA pool for the subordinate CA:
gcloud privateca pools create SUBORDINATE_POOL_ID
Replace SUBORDINATE_POOL_ID with the name of the CA pool.
For more information about creating CA pools, see Create a CA pool.
For more information about the
gcloud privateca pools create
command, see gcloud privateca pools create.Create a subordinate CA in the created CA pool.
gcloud privateca subordinates create SUBORDINATE_CA_ID \ --pool=SUBORDINATE_POOL_ID \ --issuer-pool=POOL_ID \ --key-algorithm="ec-p256-sha256" \ --subject="CN=Example Server TLS CA, O=Example LLC"
The following statement is returned when the subordinate CA is created.
Created Certificate Authority [projects/my-project-pki/locations/us-west1/caPools/SUBORDINATE_POOL_ID/certificateAuthorities/SUBORDINATE_CA_ID].
To see an exhaustive list of settings, run the following
gcloud
command:gcloud privateca subordinates create --help
The command returns examples to create a subordinate CA whose issuer is either located on CA Service or located elsewhere.
Terraform
Java
To authenticate to CA Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Python
To authenticate to CA Service, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.
Enable a subordinate CA
To enable a subordinate CA, do the following:
Console
Go to the Certificate Authority Service page in the Google Cloud console.
Click the CA manager tab.
Under Certificate authorities, select the CA that you want to activate.
Click
Activate.In the dialog that opens, click Download CSR to download the PEM-encoded CSR file that the issuing CA can sign.
Click Next.
In the Upload Certificate Chain field, click Browse.
Upload the signed certificate file with
.crt
extension.Click Activate.
gcloud
To enable a newly created subordinate CA, run the following command:
gcloud privateca subordinates enable SUBORDINATE_CA_ID --pool=SUBORDINATE_POOL_ID
Replace the following:
- SUBORDINATE_CA_ID: the unique identifier of the subordinate CA.
- SUBORDINATE_POOL_ID: the name of the CA pool that contains the subordinate CA.
For more information about the gcloud privateca subordinates enable
command, see gcloud privateca subordinates enable.
Terraform
Set field desired_state
to ENABLED
on the subordinate CA and run terraform apply
.
What's next
- Learn how to request certificates.
- Learn about templates and issuance policies.