AI agents
AWS Details Three OAuth Patterns for Calling Snowflake Cortex From Bedrock AgentCore
AWS tested three OAuth configurations in Amazon Bedrock AgentCore Identity for reaching Snowflake's managed MCP server, covering per-user, SSO and service-account access.
AWS has published a technical walkthrough explaining how AI agents running on Amazon Bedrock AgentCore authenticate to Snowflake's managed MCP server, which exposes Snowflake Cortex Agents and surfaces Cortex Search and Cortex Analyst as MCP tools. According to AWS, the central enterprise question is not how the agent is built but who it authenticates as when it calls Snowflake.
The post focuses on outbound authentication from Amazon Bedrock AgentCore Gateway rather than acting as a wrapper around Snowflake. The Gateway aggregates its configured targets into one catalog and presents them to the agent as a single tools/list response. To reach Snowflake, it first obtains a workload token through GetWorkloadAccessTokenForJWT, then calls GetResourceOauth2Token against a configured provider. Amazon Bedrock AgentCore Identity owns the token vault, refresh logic and user-to-token binding, fetching and renewing credentials on the agent's behalf.
AWS describes three configurations it tested end to end. The first is Snowflake OAuth with an authorization_code grant, where Snowflake acts as its own authorization server and users sign in directly, consenting to a specific role; no external identity provider is involved and QUERY_HISTORY records the real username. The second is three-legged OAuth through a corporate IdP such as Okta or Microsoft Entra ID, where Snowflake validates IdP-issued JWTs through an External OAuth security integration, checking issuer, audience and signature, then maps a configurable claim to a Snowflake LOGIN_NAME or EMAIL_ADDRESS. The third is two-legged client_credentials with a shared service user for machine-to-machine work, requiring no user interaction or consent. AWS also notes that AgentCore Identity supports an on-behalf-of token exchange for unattended per-user workloads without a consent prompt.
The article flags several operational details. Setting OAUTH_AUTHORIZATION_SERVER issuer-locks an MCP scope to an external IdP, and once set, Snowflake OAuth tokens are rejected for that scope without falling back, so teams needing both patterns should configure the parameter per schema or database. Access tokens default to 600 seconds and can last at most 3600, after which AgentCore Identity refreshes them automatically. Privileged roles such as ACCOUNTADMIN and ORGADMIN are blocked by default, but AWS warns that setting OAUTH_USE_SECONDARY_ROLES to IMPLICIT can still let secondary roles carry them, so it recommends keeping the default NONE.
Inferred from the source, the value of the post is less about new capability than about making agent-era identity boundaries comparable. The IdP-free path is simplest and gives per-user attribution, which suits proofs of concept and compliance regimes requiring individual accountability. The SSO path extends multi-factor authentication and conditional access into agent calls. The service-account path suits unattended batch work at the cost of audit trails that show only a shared identity. For teams connecting agents to a Snowflake warehouse, these map to trade-offs among audit granularity, where identity governance lives, and operational overhead.