Rotate the key of the Cloudera Cloud Factory service account periodically by creating a new key, uploading it to Cloudera Cloud Factory, and deleting the old key, without downtime for your clusters.
- Ensure that you have permissions to create and delete service account keys in the service project.
- Ensure that you have permission to update cloud credentials in Cloudera Cloud Factory.
-
Set the email address of the Cloudera Cloud Factory service account:
export CCF_SA="[***SERVICE ACCOUNT EMAIL***]"
-
Create a new key:
gcloud iam service-accounts keys create config-new.json \
--iam-account="$CCF_SA"
-
Upload the config-new.json file to the Google Cloud credential in Cloudera Cloud Factory.
-
Verify that cluster operations still work.
-
List the existing keys, and note the ID of the old key:
gcloud iam service-accounts keys list \
--iam-account="$CCF_SA"
-
Delete the old key:
export OLD_KEY_ID="[***OLD KEY ID***]"
gcloud iam service-accounts keys delete "$OLD_KEY_ID" \
--iam-account="$CCF_SA"
Cloudera Cloud Factory authenticates with the new key, and the old key no longer grants access to the service project.