Concept and mechanism
Delegating to a provider should avoid sharing permanent credentials and should define who assumes the role, in what context, and with which permissions. For a provider acting for multiple customers, an external ID in the trust policy helps mitigate confused deputy.
The provider assigns a distinct value to each customer context and includes it in assumption. AWS does not treat this identifier as a secret. The principal still needs authorization and the ID grants no actions itself.
Validate both the correct case and cases with a missing or incorrect ID: success on the permitted path does not prove rejection of the forbidden path.
Guided application
S3 presigned URLs are bearer credentials for a scope and duration. They can be reused while valid; single use needs an additional mechanism. Their lifetime cannot exceed source-credential validity: two hours specified in a URL do not override a session ending in 35 minutes.
Also protect the URL from log exposure or inappropriate sharing. During permission analysis, identify the principal precisely. A direct grant to a role session ARN in the same account has different boundary implicit-deny rules from a role-ARN grant.
That exception does not remove explicit denies or other applicable limits. Before generalizing, draw the grant path and involved policies.
Workshop: three attempts to accept delegation
A provider assigned A-847 and B-392 to two customers. Customer A’s role trusts the authorized provider principal and requires A-847. Consider only this mechanism, with other permissions satisfied.
Fill in expected outcomes for that principal using A-847, B-392 and no ID: Allow, Deny, Deny. Now add a second Allow for the same principal without the condition. All three requests pass in this model.
Explain why rotating A-847 does not repair the alternative path and propose a correction. Answer: remove or scope the grant that ignores context; demonstrate success with the correct ID and rejection with the wrong ID and no ID again. The provider must preserve the customer association and send it correctly.
An isolated positive test proves only availability. Acceptance should retain requests, outcomes and policy version without publishing credentials.
Expiry, reuse and principal type
At 14:00, a GET URL is issued with stated expiry at 16:00, signed with credentials expiring at 14:35. There is no other restriction. A new request at 14:34 can still be accepted; at 14:36 it cannot.
A transfer started before the limit can continue, but a new attempt after a disconnect is subject to validity at that time. Hiding the portal button does not prevent reuse of the saved URL before 14:35. These are distinct boundaries: issuance, request admission and single use.
In another case, compare a resource grant to the role ARN with a direct grant to the session ARN in the same account. If the boundary merely omits the action, the former is limited by that omission and the latter has the documented exception.
With an applicable explicit Deny, both are denied. Record exact principal, action, resource and denial type. These exercises use supplied data, with no executed role assumption or S3 access.
The provider obtains a session even without an external ID. The expected condition is unenforced and integration does not yet meet the design.
Common pitfalls
External ID as password; URL as single use; configured duration as longer than the session; role and session as the same principal.
Related topics: Policies, tags, and access analysis · Keys, masking, and retention
Confirm context, validity, and effective principal in each access decision.
References
- Third-party role access · AWS documentation consulted 2026-09-29
- S3 presigned URLs · AWS documentation consulted 2026-10-12
- Permissions boundaries · AWS documentation consulted 2026-10-12