Prepare and test your skills
Prepare and test your skills
Execute key revocation and destruction is the process of making customer-controlled encrypted data temporarily inaccessible or permanently irretrievable by disabling, destroying, and deleting keys in Cloud Key Management Service (Cloud KMS) (opens in a new tab). Cloud External Key Manager (Cloud EKM) (opens in a new tab) keys are pointers to key material that resides outside Google Cloud with a supported external partner, while customer-managed encryption keys (CMEK) reside in Cloud KMS. Revocation through disablement stops cryptographic operations quickly but remains reversible, while destruction through crypto-shredding permanently removes the ability to decrypt data protected by that key version.
Immediate revocation by disabling a key is the act of turning off a key version in Cloud KMS so services can no longer use it to encrypt or decrypt data. Google Cloud services that use CMEK call Cloud KMS to validate the key during each operation on encrypted data, so when Cloud KMS reports the key as disabled or destroyed, all data protected by that key becomes inaccessible. Disablement can take up to three hours to propagate through Cloud KMS, while permission changes usually propagate much faster, so access loss is not always instantaneous across every service.
A disabled key still exists in Cloud KMS and the underlying key material is preserved, so a formerly disabled key that is re-enabled restores access automatically once services detect the valid state again. This reversibility makes disablement the correct first response when compromise is suspected, access must be suspended for investigation, or retention policy requires a temporary hold before permanent action. By contrast, deleting an in-use CMEK project or deleting an external key that cannot be recovered makes the data permanently inaccessible, so revocation decisions must account for whether recovery will ever be needed.
Scheduled destruction is the irreversible lifecycle that permanently removes a key version's ability to perform cryptographic operations and starts logical deletion of its key material from active systems. Destruction is used for crypto-shredding, where destroying the key version that encrypted the data makes that data permanently unrecoverable even though the ciphertext may still exist. A destroyed key version enters the DESTROYED state, cannot be used for cryptographic operations, and is no longer billed, but it remains visible in lists of Cloud KMS resources until it is separately deleted.
The destruction lifecycle moves through ordered states with a built-in recovery window:
Destroying all active key versions does not change the key's rotation schedule, so new key versions continue to be created on schedule unless automatic rotation is also disabled. Cloud KMS can send an alert through Cloud Monitoring when a key version enters SCHEDULED FOR DESTRUCTION, which provides oversight for compliance and prevents accidental loss. If an organization requires key versions to be disabled before destruction, the version must be disabled first and then submitted for destruction.
Exam tip: Disabling a key makes data temporarily inaccessible and is reversible by re-enabling, while destroying a key version makes data permanently irretrievable once the scheduled destruction period passes.
Destroying a Cloud EKM key version permanently removes the association in Cloud KMS between the Cloud EKM key version and the external key URI or key path. After the SCHEDULED FOR DESTRUCTION period passes and the version becomes DESTROYED, data encrypted with that Cloud EKM key version can no longer be encrypted or decrypted through Cloud KMS. A destroyed Cloud EKM key version cannot be recreated, even when the same external key URI or key path is reused, and Google does not control the availability of keys held in the external partner system.
The effect on the external system depends on how the external key is managed:
| External key type | What destruction does in Cloud KMS | What happens to external material |
|---|---|---|
| Manually managed key | Destroys the key version in Google Cloud first | Does not modify the key in the external manager; destroy the external material separately after the Cloud version is destroyed |
| Coordinated external key | Destroys the key version in Google Cloud first | Sends a destruction request to the external key manager to destroy the external key material |
For partner-managed sovereign controls, destruction follows an approval workflow that spans both trust boundaries, with key material in Google Cloud on one side and key material in the partner system on the other. The operator first schedules the Cloud KMS key version for destruction, then submits a destroy request through Issue Tracker with the resource name of the key version. The partner confirms the request and provides a destruction date and time, restoration before that time preserves both the Cloud KMS key and the partner key, and if destruction proceeds the Cloud KMS key is removed first and then the partner key is removed.
Permanent deletion (opens in a new tab) in Cloud KMS is different from destruction, and the distinction controls compliance with data retention policies and regulatory mandates. Destruction permanently disables a key version and irreversibly destroys its key material after the destruction period, which enforces crypto-shredding for data that must be unrecoverable. Deletion only removes a key, key version, or key ring from listings in the console, command line, API, and client libraries to streamline search and list operations, and deleted CryptoKey names cannot be reused.
A key version can be deleted only when it no longer holds usable key material:
Deleted key names remain blocked from reuse, and the list of retired names can be viewed through the retired resources list operation. This order of operations — disable for immediate revocation, destroy after the scheduled period for irretrievability, then delete for inventory cleanup — ensures that retention requirements are met by destruction, not merely by hiding the resource from listings.
Cloud External Key Manager (Cloud EKM) (opens in a new tab) is the Google Cloud service for using keys that remain outside Google Cloud to protect data inside Google Cloud. Secure import for Cloud EKM does not move key bytes into Google Cloud. The external key material stays in the supported external key manager (EKM), Cloud Key Management Service (Cloud KMS) (opens in a new tab) holds only a key reference plus its own internal key material, and every encrypt or decrypt operation calls across that trust boundary to the EKM.
A Cloud EKM key version has three linked parts that enforce separation between Google and the external owner. External key material is cryptographic material created and stored in the EKM and never shared with Google, a key reference is the key URI or key path that Cloud EKM uses to request operations on that material, and internal key material is additional key material created in Cloud KMS for symmetric keys that never leaves Cloud KMS. For symmetric encryption, data flows first from Cloud KMS to its internal key material for an initial encryption, then from Cloud KMS to the EKM for a second wrapping layer with the external key material, then back to Cloud KMS as ciphertext that requires both materials to decrypt.
This double wrap is different from Cloud KMS with key import, where customer-generated bring-your-own-key (BYOK) material is imported for use inside Cloud KMS. Cloud EKM implements hold-your-own-key (HYOK) where the external key never enters Google. Because both the Cloud EKM key version and the external key are required for every request, loss of access on either side means the data cannot be decrypted.
A manually managed external key is a Cloud EKM key where the administrator performs matching changes in both the EKM and Cloud KMS. The key appears in Cloud KMS alongside other keys with protection level EXTERNAL or EXTERNAL_VPC, but automatic rotation is not supported and the external material is never exposed to Google. Creation follows an ordered workflow:
When created with the API or Google Cloud CLI, a Cloud EKM key must not have an initial key version. This rule does not apply to keys created in the Google Cloud console.
A coordinated external key is a Cloud EKM key whose lifecycle can be driven from Cloud KMS through an EKM connection that uses Cloud KMS EKM management mode. The connection depends on a VPC network, the hostname of the EKM, and a crypto space path that identifies the customer's container of resources inside the EKM partner. Coordinated keys appear with protection level EXTERNAL_VPC, and the external material still resides only in the EKM.
Destruction moves through ordered states. The version first enters scheduled for destruction in Cloud KMS, then Cloud EKM destroys its part of the cryptographic material and sends a destruction request to the EKM after the period ends. Data encrypted with that version cannot be decrypted after destruction in Cloud KMS, even if the EKM has not yet destroyed its copy.
Authorization for Cloud EKM keys is split between the EKM and Cloud KMS, so access can be cut off on either side. The Google Cloud project cannot use an externally managed key until access is granted in the EKM, and that access can be revoked at any time to make the data undecryptable. This split creates separation of duties and multiple enforcement points:
Exam tip: Both the Cloud EKM key version and the external key are required for every request, and an identical Cloud EKM version cannot be recreated from the same URI or key path, so loss of access on either side means permanent data loss.
Connectivity for Cloud EKM determines availability, latency, and where keys can be placed. Cloud EKM must reach the EKM quickly, so the Cloud KMS location should be geographically near the EKM partner location, and multi-region failover can change network distance and timeout behavior because a new data center initiates the key requests. The choice between internet and VPC connectivity controls supported locations and management modes:
| Option | Locations | Management modes |
|---|---|---|
| Cloud EKM over the internet | Most Cloud KMS locations, including regional and multi-regional locations | Manual mode only, with all external keys manually managed |
| Cloud EKM over a VPC | Most regional Cloud KMS locations, not multi-regional locations, and not global or nam-eur-asia1 | Manual mode for manually managed keys or Cloud KMS mode for coordinated keys |
If an external key is unavailable, Cloud KMS returns a FAILED_PRECONDITION error with PreconditionFailure detail. Unavailability can stop workloads that depend on decryption, such as Google Kubernetes Engine application-layer secrets becoming unavailable on nodes, and a Spanner database encrypted with an unavailable CMEK key is automatically deleted after more than 30 consecutive days without access. Rotating to a new version does not recover data when the current version is unavailable.
Implementing and automating key rotation policies means configuring Cloud Key Management Service (Cloud KMS) (opens in a new tab) to create a new primary version of each customer-managed encryption key (CMEK) (opens in a new tab) on a defined schedule. Rotation limits exposure if a version is compromised because new data encryption keys are wrapped with the new version, while older versions remain available to decrypt existing data. Automated schedules enforce consistency for compliance and remove reliance on manual rotation.
Automated rotation schedules for customer-managed encryption keys (CMEKs) define how often Cloud KMS generates a new primary key version for encryption of new data. The recommended practice is to enable automatic rotation on every CMEK key, with a period that meets compliance needs and is ideally no less than once per year. Sensitive workloads should use more frequent rotation to further limit the amount of data protected by any single version.
Compliance frameworks typically state high-level principles for encryption and key management but do not prescribe a specific product or rotation interval. The key owner is responsible for mapping framework requirements to a Cloud KMS rotation period and proving the control is enforced. Keys created by Cloud KMS Autokey follow industry-standard rotation schedules automatically, while manually created keys require the administrator to set and maintain the rotation period.
Key configuration that enables automatic rotation starts with the required CMEK key type and the source of key material. All CMEK keys must use the symmetric ENCRYPT_DECRYPT purpose with the GOOGLE_SYMMETRIC_ENCRYPTION algorithm, which supports envelope encryption where the CMEK acts as a key encryption key (KEK) that encrypts data encryption keys (DEKs). Only keys with Google-generated key material can automatically create new versions on the configured rotation schedule without external action.
Keys that use imported key material, often called bring-your-own-key (BYOK), cannot rotate automatically inside Cloud KMS and require automation outside Cloud KMS to generate and import each new version on time. If import automation fails, no new version appears and data continues to be protected by the aging version:
Choose Google-generated key material when possible to keep automatic rotation simple, and choose imported material only when external custody is required and the supporting automation is in place.
The impact of rotation on dependent resources depends on how each CMEK-integrated service uses key versions, because rotation changes only which version is primary for new encryptions. Existing data remains wrapped by the version that protected it at write time, so disabling or destroying old versions makes that data inaccessible even after successful rotation. Administrators must therefore evaluate per-service behavior before shortening rotation periods or cleaning up old versions.
| Protected resource | Behavior when Cloud KMS key rotates | Dependency on prior version |
|---|---|---|
| Spanner | New key version re-encrypts the DEK protecting existing data | Prior version still required until re-encryption completes |
| Cloud Storage buckets | Only newly written objects use the new key version; existing objects keep their original version | Different subsets of data depend on different versions |
| BigQuery tables | Existing tables continue to use the version from creation by default and do not automatically switch | Table must be recreated or reconfigured to adopt the new version |
| Apigee organizations | Previously stored data is not re-encrypted; only limited new data such as new proxy revisions uses the new primary version | Old versions remain required for analytics data, runtime disk, and old revisions |
Exam tip: Rotation does not re-encrypt most existing data; keep prior versions enabled because new and old data will depend on different versions at the same time.
Managing the transition between key versions means keeping the full version history usable while new writes move to the primary version. Cloud KMS uses envelope encryption in which traffic flows from the service agent to Cloud KMS for KEK operations, and the service agent then uses the unwrapped DEK to protect resource data. If the KEK version needed for a resource is disabled or scheduled for destruction, requests to use that key fail and the dependent data cannot be decrypted until the version is restored to enabled.
The key usage dashboard and Cloud KMS Inventory API show which Google Cloud resources, projects, and products depend on each key and whether data is inaccessible due to a disabled or destroyed version. Centralized Admin Activity audit logs record creation, rotation configuration, disable, and destroy scheduling, while Cloud Monitoring can alert on sensitive operations such as scheduling destruction. An operational plan should pair frequent review of key usage with alerts and pre-destroy checks, so rotation improves security without causing loss of access during the transition.
Disabling a key version in Cloud Key Management Service (Cloud KMS) makes data temporarily inaccessible and is reversible by re-enabling, while destroying a key version makes data permanently irretrievable through crypto-shredding after the scheduled destruction period passes. A disabled key still exists with its key material preserved, but disablement can take up to three hours to propagate, while a destroyed version enters the DESTROYED state, begins logical deletion of key material, is no longer billed, and remains visible in resource lists until separately deleted.
Destroying a Cloud External Key Manager (Cloud EKM) key version permanently removes the association in Cloud Key Management Service (Cloud KMS) between the Cloud EKM key version and the external key URI or key path, so data encrypted with that version can no longer be encrypted or decrypted through Cloud KMS. A destroyed Cloud EKM key version cannot be recreated even when the same external key URI or key path is reused, and because both the Cloud EKM key version and the external key are required for every request, loss of access on either side means the data cannot be decrypted.
No, automatic rotation in Cloud Key Management Service (Cloud KMS) changes only which version is primary for new encryptions, while prior versions remain required to decrypt existing data. Automatic rotation requires symmetric ENCRYPT_DECRYPT keys with Google-generated key material, and because services such as Cloud Storage buckets and BigQuery tables keep existing data wrapped by the version that protected it at write time, prior versions must stay enabled to maintain accessibility.
Destruction in Cloud Key Management Service (Cloud KMS) permanently disables a key version and irreversibly destroys its key material after the destruction period to enforce crypto-shredding, while deletion only removes a key, key version, or key ring from listings in the console, command line, API, and client libraries. A key version can be deleted only when it no longer holds usable key material such as in the DESTROYED state, and deleted CryptoKey names cannot be reused.
An organization uses Cloud KMS to manage Customer-Managed Encryption Keys (CMEK) protecting sensitive workloads, including Vertex AI RAG corpora. During an active security incident, the security operations team suspects that unauthorized callers are attempting to access protected data.
The incident response protocol mandates that the security engineer must immediately render all encrypted data irretrievable to all services and identities, maintain the ability to quickly restore decryption operations if the incident is a false alarm, and establish an irreversible cryptographic erasure path if key compromise is confirmed.
Which action should the security engineer take?
Revoke the Cloud KMS Admin role from all service accounts and trigger an immediate 24-hour key rotation schedule.
Permanently delete the parent KMS KeyRing resource using the Google Cloud CLI.
Change the CryptoKey purpose from Symmetric Encrypt/Decrypt to Asymmetric Sign, then remove the RAG Engine service agent.
Disable the active CryptoKeyVersion in Cloud KMS, and schedule it for destruction if key compromise is confirmed.
Last updated