Create a subordinate CA in the pool, chained to your existing root CA. Adjust --key-algorithm and --validity to match your compliance guidelines.
gcloud privateca subordinates create $SUBORDINATE_CA_ID \
--pool=$SUBORDINATE_POOL_ID \
--location=$LOCATION \
--issuer-pool=$ROOT_POOL_ID \
--issuer-ca=$ROOT_CA_ID \
--issuer-location=$ROOT_LOCATION \
--subject="CN=Firefly Intermediate CA, O=Example" \
--key-algorithm=ec-p256-sha256 \
--validity="P7D" \
--project=$PROJECT_ID
A new subordinate CA starts in a disabled state. Activate it so it can sign incoming requests.
gcloud privateca subordinates enable $SUBORDINATE_CA_ID \
--pool=$SUBORDINATE_POOL_ID \
--location=$LOCATION \
--project=$PROJECT_ID
Create a service account for Distributed Issuer to authenticate to Google Cloud CAS, grant it permission to request certificates, and download its key.
Create the service account.
gcloud iam service-accounts create $SA_NAME \
--display-name="Firefly Service Account" \
--project=$PROJECT_ID
Grant the Certificate Requester and CA Service Operation Manager roles on the pool.
gcloud privateca pools add-iam-policy-binding $SUBORDINATE_POOL_ID \
--location=$LOCATION \
--member="serviceAccount:$PRODUCT_SA" \
--role="roles/privateca.certificateRequester" \
--project=$PROJECT_ID
gcloud privateca pools add-iam-policy-binding $SUBORDINATE_POOL_ID \
--location=$LOCATION \
--member="serviceAccount:$PRODUCT_SA" \
--role="roles/privateca.caManager" \
--project=$PROJECT_ID
Grant the Template User role at the project level.
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member="serviceAccount:$PRODUCT_SA" \
--role="roles/privateca.templateUser"
Generate and download the service account key.
gcloud iam service-accounts keys create firefly-sa-key.json \
--iam-account=$PRODUCT_SA \
--project=$PROJECT_ID
Warning: firefly-sa-key.json is a credential that grants access to your CA pool. Store it securely and don't commit it to source control. You paste its contents when you create the Google Cloud CAS connector.