Customer-managed encryption keys  |  Cloud Storage  |  Google Cloud (2024)

Setup

This page discusses customer-managed encryption keys and how they are used inCloud Storage. For other encryption options, see Data Encryption Options.

Overview

If you need more control over key operations than what thestandard Cloud Storage encryption allows, you can usecustomer-managed encryption keys (CMEKs). These keys are created and managedusing Cloud Key Management Service (Cloud KMS), and you store the keys as softwarekeys, in an HSM cluster, or externally. You can use CMEKs onindividual objects, or configure your bucket to use a key by default on allnew objects added to a bucket.

When using a CMEK, an object is encrypted with the key by Cloud Storageat the time it's stored in a bucket, and the object is automatically decryptedby Cloud Storage when the object is served to requesters.

You can create CMEKs directly, or you can use Cloud KMS Autokey(Preview) to create these keys on yourbehalf. For more information, seeAutokey overview.

When is the key used?

When you apply a CMEK to an object, Cloud Storage uses the key whenencrypting:

  • The object's data.
  • The object's CRC32C checksum.
  • The object's MD5 hash.

Cloud Storage uses standard server-side keys to encrypt theremaining metadata for the object, including the object's name. Thus, ifyou have sufficient permission, you can perform actions such as readingmost metadata, listing objects, and deleting objects even after you've disabledor destroyed the associated CMEK.

Service agents

Each project has a special Cloud Storage service account called aservice agent that performs encryption and decryption with CMEKs. Once yougive the service agent access to an encryption key, that service agentencrypts:

  • Objects added to a bucket that uses the key as the default key.
  • Specific objects that you indicate should be encrypted with that key.

When adding or rewriting an object in Cloud Storage, if you have both adefault key set on your bucket and a specific key included in your request,Cloud Storage uses the specific key to encrypt the object.

When a requester wants to read an object encrypted with a CMEK, they simplyaccess the object as they normally would. During such a request, the serviceagent automatically decrypts the requested object as long as:

  • The service agent still has permission to decrypt using the key.
  • You have not disabled or destroyed the key.

If one of these conditions is not met, the service agent does not decryptthe data, and the request fails.

Restrictions

The following restrictions apply when using CMEKs:

  • You cannot encrypt an object with a CMEK by updating the object's metadata.Include the key as part of a rewrite of the object instead.

    • gcloud storage uses the objects update command to set encryption keyson objects, but the command rewrites the object as part of the request.
  • You must create the Cloud KMS key ring in the same location as thedata you intend to encrypt. For example, if your bucket is located inUS-EAST1, any key ring used for encrypting objects in that bucket mustalso be created in US-EAST1.

    • For most dual-regions, you must create the Cloud KMS keyring in the associated multi-region. For example, if your bucket islocated in the pair US-EAST1, US-WEST1, any key ring used forencrypting objects in that bucket must be created in the USmulti-region.

    • For the ASIA1, EUR4, and NAM4 predefined dual-regions, you mustcreate the key ring in the same predefined dual-region.

      For available Cloud KMS locations, seeCloud KMS locations.

  • Cloud KMS encryption and decryption rates are subject to aquota.

  • The CRC32C checksum and MD5 hash of objects encrypted with CMEKs are notreturned when listing objects with the JSON API.

    • When appropriate, some tools, such as gcloud storage, perform anadditional metadata GET request on each object encrypted with aCMEK in order to retrieve the CRC32C and MD5 information. These additionalrequests can make listing substantially slower than listing objectsencrypted with standard Cloud Storage encryption.
  • Only symmetric encryption keys can be used as CMEKs.

Relation to customer-supplied encryption keys

In addition to customer-managed encryption, Cloud Storage offersCustomer-Supplied Encryption Keys as a way of controlling your dataencryption. You can encrypt different objects in a single bucket with differentencryption methods, but note that:

Key management

This section discusses considerations when rotating keys, replacing keys, anddisabling or destroying key versions.

Key rotation

Cloud KMS supports both automatic and manual key rotation to anew version. After rotating a key, Cloud Storage uses the newversion for all operations that encrypt using the key, such as:

  • Object uploads when the destination bucket uses the key as its defaultencryption key.

  • Object upload, copy, and rewrite operations that specifically use thekey in the operation.

Previous versions of the key are not disabled or destroyed, soCloud Storage can still decrypt existing objects that were previouslyencrypted using those versions.

Key replacement

Use the following guidelines when replacing the key you use to encryptCloud Storage objects with a new key:

  1. Check your buckets to see which use the key as their defaultencryption key. For these buckets, replace the old key with a new key.

    This ensures that all objects written to the bucket use the new keygoing forward.

  2. Inspect your source code to understand which requests use the key in ongoingoperations, such as setting bucket configurations and uploading,copying, or rewriting objects. Update these instances to use the new key.

  3. Check for objects, in all of your buckets, encrypted with the old key.Use the Rewrite Object method to re-encrypt each object with the newkey.

  4. Disable all versions of the old key. After disabling old key versions,monitor client and service logs for operations that fail due to a versionbecoming unavailable.

Disabling or destroying a key version

  • When you disable or destroy a specific key version, you cannotdecrypt any object that is currently encrypted with that key version.

    For example, you cannot download, copy, or rewrite the object, andattempting to do so results in an error.

    • If you disable a key version, you can re-enable it. Once re-enabled,you can access objects that were encrypted by that key version.

    • If you destroy a key version, downloads of objects encrypted with thatversion are never possible again.

    Before disabling or destroying a key version, you should identify allobjects, in all buckets, that were encrypted using the specific key version.Once identified, use the Rewrite Object method to re-encrypt eachobject using a new key version, a whole new key, or server-side keys.

  • When you disable or destroy the primary version of a key, you cannot usethe key for encryption until you have a new primary version. For example,without a primary version:

    • You cannot specify the key as part of an object upload, copy, or rewrite.

    • You cannot upload, copy, or rewrite objects to a bucket that has the keyset as its default encryption key unless you specify a different,valid key as part of the operation.

    Once you have a primary version for your key, operations that use the key toencrypt objects succeed.

    Before disabling or destroying a key version that is the primary version ofthe key, you should first stop using it as the primary version. You can doso by either:

    • Replacing it with a new primary version, typically byperforming a key rotation.
    • Removing instances where you use the key for encryption. When you do so,Cloud Storage uses server-side keys for encryptioninstead.

Key versions and locked objects

If a key version encrypts an object that is locked, either because the object isstored in a bucket with a locked retention policy or because the objecthas its own locked retention configuration, the key version can only bedestroyed if the following conditions are met:

  • The encrypted object's retention expiration time must be in the past.
  • The encrypted object must not have any object holds placed on it.

Once all relevant objects have met these conditions, it's possible to destroythe key version, even without deleting the objects. If you do so, affectedobject data becomes permanently inaccessible.

What's next

  • Set CMEKs on your Cloud Storage buckets and objects.
  • Learn more about encryption in Cloud Storage.
  • Learn more about Cloud KMS.
Customer-managed encryption keys  |  Cloud Storage  |  Google Cloud (2024)

FAQs

Which storage can be used with customer managed keys? ›

Customer-managed keys offer greater flexibility to manage access controls. You must use one of the following Azure key stores to store your customer-managed keys: Azure Key Vault. Azure Key Vault Managed Hardware Security Module (HSM)

Where are customer managed encryption keys stored? ›

These keys are created and managed using Cloud Key Management Service (Cloud KMS), and you store the keys as software keys, in an HSM cluster, or externally.

What is customer managed key GCP? ›

Like Google's default encryption, CMEK is server-side, symmetric, envelope encryption of customer data. The difference from Google's default encryption is that CMEK protection uses a key that a customer controls. CMEK keys created manually or automatically using Autokey operate the same way during service integration.

Which encryption option does a customer encrypt data before sending it to Google cloud storage? ›

Client-side encryption: encryption that occurs before data is sent to Cloud Storage. Such data arrives at Cloud Storage already encrypted but also undergoes server-side encryption.

Where is CMK stored? ›

Customers using CMK can meet security compliance requirements. CMK keys are stored in customer's key vault, giving control over where these can be used. Same CMK keys can be used to encrypt multiple storage accounts.

Where are customer managed encryption keys stored for autonomous database? ›

Customer-Managed Encryption Keys on Autonomous Database

The customer-managed encryption key is stored in Oracle Cloud Infrastructure Vault, external to the database host. If the customer-managed encryption key is disabled or deleted, the database will be inaccessible.

Where should encryption keys be stored? ›

Where possible, encryption keys should be stored in a separate location from encrypted data. For example, if the data is stored in a database, the keys should be stored in the filesystem.

Who owns key encryption keys if stored on the cloud? ›

Cloud-Based Encryption: The cloud provider generates, manages, and stores the keys used to encrypt and decrypt data. Bring Your Own Key (BYOK): The customer generates and manages encryption keys, but the cloud provider has access to the keys and can use them to encrypt and decrypt data.

What is the difference between CMK and KMS? ›

AWS KMS is replacing the term customer master key (CMK) with AWS KMS key and KMS key. The concept has not changed. To prevent breaking changes, AWS KMS is keeping some variations of this term. An AWS KMS key is a logical representation of a cryptographic key.

How do customer managed keys work? ›

Customer Managed Keys, or CMK, is a cloud architecture that gives customers ownership of the encryption keys that protect some or all of their data stored in SaaS applications. It is per-tenant encryption where your customers can independently monitor usage of their data and revoke all access to it if desired.

Why use CMEK? ›

The CMEK feature lets you use your own cryptographic keys for data at rest in Cloud SQL. After adding customer-managed encryption keys, whenever an API call is made, Cloud SQL uses your key to access data.

What is EKM in GCP? ›

Terminology. External key manager (EKM) The key manager used outside of Google Cloud to manage your keys. Cloud External Key Manager (Cloud EKM) A Google Cloud service for using your external keys that are managed within a supported EKM.

What is the best way to encrypt Cloud Storage? ›

Cryptomator is a simple tool for digital self-defense. It allows you to protect your cloud data by yourself and independently. Most cloud providers encrypt data only during transmission or they keep the keys for decryption for themselves. These keys can be stolen, copied, or misused.

What type of encryption does Google managed use? ›

All data that is stored by Google is encrypted at the storage layer using the Advanced Encryption Standard (AES) algorithm, AES-256.

Is Google Drive Cloud Storage encrypted? ›

When you upload a file of any type to Google Drive, it is stored securely in our world-class data centers. Data is encrypted in-transit and at-rest. If you choose to access these files offline, we store this info on your device.

How do you use a customer managed key stored in a key vault? ›

Go to Settings > Encryption, and select Customer managed key. Then select Select a key and key vault. On the Select key from Azure Key Vault screen, your subscription is automatically populated. For Key vault, you can select an existing key vault from the dropdown list or select Create new and create a new key vault.

What can you control with the customer managed key feature? ›

Customer Managed Keys (CMK) provide you with control over the keys used to encrypt data at rest in RelativityOne.

What storage accounts can use lifecycle management? ›

Lifecycle management policies are supported for block blobs and append blobs in general-purpose v2, premium block blob, and Blob Storage accounts.

Which storage services support client-side encryption? ›

Blob Storage supports both service-side and client-side encryption. For most scenarios, Microsoft recommends using service-side encryption features for ease of use in protecting your data. To learn more about service-side encryption, see Azure Storage encryption for data at rest.

Top Articles
5. Mijn strategie: Dividend (growth) Investing
Dividend Investing: How It Works and How to Get Started | The Motley Fool
Where To Go After Howling Pit Code Vein
O'reilly's Auto Parts Closest To My Location
Gomoviesmalayalam
1970 Chevrolet Chevelle SS - Skyway Classics
Free Atm For Emerald Card Near Me
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Cosentyx® 75 mg Injektionslösung in einer Fertigspritze - PatientenInfo-Service
Rainfall Map Oklahoma
Otr Cross Reference
Raid Guides - Hardstuck
Oxford House Peoria Il
Echo & the Bunnymen - Lips Like Sugar Lyrics
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Nebraska Furniture Tables
Vanessa West Tripod Jeffrey Dahmer
Haunted Mansion Showtimes Near Millstone 14
U Arizona Phonebook
Forum Phun Extra
Fort Mccoy Fire Map
Ahn Waterworks Urgent Care
Allybearloves
Clare Briggs Guzman
Never Give Up Quotes to Keep You Going
Rs3 Eldritch Crossbow
All Obituaries | Verkuilen-Van Deurzen Family Funeral Home | Little Chute WI funeral home and cremation
Play Tetris Mind Bender
Integer Division Matlab
Parkeren Emmen | Reserveren vanaf €9,25 per dag | Q-Park
Soul Eater Resonance Wavelength Tier List
How do you get noble pursuit?
Angel Haynes Dropbox
Shiny Flower Belinda
Landing Page Winn Dixie
Khatrimmaza
About Us | SEIL
New York Rangers Hfboards
Vanessa West Tripod Jeffrey Dahmer
Powerspec G512
Magicseaweed Capitola
Best Restaurant In Glendale Az
Jammiah Broomfield Ig
Ohio Road Construction Map
Rocket League Tracker: A useful tool for every player
The Jazz Scene: Queen Clarinet: Interview with Doreen Ketchens – International Clarinet Association
Shiftselect Carolinas
Mikayla Campinos Alive Or Dead
Rubmaps H
Fresno Craglist
Raley Scrubs - Midtown
Invitation Quinceanera Espanol
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated:

Views: 5911

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.