Most cloud key management services are switched on one service at a time, and the result is hundreds of keys with no owner, broad key policies and no tested recovery path. A cloud key management service (KMS) is easy to start using and hard to retrofit, because every key policy, alias and encrypted resource you create becomes a dependency that is painful to change later. This playbook sets out a vendor-neutral, phased rollout for a cloud KMS: the decisions to make before the first key, the order to onboard workloads, how to pilot, how to roll back, and how to prove it works. It is written for cloud platform, security architecture and data protection teams. Key lifecycle theory is in the Cryptographic Key Management Guide and integration patterns are in the Envelope Encryption and KMS Integration Patterns Guide; this page focuses on the rollout itself.
Key takeaways
- Design the key hierarchy and naming first. Decide key granularity, naming, tagging and ownership before creating any key, because aliases and key references end up hard-coded in templates and applications.
- Separate key administrators from key users. The people and pipelines that create, rotate and schedule deletion of keys should not be the workloads that encrypt and decrypt with them, in line with NIST SP 800-53 AC-5.
- Every KMS caller is a non-human identity. Workloads should reach the KMS with platform-issued workload identities, never with long-lived access keys stored next to the data they protect.
- Deletion is the highest-impact action. Deleting a key makes the data it protects unrecoverable, so put waiting periods, alerts and approval in place before onboarding production data.
- Roll out in rings with a rollback plan. Pilot on non-production, then low-risk production, then regulated data, with exit criteria and a tested way back at every phase.
Before you start: decisions that are hard to change later
NIST SP 800-57 Part 2 Rev. 1 expects a key management organisation to document a key management policy and a practice statement before operating keys. For a cloud KMS that translates into a short design record that answers the questions below. Write it down and get it approved: it is the reference every later phase checks against.
| Decision | Options | What to consider |
|---|---|---|
| Key ownership model | Provider-managed keys; customer-managed keys in the KMS; imported key material (BYOK); externally held keys (HYOK) | Customer-managed keys give you policy, rotation and audit control. BYOK and HYOK add control and operational burden. See the BYOK, HYOK and External Key Management Guide. |
| Protection level | Software-protected keys; HSM-backed keys; dedicated HSM partitions | Check the FIPS 140-3 validation of the module behind each level on the NIST CMVP list. Dedicated partitions suit CA and signing keys; see the HSM Deployment and Operations Guide. |
| Key granularity | Per account or project; per application; per data classification; per tenant | Finer keys narrow the blast radius of one key policy mistake and support crypto-shredding of one tenant, at the cost of more keys to govern. |
| Where keys live | Central security account or project; workload accounts | A central key account simplifies separation of duties and audit; workload-local keys reduce cross-account dependencies. Many estates use central keys for regulated data and local keys for the rest. |
| Regionality | Single-region keys; multi-region or replicated keys | Replicated keys help disaster recovery but also replicate any policy mistake. Match to data residency rules. |
| Rotation | Automatic rotation of key material; manual rotation by new key and re-encryption | Automatic rotation keeps old versions for decryption and changes nothing for callers. Manual rotation is needed for imported material and some asymmetric keys. |
Naming and tagging: agree a pattern such as environment, application, data classification and purpose, and a mandatory tag set (owner team, cost centre, data classification, review date). Tags drive inventory, ownership and the metrics in the last phase.
Choosing for small versus large organisations: a small team on one cloud usually does best with customer-managed keys at HSM-backed protection, one key per application and environment, and automatic rotation. A large or multi-cloud estate needs a central key account per cloud, policy as code, and a decision on whether an external key manager should give one policy and audit plane across providers.
The rollout at a glance
| Phase | Main outputs | Exit criteria |
|---|---|---|
| 0. Inventory and design | Design record, data and key inventory, naming and tags, role model | Design approved by security and platform owners; inventory covers every account or project in scope |
| 1. Foundations | Key admin roles, break-glass path, logging to SIEM, deletion guardrails, policy templates in code | Admin actions logged and alerting; a test key cannot be deleted without the waiting period and an alert |
| 2. Pilot | Two or three non-production workloads on customer-managed keys | Rotate, disable and re-enable tested; caller identities visible in logs; latency within budget |
| 3. Production ring 1 | Low-risk production storage and databases | No unplanned outages for an agreed period; rollback rehearsed |
| 4. Production ring 2 | Regulated and high-value data, application-level envelope encryption | Evidence pack for audit; restore from backup tested under the new keys |
| 5. Enforce and operate | Preventive guardrails requiring customer-managed keys, review cadence, metrics | New resources cannot be created without an approved key; quarterly access review done |
Phase 0: inventory and design
- Find what is already encrypted and with what. List storage, database, queue, backup and secret stores in every account or project, and record the key type in use (provider-managed, customer-managed or none). Existing customer-managed keys usually have no owner tag; assign one now. The Cryptographic Inventory and CBOM Guide covers wider discovery.
- Classify the data. Decide which classifications require customer-managed keys, which need HSM-backed protection, and which may stay on provider-managed keys.
- Define roles. At minimum: key administrator (create, set policy, rotate, schedule deletion), key user (encrypt, decrypt, generate data keys for named keys only), auditor (read configuration and logs), and a break-glass role. Map each to a group or a pipeline identity, not to individuals.
- Set our recommended cryptoperiods. NHI Mgmt Group recommends annual automatic rotation for symmetric keys as a default, shorter for high-volume keys, set from a risk assessment as NIST SP 800-57 Part 1 Rev. 5 describes. The OWASP Key Management Cheat Sheet also notes usage limits, for example capping AES-GCM keys with random 96-bit IVs at 2^32 encryptions.
Phase 1: foundations before the first production key
- Admin access: key administration only through privileged roles with MFA, time-bound elevation and no standing access for humans. Infrastructure pipelines that create keys use their own workload identity with permission to create and tag keys but not to use them for decryption. See the Cloud PAM and Just in Time Access guide for elevation patterns.
- Policy templates in code: write key policy templates once, review them, and stamp them out through infrastructure as code. A template should name principals explicitly, avoid wildcards for key users, and separate administrative actions from cryptographic use.
- Deletion guardrails: set the longest practical waiting period for scheduled deletion, alert on every scheduled deletion and every disable, and require two-person approval through change management for production keys. Prefer disabling a key for a period before scheduling deletion so dependent services surface quickly.
- Logging: send KMS administrative and data-plane events to your SIEM. Make sure data-plane logging (encrypt, decrypt, generate data key) is on, as some platforms log it separately from management events or sample it.
- Break-glass: a sealed emergency role that can restore a key policy if an administrator locks everyone out. Many KMS platforms let a key policy exclude even account administrators, so test recovery from a self-lockout on a test key.
- Backups: confirm how backups and snapshots are encrypted and that a restore needs only keys you will keep. Never let backup keys share a deletion approval path with the production keys they back up.
Phase 2: pilot
Choose two or three non-production workloads that represent your main patterns: one storage service with server-side encryption under a customer-managed key, one managed database, and one application that calls the KMS directly for envelope encryption. For each, run these tests and record results:
- Encrypt new data under the customer-managed key and confirm the caller identity in the data-plane log.
- Attempt a decrypt from an identity that is not a key user and confirm it is denied and logged.
- Rotate the key and confirm existing data stays readable and new data uses the new version.
- Disable the key and record exactly what breaks and how quickly; re-enable and confirm recovery.
- Measure latency and request volume against the platform's documented quotas; add data-key caching in applications where volume requires it, within the limits in the envelope encryption guide.
- Restore a backup taken under the key into a clean environment.
Rollback for the pilot: keep the original resources until tests pass. Moving a resource back to provider-managed keys usually means re-encrypting or copying it, so plan the copy path before you start.
Phases 3 and 4: production rings
- Ring 1: low-risk production data where a short outage is tolerable. Onboard by application, one change per application, using the approved templates. Watch denied decrypts and throttling for an agreed period, which NHI Mgmt Group suggests is at least two weeks, before moving on.
- Ring 2: regulated and high-value data, plus application-level envelope encryption for sensitive fields. Add encryption context or additional authenticated data so ciphertext is bound to its tenant or record, and make the KMS policy check it where the platform supports conditions.
- Existing data: switching a resource to a new key often protects only new writes. Plan re-encryption or copy jobs for existing data, track completion per resource, and keep the old key enabled until every dependent object has moved.
- Rollback: for each application keep a documented path back: the previous key stays enabled, the change is a single reverted template, and the runbook lists the copy or re-encrypt step if data was moved. Day-two procedures belong in the Cloud key management service (KMS) day-2 operations runbook.
Where identity fits
Every encrypt and decrypt is made by a machine identity: a compute role, a service account, a pipeline or an AI agent's tool. That makes the KMS one of the clearest places to apply non-human identity controls.
- Use platform workload identity: attach roles or service accounts to compute and use federation for anything outside the cloud. Do not issue long-lived access keys to call the KMS. See the API Key Management Guide for retiring static keys.
- Scope users to keys: a key user identity should be able to use only the named keys for its application, and only the operations it needs (some need generate data key but never decrypt).
- Watch cross-account use: cross-account key grants are legitimate for central key accounts and are also how an attacker with one compromised role reaches data elsewhere. Review them every quarter.
- Treat ransomware with your own keys as a threat: an attacker with storage write rights and their own key, or with rights on your key policy, can encrypt your data in place. Restrict which keys a storage resource may use and alert on unexpected key references.
Detection and measurement
| Signal | Why it matters | Response |
|---|---|---|
| Scheduled key deletion or disable | Highest-impact change; can cause permanent data loss | Page the key owner; cancel if not approved |
| Key policy change adding external or wildcard principals | Opens key use beyond the design | Revert from the policy template; investigate the changing identity |
| Spike in decrypt calls from one identity | Possible bulk data access with stolen credentials | Compare with baseline; suspend the identity if unexplained |
| Denied decrypts after a change | Misconfiguration or a lockout in progress | Check the change record; roll back the template |
| Imported key material nearing expiry | Imported material can be set to expire, stopping use | Re-import or rotate before expiry |
Metrics that show the rollout is working:
- Percentage of in-scope resources encrypted under customer-managed keys, by data classification.
- Percentage of keys with an owner tag and a review date in the last 12 months.
- Number of identities with key administration rights, and how many have standing rather than just-in-time access.
- Percentage of KMS callers using workload identity rather than static access keys.
- Mean time to detect a test deletion or policy change in the SIEM (exercise quarterly).
Common failure patterns
- One key for everything: a single customer-managed key per account means one policy error exposes, or one deletion destroys, all data in that account.
- Admins who can decrypt: key administrator roles that also hold decrypt permission remove the separation of duties the KMS is meant to provide.
- Switching keys without re-encrypting: teams change the default key on a storage service and assume existing objects moved; they did not, and the old key is later deleted.
- Static keys calling the KMS: long-lived access keys in configuration files give anyone who finds them both the ciphertext and the means to decrypt it.
- Self-lockout: a key policy edited without a break-glass principal leaves a production key that nobody can administer.
- Data-plane logging off: management events are logged but decrypt calls are not, so a bulk read leaves no trace.
Framework mapping
| Rollout element | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | Other |
|---|---|---|---|
| Key policy, cryptoperiods, key states | SC-12 Cryptographic Key Establishment and Management | PR.DS-01 | NIST SP 800-57 Parts 1 and 2; CSA CCM v4.1 CEK domain |
| Encryption at rest under managed keys | SC-28, SC-28(1) | PR.DS-01 | ISO/IEC 27001:2022 Annex A control on use of cryptography |
| Admin and user role separation | AC-5, AC-6 | PR.AA-05 | CSA CCM v4.1 IAM domain |
| Key availability and backup | SC-12(1), CP-9 | PR.DS-01 | NCSC Cloud Security Principle 2 |
| Logging and monitoring of key use | AU-2, AU-6, SI-4 | DE.CM-03 | CSA CCM v4.1 LOG domain |
| Templates and guardrails | CM-2 | PR.AA-05 | Policy as code |
Practitioner checklist
- Write and approve a KMS design record covering ownership model, protection level, granularity, regionality, rotation and naming.
- Confirm the FIPS 140-3 validation of the module behind each protection level on the NIST CMVP list.
- Create separate key administrator, key user, auditor and break-glass roles; no human holds standing admin access.
- Stamp out key policies from reviewed templates in infrastructure as code, with no wildcard key users.
- Set the longest practical deletion waiting period, alert on every disable and scheduled deletion, and require two-person approval.
- Turn on data-plane logging and route all KMS events to the SIEM with the caller identity.
- Move every KMS caller to workload identity and retire static access keys.
- Pilot rotate, disable, deny and restore tests before production; keep a rollback path for each application.
- Re-encrypt existing data after key changes and track completion per resource.
- Enforce customer-managed keys for in-scope resources with preventive guardrails once ring 2 is complete.
Standards and references
- NIST: SP 800-57 Part 1 Rev. 5, Recommendation for Key Management, Part 1: General
- NIST: SP 800-57 Part 2 Rev. 1, Best Practices for Key Management Organizations
- NIST: SP 800-130, A Framework for Designing Cryptographic Key Management Systems
- NIST: Cryptographic Module Validation Program
- Cloud Security Alliance: Cloud Controls Matrix
- NCSC: Cloud Security Principle 2, Asset protection and resilience
- OWASP: Key Management Cheat Sheet
Related NHI Mgmt Group resources: Securing the cloud key management service (KMS) itself · Cloud key management service (KMS) integration security guide · Cloud key management service (KMS) migration playbook · Encryption Key Compromise Playbook · Encryption Buyer's Guide