AWS · Security · Cryptographic Authorization
AWS KMS Key Policy Evaluation
Intermediate LAB for understanding how KMS key policies, IAM permissions, grants, encryption context, and guardrails combine into an effective cryptographic access decision.
Overview
KMS key policies control cryptographic access. A principal can have access to a service resource but still fail to decrypt data when the KMS key policy, grant, or encryption context does not permit the operation.
Concept Deep Dives
Expand these concepts when studying KMS key policies or explaining data-protection access decisions.
What is a KMS key policy?
A KMS key policy is the resource policy attached to a KMS key. It defines who can administer the key and who can use the key for cryptographic operations such as encrypt, decrypt, and generate data keys.
Why is KMS different from ordinary resource policies?
KMS protects cryptographic access to data. A user may reach an encrypted object or secret, but still fail if KMS does not allow the decrypt operation.
What is a KMS grant?
A KMS grant delegates permission to use a key, often for AWS services or workloads. Grants can allow specific cryptographic operations under defined conditions.
What is encryption context?
Encryption context is additional authenticated metadata passed with KMS operations. Policies and grants can require matching context values before decrypt is allowed.
What should executives understand?
KMS is a data-protection control plane. Weak key policies can expose encrypted data, while overly restrictive policies can break business-critical services.
Visual KMS Authorization Model
KMS access is easiest to understand as a cryptographic decision path.
Example Scenario
A workload role has an IAM policy allowing kms:Decrypt, but the KMS key policy does not trust that role.
IAM policy: kms:Decrypt allowed
KMS key policy: workload role not trusted
Grant: none
Encryption context: not applicable
Final decision: DENY
Bridge to Principal LABs
KMS access often becomes valuable after identity escalation. A principal that can assume, pass, or chain into a role with KMS authority may gain access to encrypted data.
Governance Boundary
This lab is read-only and deterministic.
Runtime = source of truth
OPA = decision authority
Aegis = bounded intelligence
Frontend = rendering only
- Does not exploit AWS
- Does not mutate infrastructure
- Does not deploy live resources
- Does not enumerate real keys
- Does not decrypt real data
- Does not issue runtime tokens
- Does not override OPA
Source Artifacts
metadata.jsonarchitecture.mdindex.html