Problem
Existing Key Vault rules (AZ-KV-001 through AZ-KV-005) cover soft delete, public network access, diagnostic logging, purge protection, and certificate expiry — none check the vault's authorization model. Key Vaults still using legacy vault access policies instead of Azure RBAC lack scoped, auditable, least-privilege access control: access policies are all-or-nothing per permission type, cannot be scoped to individual secrets/keys/certificates, and aren't tracked through Azure RBAC's centralized role-assignment audit trail.
Proposed rule
| Rule ID |
Check |
Severity |
AZ-KV-006 |
Key Vault has enable_rbac_authorization set to false or unset (still on legacy access policies) |
MEDIUM |
Implementation scope
- Reuse
AzureClient.get_key_vaults() — no new client method needed, the property is already on the returned vault objects.
- Flag when
properties.enable_rbac_authorization is False or missing (access policies are the legacy default; a vault must opt into RBAC).
- Playbook:
az keyvault update --enable-rbac-authorization true, with a note that existing access policies stop being enforced once RBAC is on (so role assignments should be prepared first).
- Compliant / non-compliant / missing-property test cases, following the existing
tests/test_rules_keyvault.py pattern.
- Update all four compliance framework JSON files (CIS, NIST CSF, ISO27001, SOC2).
A mapping issue found while drafting this
Cross-checked against the real CIS Azure Foundations Benchmark: the official control for "Enable Role Based Access Control for Azure Key Vault" is 8.6. In this repo's compliance/frameworks/cis_azure_benchmark.json, control 8.6 is already assigned to AZ-KV-004 (purge protection) — an unrelated check. That looks like a pre-existing mapping error, not something this PR should silently resolve by reassigning another rule's control ID. I've mapped AZ-KV-006 to TBD-KV-006 for now, following the same TBD-* placeholder convention already used elsewhere in that file (e.g. TBD-IDN-010), pending a maintainer decision on how to resolve the 8.6 collision.
Out of scope
- Auditing individual access-policy permission grants for over-broad access (a bigger surface — enumerating principals/permissions — better suited to its own follow-up issue).
- Key Vault firewall / network ACL default-action checks (overlaps with
AZ-KV-002's public-access check).
Acceptance criteria
References
Problem
Existing Key Vault rules (
AZ-KV-001throughAZ-KV-005) cover soft delete, public network access, diagnostic logging, purge protection, and certificate expiry — none check the vault's authorization model. Key Vaults still using legacy vault access policies instead of Azure RBAC lack scoped, auditable, least-privilege access control: access policies are all-or-nothing per permission type, cannot be scoped to individual secrets/keys/certificates, and aren't tracked through Azure RBAC's centralized role-assignment audit trail.Proposed rule
AZ-KV-006enable_rbac_authorizationset tofalseor unset (still on legacy access policies)Implementation scope
AzureClient.get_key_vaults()— no new client method needed, the property is already on the returned vault objects.properties.enable_rbac_authorizationisFalseor missing (access policies are the legacy default; a vault must opt into RBAC).az keyvault update --enable-rbac-authorization true, with a note that existing access policies stop being enforced once RBAC is on (so role assignments should be prepared first).tests/test_rules_keyvault.pypattern.A mapping issue found while drafting this
Cross-checked against the real CIS Azure Foundations Benchmark: the official control for "Enable Role Based Access Control for Azure Key Vault" is 8.6. In this repo's
compliance/frameworks/cis_azure_benchmark.json, control8.6is already assigned toAZ-KV-004(purge protection) — an unrelated check. That looks like a pre-existing mapping error, not something this PR should silently resolve by reassigning another rule's control ID. I've mappedAZ-KV-006toTBD-KV-006for now, following the sameTBD-*placeholder convention already used elsewhere in that file (e.g.TBD-IDN-010), pending a maintainer decision on how to resolve the8.6collision.Out of scope
AZ-KV-002's public-access check).Acceptance criteria
8.6collision noted above.enable_rbac_authorizationfalse/unset and skips RBAC-enabled vaults.tests/test_cis_benchmark_mapping.pypasses (no duplicate CIS control IDs).References