Compliancemanzill.com
CIS Google Cloud Platform Foundation Benchmark v1.2.0

CIS Google Cloud Platform Foundation Benchmark v1.2.0/Identity and Access Management/7 of 83

1.7Ensure user-managed/external keys for service accounts are rotated every 90 days or less

Control family: Identity and Access Management

Control description

Service Account keys consist of a key ID (Private_key_Id) and Private key, which are used to sign programmatic requests users make to Google cloud services accessible to that particular service account. It is recommended that all Service Account keys are regularly rotated.

How to implement

ResponsibilityCustomerYou configure and operate this in your own cloud accounts.

Where a user-managed service account key can't yet be avoided (see 1.4), it is replaced at least every 90 days, so a copy that leaked stops working. Rotation means creating a new key, moving the workload to it, and disabling then deleting the old one. Setting an expiry on new keys makes the rotation happen whether or not someone remembers.

Before you start

The same on every cloud, before the steps in the tabs.

  • Agree the rotation period for any remaining user-managed keys (90 days or less) and who rotates each one.
  • Keep the keys in a secrets store, never in code or images, so rotation is a single change.

Evidence

  • The key rotation schedule with owners

On Google Cloud the tasks rotate keys from the service account's Keys tab, set a maximum key lifetime with an organization policy, and watch with Security Command Center.

Task 1Rotate a service account key

  1. Sign in to the Google Cloud console at console.cloud.google.com and open IAM & Admin > Service accounts.
  2. Open the service account and choose the Keys tab; note the creation date of each key.
  3. Choose Add key > Create new key, choose JSON and Create, and hand the new key to the workload through your secrets store.
  4. Once the workload uses the new key, disable the old one.
  5. After a few days without errors, delete the old key.
  6. Check it: the Keys tab shows only keys created in the last 90 days.

Task 2Prevent it with the organization policy iam.serviceAccountKeyExpiryHours

  1. Open IAM & Admin > Organization policies with the organization (or the folder that holds your projects) selected in the project picker.
  2. Search for iam.serviceAccountKeyExpiryHours (Service account key expiry duration in hours) and open it.
  3. Choose Manage policy, select Override parent's policy, choose Add a rule and under Policy values choose Custom, set Policy type to Allow and add 2160h (90 days).
  4. Choose Set policy.
  5. Check it: a newly created key shows an expiry date 90 days out.

Task 3Keep it checked with the Security Health Analytics finding SERVICE_ACCOUNT_KEY_NOT_ROTATED

  1. Open Security Command Center > Findings for the organization (Security Health Analytics runs on the Premium tier for most detectors).
  2. In the query editor, filter on category SERVICE_ACCOUNT_KEY_NOT_ROTATED with state ACTIVE, and select Apply.
  3. Open each finding, read the resource and the explanation it gives, and rotate the key it names.
  4. Check it: after the next Security Health Analytics scan, no active SERVICE_ACCOUNT_KEY_NOT_ROTATED finding remains.

Evidence

  • The Keys tab of each service account, with every key under 90 days old
  • The iam.serviceAccountKeyExpiryHours policy
  • Security Command Center, with no active SERVICE_ACCOUNT_KEY_NOT_ROTATED finding

Console steps as of 5 November 2026. Not every step has been confirmed in a live console yet, and menus and labels can move between releases, so look for the nearest match if one has changed.