AWS STS Adds GetScopedCredentials to Narrow Permissions for Existing Sessions

· Original article ↗

Summary

AWS introduced STS GetScopedCredentials, an API that derives temporary credentials with permissions intersected against an inline scope-down policy and/or a shorter duration. AWS shows using it for AI agents, tenant isolation, and workload access.

Key points

  • GetScopedCredentials creates temporary credentials that retain the caller’s IAM identity while reducing permissions, session duration, or both.
  • Resulting permissions are limited to the intersection of the current session’s effective permissions and the scope-down policy; duration cannot exceed the caller session’s remaining time.
  • AWS demonstrates limiting an agent to task-specific access, including restricting a worker to one tenant’s S3 prefix after authentication.
  • At launch, each inline scope-down policy can be up to 2,048 characters, and a session can have up to three scope-down policies.
  • IAM Policy Autopilot can generate a starting policy from AWS SDK calls, but AWS advises reviewing and narrowing any generated wildcards.
  • Calls are logged in CloudTrail; access can also be constrained with IAM policies and condition keys.

Article Details

Defense Focus
Reduce runtime permissions and session duration by issuing scoped-down temporary credentials, and audit GetScopedCredentials calls.
Detection Methods
  • Monitor AWS CloudTrail events where eventSource is sts.amazonaws.com and eventName is GetScopedCredentials.
  • Review the requested policy, durationSeconds, and scopedSessionDescription in requestParameters.
  • Correlate later calls made with scoped credentials to their immediate parent session using userIdentity.accessKeyId.
Data Sources
  • AWS CloudTrail GetScopedCredentials events, including userIdentity, requestParameters, responseElements, and eventTime.
Platforms
  • AWS
Defensive Actions
  • Issue agents and workers only the scoped-down credentials required for their tasks; use policies that allow only necessary actions and resources.
  • Set a shorter duration when appropriate, and apply additional scope-down policies recursively when narrower access is needed.
  • Restrict who can call sts:GetScopedCredentials using applicable policies and condition keys, including sts:DurationSeconds, aws:PrincipalArn, aws:PrincipalTag, and aws:SourceVpce.
  • Review IAM Policy Autopilot-generated policies and replace broad wildcards with task-specific actions and resources.
  • Run agents in isolated or sandbox environments, as the article recommends, to help ensure they use only scoped-down credentials.

Vendors

Products

Tools

Related Articles