Service accounts should only use GCP-managed keys


User managed service accounts should not have user-managed keys.


Anyone who has access to the keys can access resources through the service account. GCP-managed keys are used by Cloud Platform services such as App Engine and Compute Engine. These keys cannot be downloaded. Google will keep the keys and automatically rotate them on an approximately weekly basis. User-managed keys are created, downloadable, and managed by users. They expire 10 years from creation. For user-managed keys, you are responsible for key management activities including:

  • Key storage
  • Key distribution
  • Key revocation
  • Key rotation
  • Protecting the keys from unauthorized users
  • Key recovery Even with key owner precautions, it’s easy to leak keys through common development accidents such as checking keys into the source code, leaving them in the Downloads directory, or posting them on support blogs. For these reasons, it is recommended that you don’t use user-managed service account keys.


Deleting user-managed service account keys may break communication with the applications using the keys.


From the console

  1. Go to the IAM page in the GCP Console at
  2. In the left navigation pane, click Service accounts. All service accounts and their corresponding keys are listed.
  3. Click the service account.
  4. Click Edit and delete the keys.

From the command line

To delete a user-managed service account key run:

gcloud iam service-accounts keys delete --iam-account=<user-managed-service-account-EMAIL> <KEY-ID>


You can disable service account key creation through the Disable service account key creation Organization policy by visiting Learn more at:

In addition, if you do not need service accounts in your project, you can prevent the creation of service accounts through the Disable service account creation Organization policy:

Default value

By default, there are no user-managed keys created for user-managed service accounts.



Additional information

A user-managed key cannot be created on GCP-Managed Service Accounts.