- Security Features and Setup >
- Encryption at Rest using Customer Key Management >
- Customer Key Management with Google Cloud KMS
Customer Key Management with Google Cloud KMS¶
On this page
Feature unavailable in Free and Shared-Tier Clusters
This feature is not available for M0
(Free Tier), M2
, and
M5
clusters. To learn more about which features are unavailable,
see Atlas M0 (Free Tier), M2, and M5 Limitations.
Atlas uses your GCP Service Account Key to encrypt and decrypt your MongoDB master keys. These MongoDB master keys are used to encrypt cluster database files and cloud providers snapshots.
When you use your own cloud provider KMS, Atlas automatically rotates the MongoDB master keys every 90 days. These keys are rotated on a rolling basis and the process does not require the data to be rewritten.
Atlas encrypts your data at rest using encrypted storage media. Using keys you manage with GCP KMS, Atlas encrypts your data a second time when it writes it to the MongoDB encrypted storage engine. You use your GCP SAK to encrypt the MongoDB master encryption keys.
This page covers configuring customer key management using AKV on your Atlas project.
You must configure customer key management for the Atlas project before enabling it on clusters in that project.
Prerequisites¶
To enable customer-managed keys with GCP KMS for a MongoDB project, you must have:
Your GCP Service Account Key.
The Key Version Resource ID associated with your Service Account Key.
A GCP service account with credentials specified in your Service Account Key with sufficient permissions to:
- Get the Service Account Key version
- Encrypt data with the Service Account Key version
- Decrypt data with the Service Account Key
Note
The key, not the key version, handles decryption.
See also
See the GCP documentation to learn how to:
- Use an M10 or larger cluster.
- Use Cloud Provider Snapshots to encrypt your backup snapshots. Continuous Backups are not supported.
Enable Customer-Managed Keys for a Project¶
You must enable customer key management for a project before you can enable it on a cluster in that project.
Log into Atlas.¶
Toggle the button next to Encryption at Rest using your Key Management to On.¶
Select Google Cloud KMS.¶
Enter your Service Account Key.¶
Your Service Account Key should be formatted as a JSON object. It contains the encryption credentials for your GCP service account.
Enter the Key Version Resource ID.¶
Your key version resource ID is the fully-qualified resource name for a CryptoKeyVersion.
Click Save.¶
Alerts¶
Atlas automatically creates an encryption key rotation alert
once you configure customer key management for a project. You can reset this alert at any time by
rotating your GCP Key Version Resource ID.