AWS tests three OAuth patterns for Snowflake Cortex AI agents
AWS has published tested OAuth configurations for AI agents that call Snowflake Cortex AI over MCP through Amazon Bedrock AgentCore.
On 17 November 2026, AWS published a technical post walking through three OAuth configurations it tested on Amazon Bedrock AgentCore Identity for AI agents that call Snowflake Cortex AI over MCP. The post is about Snowflake Cortex AI OAuth patterns, not a new model or product launch. It focuses on outbound authentication: how Amazon Bedrock AgentCore Gateway obtains and presents OAuth tokens to the Snowflake-managed MCP server. AWS's write-up on secure OAuth patterns for Snowflake Cortex AI through Amazon Bedrock AgentCore describes the tested flows and the Snowflake security settings that go with each.
What AWS tested
AgentCore Gateway connects agents to external tool providers through MCP server targets. In this setup it targets the Snowflake-managed MCP server, which exposes Cortex Search and Cortex Analyst as MCP tools. The Gateway aggregates configured targets into one catalog and presents it to the agent as a single tools/list response. AgentCore Identity acts as credential broker. Because the Gateway uses JWT inbound authentication, it first gets a workload token with GetWorkloadAccessTokenForJWT, then calls GetResourceOauth2Token against the configured provider. Identity owns the token vault, refresh and user-to-token binding, and fetches, caches and refreshes tokens automatically.
How the three patterns differ
Pattern 1, Snowflake OAuth, uses the authorization_code grant. Snowflake is its own OAuth authorization server, each user authenticates directly to Snowflake, and no external IdP is required. It uses a CustomOauth2 provider and a Snowflake security integration with TYPE = OAUTH and OAUTH_CLIENT = CUSTOM. Queries map to the real user and their assigned role.
Pattern 2, three-legged OAuth with a third-party IdP, also uses authorization_code, but users sign in through corporate SSO. Snowflake trusts IdP-issued JWTs through an External OAuth integration. The credential provider can be built-in, such as OktaOauth2 or MicrosoftOauth2. The Snowflake integration uses TYPE = EXTERNAL_OAUTH with OAUTH_AUTHORIZATION_SERVER and an EXTERNAL_OAUTH_TYPE of OKTA, AZURE, PING_FEDERATE or CUSTOM. Queries map to the real user and their assigned role.
Pattern 3, two-legged OAuth, uses client_credentials with a shared service user. No user interaction or consent is required, which the source says suits machine-to-machine workloads. It can use a built-in provider or CustomOauth2 with the client_credentials grant. Queries map to the shared Snowflake service user.
What this likely changes for builders
The choice is less about whether OAuth works and more about what identity should appear in Snowflake. If an app must attribute every query to the signed-in person, Pattern 1 or 2 preserves that. If a background job runs without a user, Pattern 3 gives it a shared service identity. The source also flags a configuration trap: setting OAUTH_AUTHORIZATION_SERVER to issuer-lock an MCP scope to an external IdP causes Snowflake OAuth tokens to be rejected for MCP servers in that scope, with no fallback. Teams that need both patterns in one account should set the parameter per schema or database so each scope resolves to the right authorization server.
Limits and open questions
Testing covered Okta and Microsoft Entra ID. The source says Patterns 2 and 3 follow standard OAuth flows and can extend to other OAuth-protected MCP servers, but it tells readers to validate token claims, scopes and audience for their SaaS provider. Only Pattern 1 is Snowflake-specific. AgentCore Identity also supports an on-behalf-of grant (TOKEN_EXCHANGE) for per-user identity in unattended workloads without a consent prompt; the post says it focuses on the three configurations tested end-to-end and flags where OBO fits. An API-key credential provider supports Snowflake Programmatic Access Tokens, though the post focuses on OAuth. The source does not state pricing or regional availability.
What it means for building apps with AI
For builders, the useful takeaway is to decide early whether an AI action runs as the signed-in user or as a shared service account, because that choice affects audit trails and permissions. Draftship is an AI app builder where a person describes an app in plain language and Draftship writes, builds and hosts it. Apps get a built-in database, user sign-in and hosting; paid plans add private projects, a choice of AI model, source code access, custom domains and GitHub push. Draftship documents login and registration for apps at managing login and registration. This AWS post does not describe Draftship or claim support for these OAuth patterns. Draftship is not affiliated with AWS or Snowflake.
Primary sources
- Secure OAuth patterns for Snowflake Cortex AI through Amazon Bedrock AgentCore · AWS Machine Learning Blog, Nov 17, 2026
This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.