# Are long-lived access keys and service account keys absent, or rotated at least every 90 days and unused ones deleted?

Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.

Question 3 of the assessment asks: Are long-lived access keys and service account keys absent, or rotated at least every 90 days and unused ones deleted? A static key works from anywhere, never expires on its own and often ends up in code, tickets and laptops.

## Why it matters

A static key works from anywhere, never expires on its own and often ends up in code, tickets and laptops.

## Answers and what each is worth

| Answer | Value |
| --- | --- |
| Yes, none or all under 90 days | 1 |
| Some are older or unused | 0.5 |
| No or not known | 0 |

## How to check it in each cloud

- **AWS:** Download the IAM credential report and sort by access_key_last_rotated and access_key_last_used; every active key older than 90 days is a finding.
- **Azure:** List app registration client secrets and certificates with their expiry dates (Entra admin center, App registrations), and flag any valid for more than 12 months.
- **Google Cloud:** Run gcloud iam service-accounts keys list for each service account with --managed-by=user, and use the Policy Intelligence service account insights to find unused keys.

## The fix

Replace static keys with short-lived credentials, and delete every key older than 90 days or unused for 90 days. Effort: medium.

## Where it comes from

- Google Cloud security best practices Service account keys: [Best practices for managing service account keys](https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys)
- Microsoft cloud security benchmark IM-8: [source](https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-v2-identity-management)
- NIST SP 800-53 Rev. 5 IA-5: [source](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final)

## Related pages

- [Question 4: Identities and entitlements, workload identity](/questions/workload-identity/)
- [Question 5: Identities and entitlements, admin roles limit](/questions/admin-roles-limited/)
- [Question 6: Identities and entitlements, no standing privi](/questions/no-standing-privilege/)

## Sources

- Google Cloud security best practices Service account keys: https://cloud.google.com/iam/docs/best-practices-for-managing-service-account-keys (read 16 Nov 2026)
- Microsoft cloud security benchmark IM-8: https://learn.microsoft.com/en-us/security/benchmark/azure/mcsb-v2-identity-management (read 16 Nov 2026)
- NIST SP 800-53 Rev. 5 IA-5: https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final (read 16 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudsecurityriskassessment.com/questions/long-lived-keys/
