Recommendations for identity propagation
Apply the following practices to keep context scoped to each user:
-
Use a TIP session for every caller that acts on behalf of a user. Use IAM role credentials without TIP only for workloads that need only content that isn’t restricted to specific users.
-
Grant each data access role only the data that every caller can see. A request without a user identity reads AWS Glue Data Catalog data with the grants of the data access role. Scope those grants so that this case can’t expose restricted data.
-
Order connections that reach the same data. When you map several connections that reach the same knowledge base, AWS Glue table, or document, AWS Context reads it through the connection whose mapping you created first, with that connection’s setting. As a result, AWS Context can read data with another connection’s data access role, even when your connection uses the caller’s credentials. Create the mapping of the connection whose setting you want first, or map only connections that use the same setting for that data. For more information, see When several connections reach the same data.
-
Limit who can call the Agent Context. Grant AWS Context operations only to the principals that need them, and allow other accounts only through the Agent Context’s resource policy.
-
Trust only identity sources that you control. AWS Context uses a user’s identity only when it trusts the identity source: an identity source in the account that owns the Agent Context, or one that you add to the Agent Context’s trusted identity sources. Review that list when you add or remove accounts.
-
If your IAM Identity Center instance uses the legacy experience of trusted identity propagation, add
sts:SetContextto the trust policy of each data access role. With the simplified experience and with IAM federation, AWS STS allowssts:SetContextimplicitly.