← ClaudeAtlas

auditing-kms-key-policy-and-envelope-encryptionlisted

Audit key-management policies and envelope-encryption design for a decrypt path broader than intended: a key policy or grant that admits a principal who should never decrypt, a wildcard key resource in an identity policy that covers unrelated keys, an encryption context that is not enforced so a data key decrypts outside its intended scope, and a cross-account key grant that widens the decrypt set. Covers cloud key-management services, key policies and grants, and envelope encryption where a data key protects the payload and the key policy protects the data key. Use when data is protected by a managed key and the key policy plus encryption context are the boundary on who can decrypt. The principal the key policy admits is the source, the decrypt operation is the sink, and the decryptor beyond the data's intended readers is the bug.
UnboundCompute/security-agent-skills · ★ 4 · AI & Automation · score 80
Install: claude install-skill UnboundCompute/security-agent-skills
# Auditing KMS key policy and envelope encryption: who can actually decrypt Envelope encryption protects data with a data key and protects the data key with a managed master key, so the real access boundary is the master key's policy plus whatever encryption context constrains the data key. That indirection hides over-broad access. A key policy or grant can admit a principal who should never decrypt this data; a wildcard key resource in an identity policy can cover keys the author never considered; and an encryption context, meant to bind a data key to a specific scope, does nothing if the decrypt path does not enforce it. Cross-account grants widen the set further. The payload can be perfectly encrypted while the decrypt set quietly includes the wrong principals. You audit these by computing who can decrypt and comparing that to who should read the data. ## When to use - Data is protected by a managed key through envelope encryption, with a data key under a master key. - Decrypt access is governed by a key policy, key grants, and identity policies that may use wildcards. - An encryption context is used to scope a data key, and you need to confirm it is enforced on decrypt. ## Scope check Audit key access only in accounts and key stores you own or are authorized to assess. Confirming a decrypt recovers real plaintext, so stay inside the authorized keys and treat recovered data as sensitive within scope, never exfiltrating it. If you can't name the authorization, stop. #