Policy composition belongs to a specific engine
Reason about grants, boundaries, and explicit denies without assuming one provider's combination rules are universal.
On this page
The question for today
What you’ll understand
- Distinguish absence of a grant from an explicit deny.
- Evaluate a constrained deny-overrides model with its assumptions stated.
- Compare provider-specific policy semantics without inventing a universal rule.
Two policy documents can interact differently depending on the engine evaluating them. Some grants combine additively, some boundaries intersect with grants, and some explicit denies override allows. A rule that sounds conservative can still be wrong when copied into another system. Identify the principal type, resource, policy categories, and engine version before evaluating a request. The word deny in an explanation is not enough to establish actual deny precedence.
Implicit absence and explicit prohibition differ
In an allow-list model, a request can fail because no applicable grant exists. An explicit deny is a separate policy statement that may override grants if the engine defines that behavior. AWS IAM documents explicit-deny precedence in its applicable evaluation logic, while the details of identity policies, resource policies, boundaries, sessions, and organizations vary with context. Do not reduce all AWS requests to one unqualified union or intersection formula; principal and resource-policy cases matter.
Kubernetes RBAC provides a useful contrast: its permissions are additive and it does not express RBAC deny rules. Removing one RoleBinding does not remove permission supplied by another binding. Other configured Kubernetes authorization mechanisms have their own evaluation behavior, which is not the same as adding a fictional deny field to a Role. Read the active engine's rules and distinguish an RBAC grant from the final request outcome in a broader authorization configuration.
A restricted model makes precedence inspectable
For a small teaching model, define an identity grant A, a mandatory boundary B, and an applicable explicit deny D. Permit a request only when both grant and boundary allow and no deny applies. This resembles one restricted category of deny-overrides reasoning, but it is not a complete implementation of AWS IAM. State that resource-based grants, special principals, session policies, organizational controls, and service-specific rules are outside the toy model before using its truth table.
A permissions boundary is generally a maximum permission constraint in the relevant provider model, not an independent grant. Replacing an intersection with a union can create access the administrator never intended. Conditions also matter: a deny statement that does not match the request context is not an applicable deny. Evaluate concrete action-resource-context combinations and test both matching and nonmatching conditions rather than counting how many Allow or Deny words occur in policy files.
Policy tests need expected decisions and reasons
Write a matrix of principals, actions, resources, and context values with expected results. Include an allow with no boundary match, an explicit deny matching only one region or resource, and an overlapping grant from another source. Test using the provider's actual policy tools and effective permissions where available, then verify the live service path. A policy simulator's scope may omit controls that affect real requests, so record its coverage instead of treating a green simulation as a universal access proof.
The probability lab is a contrast with deterministic policy decisions. Reset and set both p=0.5, n=10, predict five successes on average, then inspect. It does not evaluate grants, denies, or boundaries. A policy match is not an independent coin flip, and adding more allow statements does not mean increasing a success probability under every engine. Use the distinction to explain why a truth table and concrete matching context are stronger evidence than a plausible-looking aggregate permission percentage.
Work it through
Evaluate the restricted three-input engine
In the explicitly defined toy engine, four requests have(A, B, D) values(1,1,0), (1,1,1), (1,0,0), and(0,1,0). No other policy sources exist.
The first request satisfies A and B with no deny, so it is allowed. The second has both grants but an applicable explicit deny and is rejected.
The third fails the mandatory boundary despite an identity grant. The fourth has no identity grant; the boundary alone does not authorize it.
Exactly one of four requests is allowed in this table. This is a deterministic result for four inputs, not a 25% security success probability or a complete cloud-provider policy simulation.
Precedence is clear only because the teaching engine and all inputs were defined. Real provider-specific evaluation must preserve its additional cases.
The living notebook
Explore the model
Interactive lab · probability
Permission decisions are not random trials
Reset, set p=0.5, n=10, predict mean 5. This iid binomial distribution contains no policy matching, explicit denies, boundaries, or RBAC semantics.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forUse engine-specific decision tables rather than interpreting policy documents as probabilistic votes.
Pause & reason
Check your understanding
Your turn
Try it yourself
In the restricted A∧B∧¬D engine, an administrator adds a boundary match for a request with A=0, D=0. Does that grant access? Then explain why the answer cannot be copied blindly to every provider policy source.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
A maximum constraint and an actual grant have different roles in the defined model.
Compare with the solution
No: with A=0 the conjunction remains false even when B becomes 1. The boundary does not independently grant access in this model. Real providers can have other grant sources, resource-based policies, principal-specific exceptions, or different evaluation engines. Identify those actual rules rather than promoting this teaching formula into a universal IAM algorithm.
Keep the idea
Take it with you
- Explicit deny and absent grant are distinct concepts.
- Grant unions, boundary intersections, and deny precedence are engine-specific.
- Concrete request matrices and actual effective-policy checks support a valid conclusion.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.