INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: IAM: roles and permission limits

Explicit vs implicit Deny in IAM: reason about one request at a time

An explicit Deny comes from an applicable Deny statement; an implicit denial means the required permission has not been established. Both deny access, but adding an Allow affects them differently. Hold the principal, action and resource constant in a report-reading example to separate evidence from unknowns.

What you will learn

Distinguish applicable Deny from missing permission for the same request, without treating another action’s Allow or a nonmatching condition as evidence of success.

Prerequisite

Action identifies the operation, Resource the target, and Effect Allow or Deny. Identity-based policies attach to identities; resource-based policies attach to resources. Begin with a synthetic identity-only example, then add the context required for real IAM evaluation.

Fix one request before reading policies

Match statements against the same request
Match statements against the same request1: Read report — Match the same principal, action, resource and request conditions. — Applicable statements. 2: Applicable statements — Record reasons after checking applicability; not a live AWS execution timeline. — Denial evidence12Read reportApplicablestatementsDenial evidenceMatch statements against the same request1: Read report — Match the same principal, action, resource and request conditions. — Applicable statements. 2: Applicable statements — Record reasons after checking applicability; not a live AWS execution timeline. — Denial evidence12Read reportApplicablestatementsDenial evidence
  1. Read report → Applicable statementsMatch the same principal, action, resource and request conditions.
  2. Applicable statements → Denial evidenceRecord reasons after checking applicability; not a live AWS execution timeline.
Read report
Principal: ReportReader. Action: s3:GetObject. Resource: monthly PDF.
Applicable statements
Match action, resource and conditions.
Denial evidence
Separate explicit Deny, missing required Allow and unknowns.

Fix ReportReader’s GetObject request for the monthly PDF. An Allow for another resource, for PutObject, or under a condition that does not match need not permit this request. Check applicability, rather than reading Effect in isolation.

Compare three controlled cases

Identity-only reading example: assume no other grants or restrictions
CaseAllow for this GetObjectDeny for this GetObjectConclusion within this example
AAbsentAbsentImplicit denial: no required grant
BPresentAbsentAllowed within this restricted example
CPresentPresentExplicit denial overrides Allow

Case B is not proof that a live AWS report can be read. It is a specified identity-only comparison with no other policies or restrictions. Real access can depend on resource policies, organization controls, encryption and other applicable conditions.

Choose an option to see the result and explanation.

What happens if another Allow for the same GetObject is added to case C?
Read the answer and reason

Answer: The applicable explicit Deny still rejects it · Policy evaluation is not a vote. An explicit Deny applicable to this request overrides added Allow statements.

Not matching a Deny is not the same as being allowed

A statement denying deletion does not directly deny a GetObject request for the monthly PDF. But if there is no required read grant elsewhere, reading is implicitly denied. Falling outside a Deny does not create an Allow.

Choose an option to see the result and explanation.

There is no GetObject Allow and only a DeleteObject Deny. What about reading?
Read the answer and reason

Answer: Implicit denial in this example: the required Allow is absent · The deletion Deny concerns another operation; it grants no GetObject permission. This identity-only example is denied for lack of an applicable Allow.

For real IAM, identify grant recipients and restrictions

The word Allow has different roles in different policy types
Policy/controlKey questionFaulty shortcut
Identity/resource policyWhich principal, operation and grant path?An identity Allow is always the only grant source
Boundary/session policyHow is this grant path constrained?An Allow in the limiter grants access on its own
Organizations SCP/RCPWhich principal/resource restrictions apply?Every identity in an organization has the same restrictions
Same/cross-account contextIs the grant to a user, role or session?One union/intersection formula covers every case

A permissions boundary limits identity-policy grants; a session policy constrains a session. An SCP (Service Control Policy) limits covered organization principals, while an RCP (Resource Control Policy) constrains covered resources. Do not add every policy type together as if each were a grant.

Choose an option to see the result and explanation.

A boundary allows an action but there is no identity-policy Allow. Does this grant path provide permission?
Read the answer and reason

Answer: No: a boundary does not grant on its own · A boundary limits the maximum permissions granted by identity policies; it is not an independent grant. Any resource-policy grant needs a separate principal/account analysis.

Separate an error message from established denial causes

  1. Record one attempt’s principal, action, resource and conditions.
  2. Find applicable Deny statements and required Allow grants.
  3. Review resource, boundary, session and organization-control applicability.
  4. Separate reasons named by the error from controls not yet checked.
  5. Confirm the intended least-privilege scope and authorized change process before widening access.

Check, then explain in your own words

  1. Fix the action, resource and conditions of one request.
  2. Separate explicit Deny from missing required permission.
  3. Distinguish grants from limits and record evidence and unknowns.
Check your understanding: Can you conclude “allowed” because you found no Deny?

Not without establishing the required Allow and applicable restrictions.

Absence of explicit denial is not a grant. Keep the principal, resource and account relationship explicit.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.