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

IAM permissions boundaries: permission limits, grants and exceptions

A permissions boundary sets the maximum permissions identity-based policies can grant to an IAM user or role. It does not grant permissions on its own. Compare read, write and delete access for a report role, then examine why direct resource-policy grants cannot all be reduced to one intersection formula.

What you will learn

Work through an identity-grant ceiling and distinguish grants to user, role and session principals in resource policies.

Prerequisite

Know IAM Allow/Deny and role sessions. A managed policy is a reusable permissions policy; an ARN identifies an identity or resource. These are fixed reading examples, not instructions to create or change live policies.

A grant policy and a ceiling play different roles

The same kind of managed policy plays a different role when attached as a permissions policy versus used as a boundary. The former grants identity permissions; the latter constrains identity-policy grants. An Allow in a boundary alone does not establish access.

This diagram compares only the identity-policy grant path
This diagram compares only the identity-policy grant path1: Identity grant — Operations offered by this grant; not a traffic path or execution order. — This grant path. 2: Boundary ceiling — Limits this grant path; direct resource grants are addressed separately below. — This grant path12Identity grantBoundary ceilingThis grant pathThis diagram compares only the identity-policy grant path1: Identity grant — Operations offered by this grant; not a traffic path or execution order. — This grant path. 2: Boundary ceiling — Limits this grant path; direct resource grants are addressed separately below. — This grant path12Identity grantBoundaryceilingThis grant path
  1. Identity grant → This grant pathOperations offered by this grant; not a traffic path or execution order.
  2. Boundary ceiling → This grant pathLimits this grant path; direct resource grants are addressed separately below.
Identity grant
ReportWriter is granted read and write.
Boundary ceiling
Read and delete are inside the ceiling; this grants nothing.
This grant path
Reading appears in both; any applicable explicit Deny still wins.

Work through read, write and delete

Assume no other grants, restrictions or explicit Deny
OperationIdentity AllowInside boundaryResult for this grant path
GetObject: readPresentYesWithin the permitted grant
PutObject: writePresentNoDenied outside the ceiling
DeleteObject: deleteAbsentYesDenied for lack of a grant

For this teaching example, the boundary includes GetObject and DeleteObject, while identity policies grant GetObject and PutObject. Only GetObject is in both. DeleteObject being inside the boundary does not create the missing identity grant. The table is not a live S3 access test.

Choose an option to see the result and explanation.

DeleteObject is inside the boundary but has no identity Allow. What happens in this table?
Read the answer and reason

Answer: Denied: no grant exists · A boundary is a ceiling, not a grant. This restricted identity-policy example therefore does not permit deletion.

For resource grants, identify the recipient principal

The following table compares resource-policy grants within the same account. Implicit denial is missing permission; explicit denial comes from an applicable Deny statement. “Not limited” refers to the specified implicit denial; it does not remove applicable explicit Deny or organization controls.

Do not apply a boundary’s implicit denial identically to every grant
Resource-policy recipientHow the grant relates to implicit limitsDistinction to retain
IAM user ARN, not a federated sessionNot limited by implicit denial in identity policy/boundaryA user grant differs from grants involving derived sessions
IAM role ARN named in PrincipalLimited by implicit denial in boundary/session policiesA role ARN differs from an assumed-role session ARN
Direct grant to role session ARNNot limited by implicit denial in identity/boundary/session policiesThis is a direct grant to the specific session
Wildcard Principal with aws:PrincipalArn conditionDo not assume identity-side implicit ceilings always constrain itDifferent from naming the role ARN directly in Principal

Choose an option to see the result and explanation.

Can resource grants to a role ARN and a session ARN be evaluated with the same blanket formula?
Read the answer and reason

Answer: No: distinguish the grant recipients · A direct same-account session grant differs from a role-ARN grant in its treatment of implicit limits. Explicit Deny and other applicable controls still need review.

Read session policies and explicit Deny in context

When a session policy is passed, the role’s identity-policy grant path is limited by role permissions, boundary and session policy. Do not extend that explanation unconditionally to the direct resource grants above. The grant path and recipient principal are essential assumptions.

AWS warns against NotPrincipal combined with Deny in resource policies for IAM users or roles with a boundary. Such a statement can deny those principals regardless of the intended exclusions. This is a review consideration, not a live-policy change performed by this lesson.

Choose an option to see the result and explanation.

A same-account resource policy directly grants access. Can an applicable explicit Deny also be ignored?
Read the answer and reason

Answer: No: explicit Deny differs from implicit missing permission · An implicit limit not constraining a particular grant does not mean the grant overrides an applicable explicit Deny. Explicit Deny takes precedence.

Record the grant path before considering a change

  1. Fix the user/role/session principal, requested action/resource and account relationship.
  2. Write the identity grant and boundary ceiling separately.
  3. Check session policies and any resource grants, including their recipient.
  4. Review applicable explicit Deny and organization/service controls.
  5. Explain the intended scope and evidence to an administrator instead of removing safeguards to test.

Check, then explain in your own words

  1. Separate a grant from its ceiling.
  2. Compare three operations in the restricted identity example.
  3. Distinguish user/role/session grants and explicit Deny.
Check your understanding: Does attaching a boundary make one intersection formula sufficient for all access?

No. Check resource-grant recipients and account relationships.

An identity-grant ceiling and direct same-account resource grants have different conditions. Applicable explicit Deny and other controls still remain.

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.