View a markdown version of this page

Choosing between IAM sessions and trusted identity propagation - AWS Context

Choosing between IAM sessions and trusted identity propagation

Each application or agent that queries an Agent Context uses one of two kinds of session. Choose an IAM session without a user identity, or a session with trusted identity propagation (TIP). Your choice determines whether connections return results for an individual user.

Caller Session to use What connections return

A service or workload that acts on its own behalf

IAM role credentials without TIP

Results that do not depend on a user

An application or agent that acts on behalf of a workforce user

A TIP session from IAM Identity Center or from IAM federation

Data for the user, when each connection can use the user’s identity. For the requirements, see Identity requirements by connection type.

For setup, see IAM Identity Center for workforce users and SSO federation through corporate IdPs.

Without a user identity, connections cannot apply per-user permissions. Each connection type returns the following:

  • Amazon Bedrock Managed Knowledge Bases connections return only documents that are not restricted by access control lists (ACLs).

  • AWS Glue Data Catalog connections with a data access role return the data that AWS Lake Formation grants to that role. Connections without a data access role return the data that Lake Formation grants to the caller’s IAM principal.

  • Third-party catalogs return no data.

With a TIP session, AWS Glue Data Catalog connections return the data that Lake Formation grants to the user and the user’s groups. For how to grant Lake Formation permissions to IAM Identity Center users and groups, see Granting permissions to users and groups.

Lake Formation permissions apply when AgenticRetrieve or ExecuteSql reads table data. SearchAgentContext and TraverseAgentContext return the table and column nodes of AWS Glue Data Catalog connections to every caller, with or without a user identity. If the names of your tables or columns are sensitive, limit which principals can call the Agent Context.

Without a user identity, what a AWS Glue Data Catalog connection returns depends on whether it has a data access role. A connection with a data access role returns the data that Lake Formation grants to that role, so every caller gets the same data. Limit which principals can call the Agent Context, and grant the data access role access only to data that every caller can see. A connection without a data access role reads data with the caller’s own credentials, so each caller gets the data that Lake Formation grants to the caller’s IAM principal. AWS Context also treats a TIP session from a workload identity as a session without a user. This does not apply to a session from IAM federation whose Subject type is workload. For that case, see The federated user’s Subject type is not user.

If you map several connections that reach the same table or knowledge base, the connection whose mapping you created first decides how AWS Context reads that data: with its data access role, or with the caller’s credentials. For more information, see When several connections reach the same data.

With any session, IAM policies control which AWS Context operations the caller can use. A caller in another account also needs the Agent Context’s resource policy to allow the call. A user identity limits what connections return, and it does not grant access to operations.