enabling-cmek-encryption
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Enables Customer-Managed Encryption Keys (CMEK) on CockroachDB Cloud clusters with the Advanced plan and Advanced Security Add-on to give organizations control over data-at-rest encryption keys via their cloud provider's KMS. Use when enabling CMEK for compliance, rotating encryption keys, or verifying CMEK configuration.
- Deletes or force-pushes
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- TeddyAlbina/skillsedited, first seen Nov 1, 2026
- DineshKumar8399/aegis-governed-memory-fleetword for word, first seen Aug 18, 2026
Other versions2 projects use a version of this.
Word for word · 1
- DineshKumar8399/aegis-governed-memory-fleet★ 0100% same
Edited · 1
- TeddyAlbina/skills★ 299% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchmarking-transaction-patternsSkill
- designing-application-transactionsSkill
- designing-multi-region-applicationsSkill
- analyzing-range-distributionSkill
- analyzing-schema-change-storage-riskSkill
- auditing-table-statisticsSkill
- monitoring-background-jobsSkill
- profiling-statement-fingerprintsSkill
- profiling-transaction-fingerprintsSkill
- triaging-live-sql-activitySkill
- molt-fetchSkill
- molt-replicatorSkill
- molt-verifySkill
- setting-up-local-clusterSkill
- managing-certificates-and-encryptionSkill
- managing-cluster-capacitySkill
- managing-cluster-settingsSkill
- performing-cluster-maintenanceSkill
- provisioning-cluster-for-productionSkill
- reviewing-cluster-healthSkill
- upgrading-cluster-versionSkill
- cockroachdb-sqlSkill
- auditing-cis-benchmarkSkill
- auditing-cloud-cluster-securitySkill
- configuring-audit-loggingSkill
- configuring-ip-allowlistsSkill
- configuring-log-exportSkill
- configuring-private-connectivitySkill
- configuring-sso-and-scimSkill
- enforcing-password-policiesSkill
- hardening-user-privilegesSkill
- managing-tls-certificatesSkill
- preparing-compliance-documentationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Before proceeding, determine which cloud provider KMS the user will use.
- Distinctive: line 45
AWS KMS: Use when the CockroachDB Cloud cluster runs on AWS.
- Distinctive: line 46
GCP Cloud KMS: Use when the cluster runs on GCP.
- Distinctive: line 47
Azure Key Vault: Use when the cluster runs on Azure.
- Distinctive: line 65
Follow only the subsection for the user's cloud provider (selected in Configuration Decisions above).
- Distinctive: line 157
After enabling CMEK, verify the cluster is operating normally:
- Distinctive: line 169
CMEK misconfiguration can make data inaccessible: If the KMS key is deleted, disabled, or access is revoked, the cluster will not be able …
- Distinctive: line 172
Ensure the KMS key has appropriate deletion protection enabled
- Distinctive: line 173
Verify the IAM/access policy grants are correct
- Distinctive: line 175
Document the key URI and access policies
- Distinctive: line 187
Access restoration: If access was accidentally revoked, restore the IAM/access policy to resume operations
- Distinctive: line 188
New cluster: If CMEK configuration is fundamentally wrong, create a new cluster and migrate data
- Distinctive: line 193
If the key was permanently deleted, data recovery is not possible
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Enabling CMEK Encryption
Enables Customer-Managed Encryption Keys (CMEK) on CockroachDB Cloud clusters so that data-at-rest encryption is controlled by keys in the organization's own cloud provider KMS (AWS KMS, GCP Cloud KMS, or Azure Key Vault). CMEK gives organizations full control over key lifecycle, rotation, and revocation.
When to Use This Skill
- Enabling CMEK for regulatory or compliance requirements (SOC 2, HIPAA, PCI DSS)
- Verifying CMEK is properly configured after initial setup
- Rotating CMEK keys per organization key rotation policy
- Responding to a security audit finding about encryption at rest
- Understanding CMEK requirements and plan prerequisites
Prerequisites
- CockroachDB Cloud Advanced plan — CMEK is not available on Basic or Standard plans
- Advanced Security Add-on — Must be enabled on the Advanced plan cluster
- Cloud provider KMS:
- AWS: KMS key in the same region as the cluster, with appropriate IAM policy
- GCP: Cloud KMS key ring and key in the same region, with appropriate IAM bindings
- Azure: Key Vault with key in the same region, with appropriate access policies
- ccloud CLI authenticated with Cluster Admin role
- Cross-account access: The CockroachDB Cloud service account must have permission to use the KMS key
Check plan eligibility:
# Verify cluster plan type
ccloud cluster info <cluster-name> -o json
# Look for "plan": "ADVANCED" and Advanced Security Add-on statusConfiguration Decisions
Before proceeding, determine which cloud provider KMS the user will use. Ask which option applies to their environment, then follow only the corresponding subsection in Step 2.
Decision 1 — Cloud provider KMS:
- AWS KMS: Use when the CockroachDB Cloud cluster runs on AWS. Requires a symmetric encryption key in the same region as the cluster.
- GCP Cloud KMS: Use when the cluster runs on GCP. Requires a key ring and key in the same region.
- Azure Key Vault: Use when the cluster runs on Azure. Requires a Key Vault with a key in the same region.
Steps
1. Verify Plan and Add-on Eligibility
ccloud cluster info <cluster-name> -o jsonIf Standard plan: CMEK is not available. The upgrade path is:
- Upgrade to Advanced plan (contact CockroachDB sales or upgrade in Cloud Console)
- Enable the Advanced Security Add-on
If Advanced plan without Advanced Security Add-on: Enable the add-on in the Cloud Console before proceeding.
2. Create a KMS Key in Your Cloud Provider
Follow only the subsection for the user's cloud provider (selected in Configuration Decisions above).
AWS KMS
# Create a symmetric encryption key in the same region as the cluster
aws kms create-key \
--description "CockroachDB CMEK - <cluster-name>" \
--key-usage ENCRYPT_DECRYPT \
--origin AWS_KMS \
--region <aws-region>Grant the CockroachDB Cloud service account access to the key:
{
"Effect": "Allow",
"Principal": {
"AWS": "<cockroachdb-cloud-service-account-arn>"
},
"Action": [
"kms:Encrypt",
"kms:Decrypt",
"kms:GenerateDataKey",
"kms:DescribeKey"
],
"Resource": "*"
}GCP Cloud KMS
# Create a key ring
gcloud kms keyrings create cockroachdb-cmek \
--location <gcp-region>
# Create a symmetric encryption key
gcloud kms keys create cmek-key \
--keyring cockroachdb-cmek \
--location <gcp-region> \
--purpose encryptionGrant the CockroachDB Cloud service account access:
gcloud kms keys add-iam-policy-binding cmek-key \
--keyring cockroachdb-cmek \
--location <gcp-region> \
--member "serviceAccount:<cockroachdb-cloud-service-account>" \
--role "roles/cloudkms.cryptoKeyEncrypterDecrypter"Azure Key Vault
# Create a key in the existing Key Vault
az keyvault key create \
--vault-name <vault-name> \
--name cockroachdb-cmek \
--kty RSA \
--size 2048Grant the CockroachDB Cloud managed identity access via Key Vault access policies.
3. Configure CMEK on the Cluster
# Enable CMEK with the KMS key URI
ccloud cluster update <cluster-id> \
--cmek-key-spec '<key-spec-json>'The key spec format varies by cloud provider. Refer to the CockroachDB Cloud documentation for the exact JSON structure for your provider.
See ccloud commands reference for detailed command syntax.
4. Verify CMEK Configuration
# Check CMEK status
ccloud cluster info <cluster-name> -o json
# Verify cmek_config shows enabled status and correct key URICMEK status is not exposed as a SQL cluster setting; the Cloud Console Cluster → Settings → Encryption page is authoritative for managed clusters.
5. Test Key Accessibility
After enabling CMEK, verify the cluster is operating normally:
-- Create and query a test table to verify read/write works
CREATE TABLE cmek_test (id INT PRIMARY KEY, data STRING);
INSERT INTO cmek_test VALUES (1, 'encryption test');
SELECT * FROM cmek_test;
DROP TABLE cmek_test;Safety Considerations
CMEK misconfiguration can make data inaccessible. If the KMS key is deleted, disabled, or access is revoked, the cluster will not be able to read or write data.
Before enabling CMEK:
- Ensure the KMS key has appropriate deletion protection enabled
- Verify the IAM/access policy grants are correct
- Confirm the KMS key region matches the cluster region
- Document the key URI and access policies
Key management risks:
- Key deletion: Deleting the KMS key makes all cluster data permanently inaccessible
- Access revocation: Revoking CockroachDB's access to the key will cause the cluster to stop serving reads and writes
- Key rotation: Plan key rotation per your organization's policy; CockroachDB supports automatic re-encryption with rotated keys
Rollback
CMEK cannot be disabled once enabled on a cluster. However:
- Key rotation: You can rotate to a new key at any time
- Access restoration: If access was accidentally revoked, restore the IAM/access policy to resume operations
- New cluster: If CMEK configuration is fundamentally wrong, create a new cluster and migrate data
Emergency — Key access lost:
- Restore KMS key access immediately (IAM policy, key re-enable)
- The cluster will resume operations once key access is restored
- If the key was permanently deleted, data recovery is not possible
References
Related skills:
- auditing-cloud-cluster-security — Run a full security posture audit
Official CockroachDB Documentation:
Cloud Provider KMS Documentation:
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

