OpenParable
Skip to content
← Back to skills

Cis Azure Database 3.5

DevOps & Security
cis-azure-database-3.5

Cis Azure Database 3.5 is an Agent Skill for devops & security published in the CyberStrikeus/CyberStrike repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Ensure critical data is encrypted with customer-managed keys (CMK)

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/CyberStrikeus/CyberStrike/blob/HEAD/.cyberstrike/skill/CIS_benchmarks/Cloud_Providers/Microsoft_Azure/CIS_Microsoft_Azure_Database_Services_Benchmark_v2.0.0/cis-azure-database-3.5/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/cis-azure-database-3-5, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

3.5 Ensure critical data is encrypted with customer-managed keys (CMK) (Manual)

Profile Applicability

  • Level 2

Description

Customer-managed keys introduce additional depth to security by providing control over encryption keys. Where required, and organizational capacity allows, sensitive data at rest can be encrypted using customer-managed keys.

While it is possible to automate the assessment of this recommendation, the assessment status remains "Manual" due to ideally limited scope. The scope of application should be carefully considered to account for organizational capacity, and targeted to workloads with specific need for CMK.

Rationale

Customer-managed keys provide greater control over the creation, rotation, and revocation of encryption keys, supporting strict security and compliance requirements.

Impact

Implementing customer-managed keys introduces additional administrative effort to create, rotate, monitor, and secure encryption keys.

Audit Procedure

Audit from Azure Portal

  1. Go to Azure Cosmos DB.
  2. Select the name of an Azure Cosmos DB account.
  3. Under Settings, select Data Encryption.
  4. Ensure Encryption Key Type is set to Customer-managed key.
  5. Repeat steps 1-4 for each account.

Audit from Azure CLI

Run the following command to list Azure Cosmos DB accounts:

az cosmosdb list

For each account, run the following command to get the Key Vault key URI:

az cosmosdb show --resource-group <resource-group> --name <cosmos-db> --query keyVaultKeyUri

Ensure an Azure Key Vault key URI is returned.

Audit from PowerShell

Run the following command to get Azure Cosmos DB accounts for a given resource group:

Get-AzCosmosDBAccount -ResourceGroupName <resource-group>

Run the following command to get the account with a given name:

$cosmosdb = Get-AzCosmosDBAccount -ResourceGroupName <resource-group> -Name <cosmos-db>

Run the following command to get the Key Vault key URI:

$cosmosdb.KeyVaultKeyUri

Ensure an Azure Key Vault key URI is returned.

Repeat for each account.

Audit from Azure Policy

  • Policy ID: 1f905d99-2ab7-462c-a6b0-f709acca6c8f - Name: 'Azure Cosmos DB accounts should use customer-managed keys to encrypt data at rest'

Expected Result

Encryption Key Type should be set to Customer-managed key, or a Key Vault key URI should be returned from CLI/PowerShell.

Remediation

Remediate from Azure Portal

  1. Go to Azure Cosmos DB.
  2. Select the name of an Azure Cosmos DB account.
  3. Under Settings, select Data Encryption.
  4. Set Encryption Key Type to Customer-managed key.
  5. Provide a key URI.
  6. Select Save.
  7. Repeat steps 1-6 for each account requiring remediation.

Default Value

By default, Azure Cosmos DB accounts are encrypted using service-managed keys.

References

  1. https://learn.microsoft.com/en-gb/azure/cosmos-db/how-to-setup-customer-managed-keys-existing-accounts

CIS Controls

Controls VersionControlIG 1IG 2IG 3
v83.11 Encrypt Sensitive Data at RestXX
v714.8 Encrypt Sensitive Information at RestX

MITRE ATT&CK Mappings

Techniques / Sub-techniquesTacticsMitigations
T1530TA0009M1041