AWS tests three OAuth patterns for agents calling Snowflake Cortex via MCP
AWS ML Blog · rss · 2026-11-18
Background
Extending auth into the agentic layer typically means either overly broad service-account permissions or custom-built integrations. When an agent on Amazon Bedrock AgentCore calls the Snowflake-managed MCP server (exposing Cortex Search and Cortex Analyst) over MCP, the first question is how the agent authenticates.
Three patterns tested end-to-end
- Snowflake OAuth (3LO): Snowflake acts as its own authorization server; users authenticate directly via the Authorization Code grant with no external IdP; queries attribute to the real user and their role.
- Three-legged OAuth with external IdP: Users go through corporate SSO (Okta/Entra ID); Snowflake trusts IdP-issued JWTs via External OAuth; still per-user attribution.
- Two-legged OAuth with external IdP: A shared service user authenticates via clientcredentials — no user interaction, ideal for machine-to-machine workloads.
Key mechanics
- AgentCore Gateway aggregates MCP targets into a unified tool catalog; AgentCore Identity acts as credential broker, fetching, caching, and auto-refreshing tokens and binding them to users.
- An on-behalf-of (TOKENEXCHANGE) grant delivers per-user identity for unattended workloads.
- API-key credentials (Snowflake Programmatic Access Tokens) are also supported; OAuth's edge is per-user attribution and automatic refresh.
- Caveat: issuer-locking an MCP scope to an external IdP via OAUTHAUTHORIZATIONSERVER rejects Snowflake OAuth tokens with no fallback; scope the parameter per schema/database to run both patterns.
The reference architecture adds a Strands agent on AgentCore Runtime, Bedrock Guardrails for PII redaction, and Knowledge Bases for RAG. Patterns 2/3 follow standard OAuth flows and extend to other OAuth-protected MCP servers.
More from coding & agent
- ChatGPT's $200 tier gets ultrafast: a 3D drafting-table site built in 4 minutes — gabrielchua · 2026-11-18
- Harness-wrapping interfaces are gunning to be the new app store — where you build your own apps — Rasmic · 2026-11-18
- Cognition launches Devin Bots: one bot that leads a team of agents to ship work — round · 2026-11-18
- Shared applications, not shared chat: a new blueprint for collaborating with agents — thechrisperry · 2026-11-18
- Microsoft publishes playbook for enterprise deployment of governed AI agents on Windows via MXC — pavandavuluri · 2026-11-18
- A16z partner Anish Acharya curates a list of the sharpest thinkers on agent swarms — astrange · 2026-11-18