View a markdown version of this page

Verify what a user can see - AWS Context

Verify what a user can see

After you configure identity mapping, verify that a given user sees only what they are authorized to see. Query the Agent Context as (or on behalf of) a specific identity and confirm that the returned context matches that identity’s source permissions: source data the identity is authorized for is returned, and data it is not authorized for is withheld. For Snowflake and Databricks, table and column metadata is filtered the same way. Then confirm the access is attributable by locating the corresponding entry in the audit trail (see CloudTrail logs).

You can’t test another user’s access from your own credentials. To verify, complete the following steps:

  1. Sign in as that user, and get AWS credentials that carry the user’s identity. Use IAM Identity Center or an IAM identity provider with trusted identity propagation turned on. For setup, see How the user’s identity reaches your sources and Trusted identity propagation with IAM in the IAM User Guide.

  2. With those credentials, call SearchAgentContext and AgenticRetrieve on the Agent Context. For AWS Glue Data Catalog tables, you can also call ExecuteSql.

  3. Compare the results with the user’s permissions in each source.

  4. If results are missing and the connection uses a data access role, find the AssumeRole event for that role in AWS CloudTrail. If additionalEventData.trustedIdentityPropagationSuppressed is true, the user’s identity didn’t reach the source.