Cloud Key Management Service in Google Cloud: Guarding the Keys to Your Data
A friendly, in-depth guide to Cloud KMS: how encryption keys are created, stored, rotated, protected and destroyed, and how to use them with your own services, with clear choices between software, hardware and external protection.
Imagine you keep valuables in a strong safe. The safe is excellent, but if you tape the key to the front door, the safe protects nothing. In the cloud, your data is the valuables, encryption is the safe, and the encryption keys are the keys. Almost every serious security incident involving encrypted data is really a story about keys: keys left in the wrong place, keys that too many people could reach, keys that nobody remembered to change, or keys that were destroyed by accident. Cloud Key Management Service, usually called Cloud KMS, is the Google Cloud service built so that keys are created, guarded, used, changed and retired with care, and so that you can prove who did what with them.
1What Is Cloud KMS?
Cloud KMS is a managed service for creating and using cryptographic keys, without ever needing to handle the raw key yourself.
Cloud KMS lets you create keys, control who may use them, and ask the service to perform cryptographic operations on your behalf, such as encrypting a piece of data, decrypting it again, signing a message or checking a signature. The most valuable property is that the secret key material can stay inside the service. Your application sends data to Cloud KMS and receives a result, and the key itself never has to appear in your code, your configuration files or your laptop.
Cloud KMS also connects to many other Google Cloud services. When a storage bucket, a database or a disk is protected with a key that you manage in Cloud KMS, the arrangement is called customer-managed encryption keys, shortened to CMEK. This gives you control: you decide who can use the key, how often it changes, and you can disable it to make the protected data unreadable.
Cloud KMS is like a bank’s safe deposit service with a very careful clerk. You never carry the master key around. Instead, you ask the clerk to lock or unlock a box for you, the clerk checks your identity, writes the request in a logbook, and does the job inside the vault.
What Cloud KMS is not
Cloud KMS is not a place to store ordinary passwords or application secrets such as database credentials. Google Cloud has a separate service for secrets. Cloud KMS manages cryptographic keys and performs cryptographic operations. It is also not a replacement for good access control, because a key that anyone can use protects nothing.
Google adds options and adjusts prices over time. Use this guide to understand the ideas, and confirm exact capabilities, locations and prices on the official pages before making decisions.
2Why Key Management Matters
Encryption is only as strong as the care given to its keys.
Modern encryption algorithms are extremely strong. Nobody breaks them by clever mathematics. Attackers instead look for the keys, because stealing a key is far easier than defeating the algorithm. So the real security question is never just “is the data encrypted?” It is “where are the keys, who can use them, how are they changed, and could we notice misuse?”
Keys in Code
Developers paste keys into source files or configuration, where many people and systems can read them.
One Key for Everything
A single key protecting all data means one theft exposes everything.
Keys Never Changed
A key used for years has had years of chances to leak, and a leak gives access to years of data.
No Record of Use
If nobody logs key use, misuse goes unnoticed until the damage is public.
Accidental Loss
Destroying the only copy of a key makes the encrypted data unrecoverable forever.
Rules and Regulations
Many industries require proof that keys are protected in particular ways, and managed by particular people.
A burglar does not drill through a vault door if the key is under the doormat. Spending on thick doors while leaving keys lying around is a common and costly mistake.
Strong key control cuts both ways. If a key is destroyed and no copy exists, the data it protected cannot be recovered by anyone, including Google.
3Core Concepts and Vocabulary
Learn these words once and the documentation becomes much easier to read.
Encryption
Scrambling data with a key so only someone with the right key can read it.
Key
A secret value used by an algorithm to lock or unlock data, or to sign and verify.
Key Ring
A named group of keys in one location, used to organize keys and manage access to them together.
CryptoKey
A named object that represents a key and holds one or more versions of it.
Key Version
One numbered generation of key material inside a key. Rotation creates a new version.
Symmetric Key
One secret that both locks and unlocks, fast and used for bulk data.
Asymmetric Key
A pair of keys, one public and one private, used for signing or for encrypting to a recipient.
Rotation
Creating a fresh key version on a schedule, so each version protects a limited amount of data.
Protection Level
Where and how the key material is protected: software, hardware module or an external system.
HSM
Hardware Security Module, a tamper-resistant device that stores keys and does cryptography inside.
CMEK
Customer-managed encryption keys, where you control the key that protects data in a Google Cloud service.
EKM
External Key Manager, which lets keys live in a system outside Google Cloud while services still use them.
A key ring is a labeled drawer in the key cabinet, a key is one named set of copies for a particular door, and a key version is the current edition of that copy. When the locks are changed, a new edition is made, but the old ones are kept for old doors until it is safe to throw them out.
People often mix these. A key is the stable named object you refer to. Versions inside it come and go as you rotate. Applications usually name the key and let the service pick the right version.
4Encryption Basics: Symmetric and Asymmetric
Two families of cryptography do different jobs, and Cloud KMS supports both.
Symmetric encryption uses one secret key for both locking and unlocking. It is fast, which makes it the right tool for protecting large amounts of data such as files and database contents. The trade-off is that anyone who needs to unlock the data must hold the same secret, so the secret must be shared with great care.
Asymmetric cryptography uses a pair of mathematically linked keys. The public key can be shared with anyone. The private key is kept secret. Data locked with the public key can be unlocked only by the private key, and a signature made with the private key can be checked by anyone using the public key. It is slower, so it is used for small things like exchanging secrets and proving identity.
| Aspect | Symmetric | Asymmetric |
|---|---|---|
| Keys | One shared secret | A public and private pair |
| Speed | Fast | Slower |
| Best for | Encrypting bulk data | Digital signatures and key exchange |
| Main challenge | Sharing the secret safely | Protecting the private key and trusting the public key |
| Cloud KMS example | Encrypt and decrypt data at rest | Sign software releases or documents |
Symmetric encryption is a padlock where everyone who needs to open it has a copy of the same key. Asymmetric is a mailbox with a public slot: anyone can drop a letter in, but only the owner with the private key can open the box. For signatures, imagine a stamp only you can make, which anyone can recognize.
Use symmetric keys to protect stored data. Use asymmetric keys when you need signatures or when parties who do not share a secret must work together.
5Envelope Encryption: The Core Pattern
Almost all cloud encryption uses a two-layer design called envelope encryption.
Sending large amounts of data to a key service for every operation would be slow and costly. Instead, data is encrypted with a data encryption key, called a DEK, which is generated locally and is used to scramble the data quickly. The DEK itself is then encrypted with a stronger, central key, called a key encryption key, or KEK, which lives in Cloud KMS. The encrypted DEK is stored next to the encrypted data. To read the data, the system asks Cloud KMS to unwrap the DEK, then uses the DEK to unlock the data.
sequenceDiagram
participant App as Application
participant KMS as Cloud KMS
participant Store as Storage
App->>App: Create a fresh data key
App->>App: Encrypt data with the data key
App->>KMS: Wrap the data key with the master key
KMS-->>App: Wrapped data key
App->>Store: Save encrypted data and wrapped data key
Note over App,Store: Later, to read the data
App->>Store: Fetch encrypted data and wrapped key
App->>KMS: Unwrap the data key
KMS-->>App: Plain data key
App->>App: Decrypt data, then discard data key
Why this design is so popular
Speed
Bulk data is encrypted locally and quickly, with only a tiny key sent to the service.
Central Control
Disabling the master key makes every wrapped data key, and so all the data, unreadable.
Easy Rotation
Changing the master key requires re-wrapping the small data keys, not re-encrypting all data.
Limited Exposure
Each object or chunk can have its own data key, so a stolen data key exposes only a small part.
Imagine locking each document in its own small box with a small key, then putting each small key into a bank vault. Reading a document means asking the vault for its small key. The vault holds only small keys, yet controls access to everything.
When you use CMEK with a Google Cloud service, the service performs envelope encryption automatically. You manage the master key in Cloud KMS, and the service handles the data keys.
6Three Ways to Control Your Encryption Keys
Google Cloud offers a spectrum from fully managed by Google to fully controlled by you.
By default, Google Cloud encrypts customer data at rest automatically, using keys that Google manages. You do not need to do anything. Some organizations want more control, for compliance or for their own security policy, and Cloud KMS provides that control in steps.
| Approach | Who Manages the Key | What You Gain | What You Take On |
|---|---|---|---|
| Default encryption | No effort, always on | No control over key life cycle | |
| Customer-managed keys in Cloud KMS | You control the key, Google runs the infrastructure | Control of access, rotation, disabling and audit | Responsibility for key policy and avoiding accidental loss |
| Hardware-protected keys | You control the key, stored in certified hardware | Meets stricter regulatory demands for hardware protection | Higher cost |
| External keys | You, in a system outside Google Cloud | Google cannot access the key material | Highest cost, dependency on external availability |
Moving to a higher level of control is a business decision. More control brings more responsibility. If you mismanage a key you control, your data may become unavailable, and no one at Google can rescue it.
It is like storing valuables. You can leave them in the hotel’s safe, rent your own box at a bank, use a box in a certified military-grade vault, or keep the only key in your own home. Each step gives you more control and asks more care.
Default encryption is already strong. Move to customer-managed keys when you have a real requirement such as compliance, separation of duties or the need to revoke access quickly.
7The Resource Hierarchy: Key Rings, Keys and Versions
Cloud KMS organizes keys in three levels inside a project.
flowchart TD
P["Project"] --> KR1["Key ring: payments, location europe-west1"]
P --> KR2["Key ring: logs, location us-central1"]
KR1 --> K1["Key: card-data (symmetric encryption)"]
KR1 --> K2["Key: invoice-signing (asymmetric signing)"]
K1 --> V1["Version 1"]
K1 --> V2["Version 2 (primary)"]
K2 --> V3["Version 1"]
Key Ring
Groups keys in one location and lets you manage access to the group. Its name must be unique within a location, and key rings themselves do not cost anything.
Key
A named object that exists on exactly one key ring in one location. Access is managed at the key level, not for each version.
Key Version
The actual key material, numbered from 1. Rotating a key adds a new version, and decryption needs the same version used for encryption.
Two facts matter for planning. First, resources cannot be moved to a different location after creation, so choose the location carefully at the start. Second, key rings and keys cannot be renamed, and the names of deleted keys cannot be reused, so choose names that will still make sense years later.
The key ring is a labeled cabinet drawer in a particular office. Each key in the drawer opens a particular type of door. Each key has editions numbered by year: the newest edition makes new locks, and older editions are still needed to open older locks.
Because access can be granted at the key ring, you can place keys with the same audience on the same ring and manage them together.
8Choosing Key Locations
Where a key lives affects speed, compliance and availability.
Every key ring is created in a specific location, which may be a single region, a multi-region or the global location. The location of a key determines where its key material is stored and processed. For the best results, keep the key in the same location as the data it protects: a service in one region should use a key in that same region, because this reduces delay and avoids confusing dependency across regions.
Follow the Data
Choose the key location that matches the location of the data or service that will use it. Many services require this match for CMEK.
Check Compliance Needs
Some rules require that keys stay within a country or region.
Consider Availability
Multi-region and global options exist for resilience, but not every protection level is offered in every location.
Remember It Is Permanent
You cannot move a key to another location later. If you choose wrongly, you create a new key and re-encrypt the data.
Putting a key in a different country from the lock is like keeping your front door key in a safe in another city. It might work, but every use is slower, depends on the journey, and invites questions from regulators.
Not every protection level is available in every location. For example, Google documents that some external key options are not offered in certain multi-region locations. Confirm before designing.
9Key Purposes and Types
When you create a key, you decide once what it is for, and this cannot be changed later.
Every key has a purpose, which defines the operations allowed with it, such as symmetric encrypt and decrypt, asymmetric signing, asymmetric decryption, or message authentication. The purpose is set at creation and cannot be changed. Every version of the key shares the same purpose. The type, symmetric or asymmetric, is part of the purpose.
| Purpose | Typical Use | Notes |
|---|---|---|
| Symmetric encrypt and decrypt | Protecting data at rest, wrapping data keys, CMEK | Has a primary version used by default |
| Asymmetric signing | Signing releases, documents, tokens | No primary version, so you name the version |
| Asymmetric decryption | Receiving data encrypted by others with your public key | Public key can be shared widely |
| Message authentication | Verifying that a message was not altered, using a shared secret | Both sides need the same key |
Because the purpose is permanent, plan your keys by job. One key for encrypting a database, one for signing releases and one for protecting backups, for example, each with its own access rules. Mixing jobs on a single key couples unrelated systems and makes access control clumsy.
A key blank is cut for a single type of lock when it is made. A key cut for a door cannot be re-cut into a car key. You choose the type at the start, and for another job you make another key.
Separate keys for separate purposes and separate data sets keep the blast radius small and make audit logs easier to read.
10Key Versions and Their States
Each key version moves through a small set of states, and knowing them prevents disasters.
stateDiagram-v2
[*] --> Enabled
Enabled --> Disabled: disable
Disabled --> Enabled: re-enable
Enabled --> ScheduledForDestruction: schedule destroy
Disabled --> ScheduledForDestruction: schedule destroy
ScheduledForDestruction --> Disabled: restore before deadline
ScheduledForDestruction --> Destroyed: delay period ends
Destroyed --> [*]
Enabled
The only state in which a version can be used for encryption, decryption, signing or verification.
Disabled
Not usable, but not destroyed. This is the safe way to test whether anything still depends on a version.
Scheduled for Destruction
Waiting out a delay period during which the version can still be recovered.
Destroyed
The key material is permanently deleted. Data protected only by this version can never be decrypted.
Google’s documentation notes that versions in any state other than destroyed are billed, which is a reason to destroy versions you truly no longer need, after the safety steps in the destruction chapter. Disabling or destroying a whole key disables or destroys all of its versions at once.
The states resemble a document’s journey: in use, put in a locked drawer, placed in the shredding bin with a pickup date, and finally shredded. Anything in the bin can still be rescued until the pickup. After shredding, nothing can be done.
Before destroying a version, disable it and watch for failures. If nothing breaks over a sensible period, destruction is far safer.
11The Primary Version and Which Version Is Used
When you ask a key to encrypt, someone must decide which version does the work.
Symmetric encryption keys have a primary version. When you encrypt without naming a version, Cloud KMS uses the primary. The result carries information about which version was used, so decryption automatically picks the right one, as long as that version is still enabled. Asymmetric keys have no primary version, so you always specify the version, since a public key and signature belong to a particular version.
New Data Uses the Primary
Anything encrypted today uses the current primary version.
Old Data Keeps Its Version
Data encrypted earlier remembers which version protected it and still needs that version enabled to be read.
Rotation Changes the Primary
After rotation, the newest version becomes primary, and older versions stay available for old data.
Old Versions Can Retire
Once all data has been re-encrypted with newer versions, old versions can be disabled and eventually destroyed.
A company issues new staff badges every year. New staff get this year’s badge. A door lock still accepts older badges until the old edition is officially retired. The lock knows the badge year because each badge has the year printed on it.
Applications should name the key and let Cloud KMS choose the primary version for encryption. That way rotation needs no code change.
12Key Rotation
Rotation limits how much data any single key version protects and how long a leak could matter.
Rotating a key means creating a new version and making it the primary. Older versions remain available to decrypt data they protected. Google’s documentation points out that rotation by itself is a free administrative operation, while re-encrypting existing data with the new version counts as ordinary cryptographic operations that are billed. Many organizations schedule automatic rotation for symmetric keys at a regular interval, such as every few months, and rotate immediately if a compromise is suspected.
Benefits of Rotation
- Limits the data exposed by any one stolen key version
- Meets many security and compliance standards
- Builds the habit and tooling for emergency changes
- Costs almost nothing to perform
Things to Watch
- Old versions are still billed until destroyed
- Old data is not automatically re-encrypted
- Some uses, like signatures, need old public keys retained
- Rotation does not replace controlling who can use keys
Rotation versus re-encryption
A common misunderstanding is that rotation protects data already stored. It does not by itself. Data encrypted with version 1 stays protected by version 1 until someone re-encrypts it with a newer version. If you truly need old data protected by a new key, for example after a suspected leak, you must run a re-encryption job. For many services using CMEK, the service handles key wrapping, and the exact behavior on rotation depends on the service, so read its documentation.
Changing the locks on your office means new doors get the new lock. Old filing cabinets still use the old lock until you replace theirs too. The new lock stops future problems, but cleaning up the past takes extra work.
Set an automatic rotation schedule when you create a symmetric key. A rotation that depends on human memory eventually gets forgotten.
13Protection Levels at a Glance
The protection level tells you where the key lives and how strongly it is guarded.
| Level | Where Keys Live | Assurance | Relative Cost |
|---|---|---|---|
| Software | Cryptographic operations run in software inside Google’s service | Based on FIPS 140-3 Level 1 validated primitives, according to Google’s documentation | Lowest |
| Cloud HSM (multi-tenant) | Google-owned shared hardware security modules | FIPS 140-2 Level 3 validated hardware, per Google’s documentation | Higher |
| Single-tenant Cloud HSM | Dedicated partitions on Google-managed HSMs in an instance you administer | Isolation from other customers; check the documentation for validation details | Higher still |
| External key (over internet or VPC) | Your own external key manager outside Google Cloud | Google cannot access your key material | Highest |
flowchart TD
Q["Do you have a specific requirement?"] -->|"No special rules"| S["Software keys"]
Q -->|"Need certified hardware"| H["Cloud HSM"]
Q -->|"Need dedicated isolated hardware"| T["Single-tenant HSM"]
Q -->|"Google must not hold key material"| E["External key manager"]
All levels share common features: you can use them with CMEK-integrated services (although some services do not support external keys), control them with IAM, enable or disable individual versions and see operations in audit logs. The next three chapters look at each level in turn.
The levels are like storage choices: a locked drawer in a secure office, a certified bank vault, a private vault room with your own access list, or keeping the key at your own house. Security and cost both rise as you go along that list.
Choose the level your rules or risk assessment require, no higher. A level above your needs only adds cost and, for external keys, availability risk.
14Software Keys
The default and cheapest option, suitable for most workloads without special regulatory requirements.
With software protection, cryptographic operations run in software inside Google’s key management service, using Google’s cryptographic module. Keys can be generated by Google or imported. Software keys are the cheapest, and for the great majority of businesses they provide excellent protection, since the keys are never exposed outside the service and every use is controlled by access rules and recorded in audit logs.
General Application Encryption
Protecting application data at rest with customer-managed keys when no rule demands hardware certification.
Development and Testing
Environments that should mirror production’s key structure at a low cost.
Signing Internal Artifacts
Signing build outputs or internal tokens where software-level assurance is acceptable.
Google’s documentation describes software keys as a good fit for workloads without specific regulatory requirements for a higher validation level. If a regulator or customer contract names a specific hardware standard, move up a level.
A software key is a secure lockbox in a well-guarded building. For nearly all everyday valuables, that is ample. Only if an insurer demands a certified bank vault do you need to go further.
Teams sometimes choose hardware keys because they sound safer. Choose on requirement, not feeling, and confirm what your auditors actually ask.
15Cloud HSM: Hardware-Protected Keys
Hardware security modules keep keys inside tamper-resistant devices.
A hardware security module is a specialized physical device built so that keys inside cannot be read out, even by someone with physical access. With Cloud HSM, Google operates these devices, and your keys live and are used inside them. According to Google’s documentation, the multi-tenant HSM offering uses hardware validated to FIPS 140-2 Level 3. Each key has an attestation statement and certificate chains that can be used to verify the key and hardware properties. You use Cloud HSM through the same Cloud KMS interfaces, with no special HSM-specific code, simply by choosing the HSM protection level when creating a key.
Two forms
| Aspect | Multi-Tenant HSM | Single-Tenant HSM |
|---|---|---|
| Sharing | Google-owned HSMs shared by many customers, with logical separation | Dedicated partitions on Google-managed HSMs in an instance you create |
| Administration | Google manages everything | You administer your own instance |
| Best for | Regulated workloads needing certified hardware without managing HSM clusters | Customers needing isolation from other customers and administrative control |
| Cost | Higher than software, billed per key version and operations | Higher still, with an hourly instance charge according to the pricing page |
| Availability | Offered in many locations | Limited regions; confirm current list |
Multi-tenant HSM is a safe deposit box in a large bank vault run by the bank, with a lock that even the manager cannot override. Single-tenant HSM is renting a private vault room inside the bank, with your own entry procedures.
Many requirements can be met with multi-tenant HSM. The dedicated option makes sense mainly where contractual or regulatory rules demand isolation and control.
16Cloud EKM: Keys Outside Google Cloud
For the strictest demands, the key never has to enter Google Cloud at all.
Cloud External Key Manager, or Cloud EKM, lets you keep keys in an external key management system run by you or by a supported partner. Google Cloud stores extra cryptographic material and a path to your external key, but according to the documentation, when you use Cloud EKM keys, Google Cloud cannot access your key material. When a service needs to unwrap a data key, the request travels to your external system, which decides whether to allow it.
Two network paths exist: over the internet, and over a private network connection called a VPC. The documentation notes that the internet path carries availability risk and recommends the VPC path or Cloud HSM for better availability. If your external system is unreachable, the data it protects can become temporarily unreadable.
Why Choose External Keys
- Google cannot access the key material
- You can revoke access from your own system instantly
- Helps meet strict sovereignty or contractual duties
- Keeps the root of trust in infrastructure you choose
What It Costs You
- Highest price among protection levels
- Dependency on your external system being up and reachable
- Not every Google Cloud service supports external keys
- More operational work and partner charges
External keys are like leaving the only key to your warehouse with a trusted friend in another town. The warehouse manager must phone your friend every time the door must open. Safe from the manager, but if the phone line breaks, nobody can enter.
If your external key system goes down, protected data may become unavailable. Design redundancy and runbooks for that system as carefully as for Google Cloud itself.
17Importing Your Own Key Material
Sometimes the key must come from outside, and Cloud KMS supports importing it.
Normally Cloud KMS generates key material itself, which is the safest approach because the material never exists anywhere else. In certain cases, for example when migrating from another system or meeting a rule that requires you to generate keys in your own process, you can import key material into software or HSM keys. Google’s documentation describes the generated or imported origin for these levels. Import uses a wrapping process so the key is protected while traveling to Cloud KMS.
Prepare an Import Job
Create an import job in Cloud KMS that provides a public wrapping key for this transfer.
Wrap Your Key Locally
Wrap your key material with the wrapping key in a secure environment, so it is never sent in the clear.
Import
Send the wrapped key to Cloud KMS, which unwraps it inside protected infrastructure and creates a key version.
Retire the Local Copy Safely
Securely destroy or lock away your local source copy, because a spare copy is exposure.
Exact steps and supported algorithms evolve, so follow the current import documentation. Whenever possible, prefer keys generated inside Cloud KMS.
Importing is moving a precious item to a new vault. You seal it in a tamper-evident case before transport, ship it in an armored van, and the vault opens the case only inside its own walls.
If you hold a copy outside the service, you must protect that copy for the key’s whole life, and you remain responsible for recovery if it is lost.
18Using CMEK with Google Cloud Services
The most common way to use Cloud KMS is to point another Google Cloud service at a key you control.
Many Google Cloud services, including storage, databases, data warehouses, messaging and disks, can be configured to protect their data with a customer-managed key from Cloud KMS. Once configured, the service uses envelope encryption in the background. It generates data keys, wraps them with your key, stores the wrapped result, and calls Cloud KMS whenever it needs to unwrap. You do not change your application. You only decide which key protects which resource.
The permissions work through service agents. Each service has a special identity, managed by Google, that acts on your project’s behalf. To let a service use your key, you grant that service’s identity a narrow role that allows encrypting and decrypting with the key and nothing more. If you later remove that permission, or disable the key, the service can no longer unwrap the data keys, and the protected data becomes unreadable until access is restored.
Create the Key in the Right Location
Place a symmetric key in the same location as the resource that will use it. Many services require this match.
Grant the Service Agent Access
Give the service’s identity the encrypt and decrypt role on that key.
Configure the Resource
Select the key when creating the bucket, disk, dataset or database.
Test Access and Monitoring
Confirm that the service works and that key use appears in audit logs.
Document the Dependency
Record which resources depend on the key, so nobody disables or destroys it casually.
What changes when you choose CMEK
A Kill Switch
Disabling the key makes the protected data unreadable, which can be valuable in a security incident.
Separate Control
The people who manage keys can be different from those who manage the data.
Evidence
Audit logs show each time the service used your key.
Dependency
The service now depends on the key being enabled and reachable. A key problem becomes a data availability problem.
CMEK is like a warehouse that agrees to use your lock on its storage room. The warehouse staff still do all the packing, but only with the key you allowed, and if you take that permission back, the room stays closed.
Support for CMEK, and for external keys in particular, varies by service. Check the service’s own documentation before designing around it.
19Cloud KMS Autokey
Autokey automates the busywork of creating keys for the services that need them.
Setting up CMEK by hand means creating key rings, creating keys, granting service permissions and remembering conventions. Across hundreds of resources, mistakes and inconsistencies are likely. Autokey is a Cloud KMS feature that creates keys on demand as developers create resources, following the structure and rules the security team defined. Developers get protected resources without waiting for a ticket, and security teams keep consistent naming, locations and protection levels.
The pricing page also notes a small free allowance connected to Autokey-created keys, covering a limited number of key versions and operations each month, aggregated across projects for a billing account. Confirm the current allowance and conditions before relying on it.
| Aspect | Manual CMEK | With Autokey |
|---|---|---|
| Key creation | Security team creates keys in advance or on request | Created automatically when a resource needs one |
| Consistency | Depends on people following conventions | Enforced by the configured rules |
| Speed for developers | Slower, with tickets | Faster, self-service |
| Control for security teams | Complete, but labor-intensive | Policy-driven, with less manual work |
| Best for | Few keys, special setups | Many teams and resources needing standard patterns |
Autokey is a hotel front desk that automatically cuts a room key when a guest checks in, using the hotel’s rules for which rooms and which type of lock. Guests do not wait for the locksmith, and the hotel never loses track of its keys.
The list of services and resource types Autokey supports grows over time. Look at the current documentation before planning around it.
20Access Control and Separation of Duties
Who may manage a key and who may use it are two different questions, and they should have different answers.
Cloud KMS uses Identity and Access Management to control access. A key administrator can create, rotate, disable and destroy keys, but should not necessarily be able to use the key to read data. A key user, which may be a service or a person, can encrypt and decrypt, but should not be able to change or destroy the key. Keeping these roles apart is called separation of duties, and it is one of the best protections against both mistakes and abuse.
| Role of Person or System | Should Be Able To | Should Not Be Able To |
|---|---|---|
| Key administrator | Create keys, set rotation, disable versions, schedule destruction | Encrypt or decrypt data with the keys |
| Application or service identity | Encrypt and decrypt with its own key | Change or destroy keys, or use other applications’ keys |
| Auditor | View key metadata and audit logs | Use or change keys |
| Security lead | Approve destruction and emergency actions | Perform daily operations alone |
Think about emergencies too. If a key must be disabled at once because of a suspected breach, who is allowed to do it, and how quickly can they be reached? A good design names an on-call group with that power, records every use of it, and rehearses the procedure, so that a real emergency is handled calmly instead of through frantic permission requests.
Practical rules
Grant on the Key or Ring
Give access on the specific key or key ring, not on the whole project, so a role cannot reach unrelated keys.
Use Groups
Assign key roles to groups so membership changes are easy to review.
One Identity Per Workload
Each application uses its own service account with access to only its own key.
Avoid Broad Roles
Avoid project-wide owner or editor roles for people who touch keys. Use narrow predefined roles, and check their current names.
Dedicated Key Projects
Many companies keep keys in a separate project from the data, so access to data projects does not imply access to keys.
Review Regularly
Check who can use or manage each important key, and remove access that is no longer needed.
In a bank, the person who maintains the vault door does not hold the keys to customers’ boxes, and the person who opens a customer’s box cannot change the vault’s locks. Two roles, so one mistaken or dishonest person cannot do everything.
A person with broad ownership of a project can often grant themselves key roles. Limit who holds such rights, especially on projects containing keys.
21Audit Logging and Monitoring
A key you cannot watch is a key you cannot trust.
Google Cloud’s audit logs record administrative actions on Cloud KMS, such as creating, disabling or destroying keys. Data access logs can record each use of a key for encryption or decryption, when enabled, which may produce a large volume of entries for busy services. Google’s documentation confirms that key operations appear in audit logs. Together, these logs answer who used which key, when, and from where.
Turn On the Right Logs
Enable the audit log types you need for sensitive keys and understand their volume and cost.
Send Logs to a Protected Place
Export them to a central location that key administrators cannot edit.
Alert on the Dangerous Events
Raise alerts for key disabling, destruction scheduling, permission changes and unusual spikes in use.
Review Periodically
Sample the logs to confirm that only expected identities use each key.
A useful habit is to decide, in advance, what normal looks like for each important key. A payments encryption key might be used thousands of times per hour by two known service identities during business hours. If the logs suddenly show a different identity, a different country or a burst at three in the morning, the difference stands out immediately. Without a picture of normal, every pattern looks plausible, and real attacks hide in the noise.
Logs also support compliance. Auditors often ask for proof that only approved people changed keys, that rotations happened on schedule and that destroyed keys were approved. If your logs and approval records are organized, such questions take minutes. If they are scattered, the same questions take weeks and shake confidence in the whole program.
Events worth an alert
Key Version Scheduled for Destruction
Always page a human, since this is the last easy chance to stop an irreversible loss.
Key Disabled
Disabling a key used by production services can cause an outage, so alert the owning team immediately.
Permission Changes on a Key
A new identity gaining use of a sensitive key deserves a review and a recorded reason.
Unusual Volume or Source
A sudden surge of decryption requests, or requests from an unfamiliar place, may signal data theft in progress.
Audit logs are the visitor book and camera feed of the key room. Nobody expects a thief to sign the book, but unusual names, odd hours and repeated visits to one drawer tell you where to look.
Data access logging for busy keys can generate many entries. Plan storage, retention and cost before enabling it everywhere.
22Destroying Keys Safely
Destruction is the only truly irreversible action in the service, so it deserves a ritual.
When a key version is destroyed, its key material is permanently deleted. Any data that depends on that version alone can never be decrypted again, by you, by Google or by anyone. This is exactly what you want when you intend to erase data by destroying its key, a technique sometimes called crypto-shredding. It is a disaster if done by mistake.
Cloud KMS reduces the risk through a scheduled destruction delay. When you request destruction, the version enters a scheduled for destruction state and stays recoverable until the delay ends. The length of this delay is configurable when the key is created, and the documentation I reviewed did not state a default, so check the current default and choose a delay that gives your team time to notice mistakes. A longer delay is safer, though versions in this state are still billed.
Find Every Dependency
List all resources and applications that use the key, including backups and old snapshots.
Re-Encrypt or Archive
If data must survive, re-encrypt it with a different key first.
Disable and Observe
Disable the version and watch for errors for a full business cycle, such as a month, to catch rare jobs.
Get Approval
Require a second person, ideally from security, to approve destruction.
Schedule and Wait
Schedule destruction, alert the owners and use the delay as a final safety window.
Destroying a key is like burning the only key to a locked archive. If the archive is full of evidence you must erase, burning is the point. If it holds your family photographs, you had better be sure that nobody still needs to open it.
Backups and snapshots protected by a key become unreadable when that key is destroyed. Forgotten backups are the most common source of regret after destruction.
23Signing, Verification and Message Authentication
Encryption keeps secrets. Signatures prove who made something and that it was not changed.
An asymmetric signing key lets you create a digital signature over a document, software package or token. The private key stays inside Cloud KMS, where only authorized identities can request signatures. Anyone can verify the signature using the public key, which can be downloaded and shared freely. If a single character of the document changes afterward, verification fails.
Message authentication codes, often shortened to MACs, are a related tool that uses a shared secret. Both the sender and the checker hold the same key, and the code proves that the message came from someone with the key and was not altered. Cloud KMS supports key purposes for both patterns.
Signing Software Releases
A build pipeline asks Cloud KMS to sign each release. Deployment systems verify the signature before running anything, so tampered software is rejected.
Signing Documents and Records
A business signs invoices or contracts to prove origin and integrity in later disputes.
Issuing Signed Tokens
An identity service signs tokens that other services verify using the public key, without ever contacting the issuer.
Protecting Webhook Messages
Systems attach message authentication codes to notifications so receivers can confirm authenticity.
Because asymmetric keys have no primary version, signing and verification always reference an explicit version. Keep old public keys available as long as signatures made with them still need to be checked, even after you stop signing with those versions.
A signature is an official seal that only the owner can press, but anyone can look at the stamp and recognize it. A message authentication code is a secret handshake between two people who have agreed on it in advance.
Verifiers must obtain the correct public key through a trusted route. A forged public key makes verification meaningless.
24Designing Your Key Layout
Good key design balances isolation, simplicity and cost.
A key layout decides how many keys you have, how they are grouped and who can use each. At one extreme, a single key protects everything, which is cheap and simple but disastrous if the key is lost or misused. At the other extreme, a different key protects every object, which provides isolation but may be costly and complex. Most organizations choose a middle path.
| Layout | Strength | Weakness | Good For |
|---|---|---|---|
| One key for the whole company | Very simple | Huge blast radius, no separation of access | Nothing serious |
| One key per environment | Production isolated from testing | All production data shares one key | Small organizations |
| One key per application per environment | Clear ownership, limited blast radius, simple access rules | More keys to manage, so automation is needed | Most organizations |
| One key per customer or data set | Strong tenant isolation, selective erasure | Many keys, cost and operations at scale | Software providers with strict tenant promises |
Naming and organizing
Names That Explain
Include the application, environment and purpose in the name, since names cannot be changed and deleted names cannot be reused.
Rings by Audience
Group keys with the same managers and users on the same key ring to simplify access.
Location by Data
Create the ring in the location of the data it protects.
Separate Project for Keys
Hold production keys in a dedicated project with very limited access.
A building with a single master key for every door is cheap but terrifying. A building with a separate key for every cupboard is absurd. A sensible building uses one key per office or floor, and a master key kept in a safe.
Since keys cannot be moved between locations or renamed, a few hours of layout planning early on save major re-encryption projects later.
25A Reference Architecture
A typical, sensible arrangement that many companies can adapt.
In this arrangement, a dedicated key project holds all production keys, with key rings per application and per location. A security team administers the keys, application teams cannot see or change them, and each application’s service account can use only its own key. Audit logs are exported to a protected logging project. Storage and databases use CMEK, and a signing key protects release pipelines.
flowchart LR
subgraph KP["Key project (security team only)"]
KR["Key ring per app and location"]
K1["Encryption key"]
K2["Signing key"]
KR --> K1
KR --> K2
end
subgraph AP["Application project"]
DB["Database with CMEK"]
BK["Storage bucket with CMEK"]
CI["Build pipeline"]
end
DB -->|"service agent wraps and unwraps"| K1
BK -->|"service agent wraps and unwraps"| K1
CI -->|"requests signatures"| K2
KP --> LG["Audit logs to protected logging project"]
AL["Alerts on disable, destroy, permission change"] --- LG
Why this works
Separation
People who control data do not control keys, and the reverse.
Small Blast Radius
A problem with one application’s key affects only that application.
Clear Evidence
Logs go to a protected place and are watched by alerts.
Easy Review
The layout is simple enough that auditors can understand it quickly.
It is a bank with a separate key department. Branches use boxes and vaults, but only the key department cuts, changes and retires keys, and every key request is written in a ledger the branches cannot alter.
26Understanding Pricing
Cloud KMS pricing has two main parts: how many key versions you keep, and how many operations you perform.
On the pricing page I reviewed, an active key version is billed for as long as it exists in any state other than destroyed. That means enabled, disabled and scheduled for destruction all cost money, while destroyed versions are free. Prices rise with the protection level. Illustrative monthly equivalents shown there were roughly six cents for a software key version, about one dollar for a hardware-protected symmetric or RSA 2048 key version, and about three dollars for an external key version, with some hardware key types priced higher in a tiered table. Cryptographic operations were listed at about three cents per ten thousand, with some hardware operations at a higher rate, and administrative operations such as rotation were free. Single-tenant HSM instances have a separate and much larger hourly charge. Prices change, and some details on the page were unclear, so always confirm on the official page and SKU list.
| Cost Item | How It Is Billed | Order of Magnitude From The Page |
|---|---|---|
| Software key version | Per hour while not destroyed | Roughly cents per month |
| Hardware key version | Per hour while not destroyed | Roughly one dollar per month for common types |
| External key version | Per hour while not destroyed | Roughly three dollars per month, plus partner charges |
| Cryptographic operations | Per ten thousand operations | Cents per ten thousand |
| Administrative operations | Not charged | Free |
| Single-tenant HSM instance | Hourly from creation, regardless of use | Thousands of dollars per month, with key versions included up to a limit |
Ways to keep the bill sensible
Match Protection to Requirement
Do not pay for hardware or external keys where software suffices.
Retire Old Versions
After safe re-encryption and observation, destroy versions you no longer need so they stop billing.
Use Envelope Encryption
Encrypt data locally with data keys and call Cloud KMS only to wrap them, to avoid millions of operations.
Cache Unwrapped Keys Briefly
Where safe and supported, reuse a recently unwrapped data key for a short time instead of unwrapping repeatedly.
Watch the Log Volume
Detailed audit logging of every key use can cost more than the keys themselves on very busy systems.
Note also that all charges go to the project that owns the key, even when the key protects resources in other projects. If you want cost visibility per application team, consider labels and billing reports, and remember this when placing keys in a central key project.
Pricing resembles renting safe deposit boxes: a small monthly fee for each box, a bigger fee for a box in a high-security vault, and a tiny fee each time you ask the clerk to open one. Boxes you no longer need are cheapest when returned.
Estimate with Google’s pricing calculator, and review actual billing after the first month, because real usage patterns often differ from plans.
27Real-World Scenarios
Stories show how these ideas appear in daily life.
Scenario 1: A Payments Company
A payments business must show auditors that card data is protected with keys it controls, in certified hardware. It chooses hardware-protected keys, one per application per environment, held in a dedicated key project. Security staff administer keys, applications can only use theirs, and logs go to a protected project with alerts on disabling and destruction.
Scenario 2: A Software Provider with Tenant Promises
A provider promises large customers that their data can be erased on request. It uses a separate key for each large customer. When a contract ends and the retention period passes, the provider disables the key, observes, and then destroys it, making the customer’s data permanently unreadable, including in backups.
Scenario 3: The Accidental Disable
An engineer disables a key to clean up what looked like an unused resource. Within minutes, a production database becomes unreadable and alerts fire. Because disabling is reversible, the team re-enables the key and service resumes. Afterwards, they add documentation of dependencies and restrict who can disable production keys.
Scenario 4: Strict Sovereignty Requirement
A government contractor must ensure the cloud provider can never access encryption keys. It uses external keys held in its own facility, connected over a private network. It builds redundant external key servers and rehearses outages, because an outage would make data unavailable.
Scenario 5: Signed Releases
A company signs every software release with a key kept in Cloud KMS. Only the build pipeline’s identity can request signatures, and deployment systems verify them. When an engineer’s laptop is stolen, no signing key is exposed, because keys never leave the service.
Scenario 6: Growing Fast with Autokey
A fast-growing company has dozens of teams creating storage and databases. It adopts Autokey so that protected resources get compliant keys automatically, while the security team defines locations and protection levels centrally and reviews logs.
Every story is about the same lesson: keys decide who can open the vault, and the best vault in the world is only as good as the person who holds its key.
28Choosing the Right Level of Control
The right answer depends on your rules and risks, not on what sounds most secure.
| If Your Situation Is… | Consider | Why |
|---|---|---|
| No special rules, want simplicity | Google default encryption | Strong, automatic and free of key operations |
| Need control over rotation, disabling and audit | CMEK with software keys | Control at the lowest cost |
| Regulator names certified hardware | CMEK with Cloud HSM | Hardware-protected keys without running devices yourself |
| Need isolation and administrative control of the HSM | Single-tenant Cloud HSM | Dedicated partitions and your own administration |
| Provider must not hold key material | Cloud EKM | Keys stay in your external system |
| Need to prove origin or integrity | Asymmetric signing keys | Private key stays in service, verification is public |
Moving up this table adds control and cost together, and often adds operational responsibility too. Many teams start at CMEK with software keys for sensitive data, and upgrade specific keys when a clear requirement appears. Because the protection level is chosen per key, one organization can use several levels at once, matching each data set to its needs.
You wouldn’t store a bicycle in a bank vault or leave jewels in a garden shed. Matching the protection to the value, and to the rules, is the whole art.
Write down why each key has its protection level. Later reviewers can then tell a deliberate choice from a forgotten default.
29Key Design Decisions
Architects write down significant choices so later teams understand the reasons.
Keep keys in a dedicated project
Hold production keys in their own project, administered by the security team.
Reason: access to application projects does not imply access to keys, and logs are easy to scope. Trade-off: cross-project permissions to manage, and costs land in the key project.
One key per application per environment
Each application and environment gets its own key, used only by its own identity.
Reason: limited blast radius and clear audit trails. Trade-off: more keys to create and track, so creation is automated.
Software keys by default, hardware where required
Use software protection unless a documented requirement calls for hardware or external keys.
Reason: avoids needless cost and operational risk. Trade-off: some customers may ask for stronger assurance, which needs an exception process.
Automatic rotation with disable-before-destroy
Rotate symmetric keys on a schedule, and never destroy a version without a disabled observation period and approval.
Reason: limits exposure and prevents irreversible mistakes. Trade-off: old versions cost money while waiting for retirement.
Separate key administration from key use
Administrators cannot encrypt or decrypt, and services cannot change or destroy keys.
Reason: no single person or system can both alter protections and read the data. Trade-off: more roles to design and review.
A decision record is a ship’s log. Years later, a new captain reads why the ship changed course and avoids the same rocks.
30Common Mistakes and Anti-Patterns
The cheapest education is learning from other teams’ mistakes.
Healthy Habits
- Keep key material inside the service
- Separate administrators from users
- Rotate on a schedule and document dependencies
- Disable, observe, then destroy
- Alert on disable, destroy and permission changes
Risky Habits
- One key for everything
- Exporting or copying key material casually
- Letting developers with project ownership manage production keys
- Destroying keys without checking backups
- Choosing external keys without an availability plan
Five classic traps in detail
Confusing Rotation With Re-Encryption
Teams rotate and believe all old data is now under the new key. It is not, unless it is re-encrypted.
Wrong Location
A key is created in a different location from the service that needs it, and cannot be moved, so everything must be rebuilt.
Forgotten Dependencies
A key looks unused until a quarterly job, an old snapshot or a disaster recovery copy needs it.
Over-Broad Service Permissions
One service identity can use every key in the company, so one compromise reaches every data set.
Treating KMS as a Secret Store
Cloud KMS manages keys and cryptographic operations, not ordinary passwords. Use the right service for each job.
These traps are loose floorboards in a house. Each looks harmless until someone carries something heavy across it.
31Troubleshooting Guide
Start with the simplest cause and work toward the hardest.
| Symptom | Likely Cause | What To Try |
|---|---|---|
| Permission denied when using a key | Identity lacks the encrypt or decrypt role on that key, or a policy blocks it | Check grants on the key and ring, and any deny or organization policy |
| Service cannot create a resource with CMEK | Service agent lacks access, or the key is in a different location | Grant the service agent the role and match locations |
| Data suddenly unreadable | Key disabled, version disabled or destroyed, or access removed | Check key and version state, and recent permission changes in audit logs |
| Decrypt fails for old data | The version that encrypted it is disabled or destroyed | Re-enable the version if it is not yet destroyed |
| Cannot create key in desired location | Protection level not offered there | Check which levels are supported in that location |
| External key operations fail | External system unreachable or denying requests | Check connectivity, the external system’s status and its policy |
| Bill higher than expected | Many old versions, high-volume operations or hardware keys | Retire unused versions, use envelope encryption, review protection levels |
| Signature verification fails | Wrong public key or version, or the data was altered | Confirm the version used for signing and fetch the matching public key |
A calm method
Identify the Key and Version
Find exactly which key and version the failing operation refers to.
Check State and Access
Is the version enabled, and does the caller hold the right role?
Read the Audit Logs
Logs show recent changes and the exact error returned.
Fix, Then Verify
Change one thing, retest and record what you learned.
Troubleshooting a locked door: find which door, check which key you hold, read the sign on the door, and only then call the locksmith.
32Best Practices Checklist
A short list to review before every launch.
Plan Locations and Names First
They cannot be changed later, so choose them with care.
One Key per Job and Data Set
Keep blast radius small and audit trails readable.
Pick the Lowest Sufficient Protection Level
Software by default, hardware or external only for documented needs.
Separate Administration From Use
Nobody should both change protections and read protected data.
Narrow Grants on Keys or Rings
Avoid project-wide key roles and shared identities.
Dedicated Key Project
Limit who can reach production keys.
Automate Rotation
Schedule it and plan re-encryption where needed.
Disable Before Destroying
Observe for a full business cycle, require approval and check backups.
Log and Alert
Send logs to a protected place and alert on disabling, destruction and permission changes.
Document Dependencies
Record which resources rely on each key.
Review Costs and Access Regularly
Retire old versions, and check who can use or manage each key.
A pilot walks through the same checklist before every flight, however experienced. The list does not express doubt. It expresses respect for what could go wrong.
33Frequently Asked Questions
Quick answers to the questions beginners ask most often.
It is a managed Google Cloud service for creating, protecting and using cryptographic keys, so applications can encrypt, decrypt, sign and verify without ever handling the raw key.
Yes. Google Cloud encrypts customer data at rest by default, using keys that Google manages. Cloud KMS is for organizations that want to control the keys themselves, for compliance, for separation of duties or to be able to revoke access.
Customer-managed encryption keys. You create and control a key in Cloud KMS, and a supported Google Cloud service uses it to protect your data. You decide who can use it, how it rotates and whether it is enabled.
A key ring groups keys in one location and lets you manage access together. A key is a named object that holds versions. A key version is one numbered generation of the actual key material, and rotation creates new versions.
No. Resources cannot be moved after creation and key rings and keys cannot be renamed. If you chose wrongly, create a new key in the correct place and re-encrypt the data.
A two-layer design in which data is encrypted with a data key, and the data key is encrypted with a master key held in Cloud KMS. It combines the speed of local encryption with central control of the master key.
The key can no longer be used, so anything that needs it to decrypt, including services using CMEK, cannot read the protected data. Re-enabling the key restores access, which is why disabling is a safe test before destruction.
After the scheduled delay, the key material is permanently deleted. Data that depends only on that version can never be decrypted. During the delay, the version can still be recovered.
Not by itself. Rotation creates a new version for new encryption. Existing data stays tied to the version that encrypted it until it is re-encrypted. Some services handle details differently, so read the service’s documentation.
Follow your organization’s security policy and any regulation that applies. Many teams rotate symmetric keys every few months automatically, and immediately after any suspected compromise.
When a regulation, standard or contract requires keys to be protected by certified hardware. Google documents multi-tenant Cloud HSM as FIPS 140-2 Level 3 validated hardware. If no such requirement exists, software keys are usually enough.
Cloud External Key Manager keeps your keys in a system outside Google Cloud. Use it when Google must not hold the key material, accepting higher cost and dependency on your external system’s availability.
Yes, for software and hardware protection levels, using a wrapped import process. Prefer keys generated in Cloud KMS where possible, since an outside copy adds exposure and duties.
No. Many do, but support varies by service and by key type. Some services do not support external keys. Always check the specific service’s documentation.
Not if roles are designed well. Key administrators can manage key life cycle without holding encrypt and decrypt permissions. Keep administration and use separate.
Cost comes from active key versions per hour, which vary by protection level, plus cryptographic operations per ten thousand. Administrative operations were listed as free on the page I read. Hardware and external options cost more, and single-tenant HSM has a large hourly instance charge. Confirm current numbers on the official page.
Yes. According to the pricing page, versions in any state other than destroyed are billed. Destroyed versions are free.
A feature that creates keys automatically when resources need them, following rules defined by the security team. It gives developers speed and security teams consistency.
It is not designed for that. Cloud KMS manages cryptographic keys and operations. Use Google Cloud’s secret management service for credentials and tokens, and use Cloud KMS keys to protect data.
Yes. Asymmetric signing keys let you sign data while the private key stays inside the service. Anyone with the public key can verify the signature. Message authentication keys cover shared-secret use cases.
Usually the same location as the data or service that will use the key, subject to your compliance rules. Remember that location is permanent and that some protection levels are not offered in every location.
Through audit logs. Administrative actions are logged, and data access logs can record each cryptographic use when enabled. Export them to a protected place and set alerts for risky events.
For serious workloads, a separate key project is better, since access to the application project then does not imply access to keys. Charges go to the project that owns the key, so plan cost reporting accordingly.
Encrypt that data under its own key, and when erasure is required, destroy the key after the safety steps. Without the key, the encrypted data is unreadable. This is called crypto-shredding. Confirm that backups under the same key are included in your plan.
Create a key project, make one key ring per location, create a software symmetric key with automatic rotation for one sensitive data store, grant its service agent access, enable audit logs and alerts, and document the dependency. Expand from there as real needs appear.
34Summary and Key Takeaways
Everything in this guide on one short page.
Cloud KMS lets you create and use cryptographic keys without ever exposing them. Keys are organized into key rings, keys and versions in a chosen location. Envelope encryption lets services protect large data cheaply while you keep central control of a master key. You choose a protection level of software, hardware or external according to your rules, control access with separated roles, rotate on a schedule, watch audit logs and destroy keys only with great care. Handled well, keys become a source of confidence. Handled carelessly, they become a source of outages and exposure.
Key Takeaways
- Cloud KMS keeps key material inside the service while applications and Google Cloud services use keys for encryption, decryption, signing and verification.
- Keys live in key rings in a specific location that cannot be changed later, and each key holds numbered versions that rotation creates.
- Choose the lowest protection level that meets your documented requirement: software for most workloads, Cloud HSM for certified hardware, and external keys only when Google must not hold the material.
- Separate people who administer keys from identities that use them, grant narrowly on keys or rings, and keep production keys in a dedicated project.
- Rotation creates new versions but does not re-encrypt old data. Plan re-encryption when it is needed.
- Disable before destroying, check every dependency including backups, require approval, and alert on disable, destroy and permission changes.
- Watch costs, since versions in any state except destroyed are billed, and confirm current features and prices on Google’s official pages.