Join our Newsletter — 33% off our NHI Course
Home› Guides› Snowflake Cortex AI Security Guide: Roles, Models, Agents…
Guide AI Platforms

Snowflake Cortex AI Security Guide: Roles, Models, Agents and Monitoring

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 8 November 2026 13 min read
On this page

Snowflake Cortex brings LLM functions, search services and agents to the data warehouse itself, and several of its access defaults are open to every role in the account until an administrator closes them. Cortex AI functions are callable through the PUBLIC role by default, Cortex Search services run with owner's rights, agents can call remote MCP servers over the public internet, and prompts may be processed in another region. This guide covers the Cortex-specific controls: function and model access, cross-region inference, agent and tool privileges, MCP connectors, guardrails and observability. It builds on the Snowflake Security Guide, which covers authentication, network policies and RBAC for the platform as a whole, and does not repeat it. It is for Snowflake administrators, data platform security engineers and IAM owners. Details are from Snowflake documentation checked 27 October 2026; Cortex changes often, so confirm settings against the current pages.

This is an independent guide from NHI Mgmt Group, based on Snowflake's public documentation as of November 2026. It is not sponsored or reviewed by Snowflake. Product features change, so confirm settings against Snowflake's current documentation.

Key takeaways

  • Close the PUBLIC defaults first. The USE AI FUNCTIONS account privilege and the SNOWFLAKE.CORTEX_USER database role are both granted to PUBLIC by default; revoke them and grant access through named roles.
  • Govern models with RBAC. Model access is controlled with CORTEX-MODEL-ROLE-<model> application roles; the legacy CORTEX_MODELS_ALLOWLIST parameter is being deprecated during 2026.
  • Know where prompts are processed. CORTEX_ENABLED_CROSS_REGION decides whether prompts and responses may travel to other regions or clouds; organisations created after 9 March 2026 default to ANY_REGION.
  • Agent access is the sum of tool access. USAGE on an agent is not enough on its own, but by default a run continues silently with whatever tools the caller can use, and Cortex Search answers with the service owner's rights.
  • Observability content is sensitive. Full prompts, tool inputs and outputs in SNOWFLAKE.LOCAL.AI_OBSERVABILITY_EVENTS are visible only with READ UNREDACTED AI OBSERVABILITY EVENTS TABLE; keep that privilege rare.

How identity and access work in Snowflake Cortex AI

Cortex uses ordinary Snowflake RBAC: a user's active role must hold the Cortex privileges and database roles, plus privileges on every object a function, search service or agent touches. The Cortex layer adds four access gates.

GateObject or settingDefaultRecommended setting
Use of AI functionsUSE AI FUNCTIONS account privilege, or per-function USE AI FUNCTION <name>Granted to PUBLICRevoke from PUBLIC; grant per function to named roles (blanket and per-function grants work as an OR)
Cortex feature accessSNOWFLAKE.CORTEX_USER (all covered AI features), AI_FUNCTIONS_USER (scalar functions only), CORTEX_EMBED_USER (embeddings, search with managed embeddings), CORTEX_AGENT_USER (agents only)CORTEX_USER granted to PUBLIC; others notRevoke CORTEX_USER from PUBLIC; grant the narrowest database role to custom roles
Model accessCORTEX-MODEL-ROLE-<model> and CORTEX-MODEL-ROLE-ALL application roles in SNOWFLAKE.MODELSAccounts with allowlist 'All' received CORTEX-MODEL-ROLE-ALL on the SNOWFLAKE.PUBLIC application roleRemove the bootstrap grant; grant approved models per role
Processing locationCORTEX_ENABLED_CROSS_REGIONInherited; ANY_REGION for organisations created after 9 March 2026Set explicitly to the geography your data policy allows, or DISABLED
  • Revoking PUBLIC: Snowflake documents REVOKE USE AI FUNCTIONS ON ACCOUNT FROM ROLE PUBLIC; and REVOKE DATABASE ROLE SNOWFLAKE.CORTEX_USER FROM ROLE PUBLIC;. Its documentation also shows REVOKE IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE FROM ROLE PUBLIC; and warns to run it only if you intend to restrict all of that access, because it affects more than Cortex.
  • The bootstrap model grant: a plain REVOKE does not remove CORTEX-MODEL-ROLE-ALL from the SNOWFLAKE.PUBLIC application role; Snowflake provides CALL SNOWFLAKE.LOCAL.REVOKE_FROM_PUBLIC_APPLICATION_ROLE('APP_ROLE', 'CORTEX-MODEL-ROLE-ALL');. Access is granted if either RBAC or the allowlist permits a model, and ACCOUNTADMIN always has access.
  • Allowlist deprecation: Snowflake states that from August 2026 CORTEX_MODELS_ALLOWLIST can only be changed to 'None' and that the parameter will be removed later in 2026. Setting it to 'None' leaves RBAC as the single model gate.
  • Data handling: Snowflake states that the LLMs it provides run inside the Snowflake service perimeter, classifies function inputs as Usage Data and outputs as Customer Data, and for cross-region inference sends prompts and responses transiently to the processing region without persisting them there. Within one cloud provider traffic stays on its backbone; across providers it crosses the public internet with mutual TLS.

Admin roles and privileged access

Privilege or settingWho holds itWhy it is privileged
CORTEX_ENABLED_CROSS_REGION, CORTEX_MODELS_ALLOWLIST, AI_SETTINGS (guardrails)ACCOUNTADMIN only (ORGADMIN cannot set cross-region)Decide data residency, available models and prompt injection protection for the whole account
CREATE AGENT on schemaGranted per schemaCreates objects that combine data access, tools and external calls
MODIFY and OWNERSHIP on agentsCreating role owns by defaultChange instructions, tools and models of a live agent, or drop it
CREATE CORTEX SEARCH SERVICE on schemaGranted per schema; creator needs SELECT on sourcesThe service answers queries with the owner's rights over that data
CREATE EXTERNAL MCP SERVER and API integrations (API_PROVIDER = external_mcp)Account admins by defaultOpen a path from agents to external services and hold OAuth secrets
READ UNREDACTED AI OBSERVABILITY EVENTS TABLEGranted at account levelReveals full conversations, tool inputs and outputs across agents
  • Keep ACCOUNTADMIN for settings, not for agents: because ACCOUNTADMIN always has model access and owns account AI settings, agents and search services should be owned by dedicated functional roles, never by ACCOUNTADMIN.
  • Separate builders from publishers: developers can hold CREATE AGENT in a development schema; production agents are created by a deployment role, and business users receive only USAGE.
  • Owner's rights are a design decision: Snowflake states that Cortex Search services perform searches with owner's rights, and that custom tool procedures run with owner's or caller's rights as defined on the procedure. An owner role with broad SELECT makes every user with USAGE on the service a reader of that data through search. Build each search service from a view that contains only what all its users may see. See the Permission-Aware RAG Guide.

Integrations, API tokens and service accounts

Agents and their tools

  • Calling an agent: the caller needs SNOWFLAKE.CORTEX_USER or SNOWFLAKE.CORTEX_AGENT_USER, USAGE on the agent, its database and schema, and USAGE on each tool's warehouse.
  • Tool privileges: Cortex Search needs USAGE on the service; Cortex Analyst semantic views need access to the referenced database, schema and tables; custom tools need USAGE on the function or procedure; referenced agents need USAGE or the reference is skipped silently.
  • Inaccessible tools: by default (accept) a missing tool privilege produces a warning and the run continues with the tools the caller can use. Set orchestration.tool_not_accessible to reject for agents where a partial answer is misleading, so access gaps surface as failures.
  • External reach: web search must be enabled at account level and, like MCP connectors, sends requests over the public internet. The code execution tool runs Python in an isolated sandbox. Treat each as a separate approval decision.
  • Secure agents: mark agents secure where the specification (instructions, tool configuration) should be hidden from non-owner roles.

REST API authentication

Requests to the Cortex Agents API must carry a programmatic access token (PAT), a key pair JWT or an OAuth token, and the role comes from the X-Snowflake-Role header or the user's default role. Applications that front agents for many users should use OAuth so each call runs as the end user's role, rather than a service user's PAT that gives every caller the same access. Where a service user is unavoidable, follow the Service Accounts in Snowflake Guide: TYPE = SERVICE, key pair or PAT bound to a network policy, a dedicated least-privilege default role, and always set X-Snowflake-Role explicitly.

MCP connectors

  • Objects: a CREATE EXTERNAL MCP SERVER object points at the remote endpoint and references an API integration with API_PROVIDER = external_mcp that holds the OAuth configuration and secrets; API_ALLOWED_PREFIXES limits the endpoints it may reach. Agents attach servers with ALTER AGENT ... ADD MCP_SERVER.
  • OAuth only: integrations use TYPE = OAUTH2 or TYPE = OAUTH_DYNAMIC_CLIENT. OAUTH_REFRESH_TOKEN_VALIDITY defaults to 0, meaning the refresh token never expires; set an explicit value (minimum 3,600 seconds).
  • Trust: Snowflake states it does not provide, maintain or verify external MCP servers, and that access to a server does not grant access to its tools, which must be granted separately. Only the MCP tools capability is supported.
  • Kill switch: disabling an integration immediately invalidates user tokens and calls the provider's revocation endpoint; dropping it deletes the stored OAuth configuration and secrets. Use disable for incidents. See the MCP Security Guide.

Logging and detection

SourceWhat it recordsUse it for
SNOWFLAKE.LOCAL.AI_OBSERVABILITY_EVENTS (via GET_AI_OBSERVABILITY_EVENTS)Threads, traces and spans for planning, each tool call (Search, Analyst, web search, code execution, MCP, custom tools), SQL execution and responses; user, role and warehouse in RESOURCE_ATTRIBUTES; agent version and aliasReconstruct what an agent did for whom; requires MONITOR or OWNERSHIP on the agent plus CORTEX_USER; content redacted without the unredacted privilege
SNOWFLAKE.ACCOUNT_USAGE.CORTEX_AI_FUNCTIONS_USAGE_HISTORYFUNCTION_NAME, MODEL_NAME, CREDITS, QUERY_ID, USER_ID, ROLE_NAMES, QUERY_TAG, WAREHOUSE_ID, hourly windows, up to five minutes latencyWho used which model, spend per user and role, runaway queries
SNOWFLAKE.ACCOUNT_USAGE.CORTEX_AI_GUARDRAILS_USAGE_HISTORYGuardrail scans, flagged requests (GUARDRAILS_SIGNAL = TRUE), credits and tokensPrompt injection attempts against agents
ACCOUNT_USAGE.QUERY_HISTORY, LOGIN_HISTORY, ACCESS_HISTORYPlatform activity as in any Snowflake accountCorrelate agent SQL and service users with source data reads
  • Detections worth building: grants of CORTEX_USER, model roles or the unredacted observability privilege; changes to CORTEX_ENABLED_CROSS_REGION or AI_SETTINGS; new external MCP servers or API integrations; a user whose Cortex credits or distinct models jump above baseline (Snowflake documents alerts and tasks that revoke access above a per-user monthly limit and cancel runaway queries with SYSTEM$CANCEL_QUERY); repeated guardrail flags from one user or agent.
  • Metrics: roles with Cortex access versus approved list; agents with tool_not_accessible = reject where required; search services built on restricted views; MCP integrations with refresh token validity set; holders of the unredacted observability privilege; guardrail flag rate.

For spend abuse patterns, see the Denial-of-Wallet and AI Agent Cost Runaway Guide.

Hardening baseline

  1. Inventory current use: query CORTEX_AI_FUNCTIONS_USAGE_HISTORY for 30 days to see which users, roles and models already depend on Cortex before you change grants.
  2. Create the target roles: custom roles holding AI_FUNCTIONS_USER, CORTEX_AGENT_USER or CORTEX_EMBED_USER as needed, per-function USE AI FUNCTION grants and approved model roles. Grant them to the users found in step 1.
  3. Revoke the PUBLIC defaults: revoke USE AI FUNCTIONS and CORTEX_USER from PUBLIC, remove the bootstrap CORTEX-MODEL-ROLE-ALL grant, and set CORTEX_MODELS_ALLOWLIST = 'None'. Do this in a test account first; rollback is re-granting to PUBLIC for a fixed window while missing grants are fixed.
  4. Set processing location: choose a CORTEX_ENABLED_CROSS_REGION value matching your residency policy. Note that Cortex AI Guardrails require cross-region inference to be enabled with one of the supported values, so a DISABLED account cannot use them.
  5. Enable guardrails for Cortex Agents through AI_SETTINGS (advanced_prompt_injection enabled), on Enterprise Edition or higher commercial accounts, and review flagged requests periodically for false positives.
  6. Design agents for least privilege: Cortex Search services over restricted views with dedicated owner roles; custom tool procedures with caller's rights unless owner's rights are justified; tool_not_accessible = reject on sensitive agents; secure agents in production.
  7. Control external reach: enable web search only if needed; restrict MCP integrations with API_ALLOWED_PREFIXES, set refresh token validity, and require review before an agent gains a new server.
  8. Protect observability: grant MONITOR per agent to support roles and keep READ UNREDACTED AI OBSERVABILITY EVENTS TABLE to a small investigation role.
  9. Cap spend: build the documented monthly credit alert and per-user limit task.

Common misconfigurations

  • PUBLIC left in place: every role, including service users built for unrelated pipelines, can call LLM functions on any data it can read.
  • Allowlist treated as the model control: the bootstrap application role grant still gives every role every model even after the allowlist is narrowed, because either path grants access.
  • Search service owned by a broad role: a search service built from a whole table by an engineering role answers questions for every user with USAGE, regardless of their own table access.
  • Silent partial agents: the default accept behaviour hides privilege gaps, so users get confident answers built from a subset of tools.
  • Non-expiring MCP refresh tokens: leaving OAUTH_REFRESH_TOKEN_VALIDITY at 0 creates long-lived third-party access stored in the account.
  • Shared PAT behind an app: an internal chat application calls the Agents API with one service user's PAT and default role, so every employee inherits that role. Give each app its own service user with a narrow role, a network policy and key-pair or OAuth authentication.
  • Cross-region by inheritance: nobody set CORTEX_ENABLED_CROSS_REGION, so prompts containing regulated data may be processed outside the expected geography.

Framework mapping

AreaNIST SP 800-53 Rev. 5NIST CSF 2.0
PUBLIC revocation, database and model rolesAC-6 Least Privilege, AC-3 Access EnforcementPR.AA-05
Service users and API authenticationIA-5 Authenticator Management, IA-9 Service Identification and AuthenticationPR.AA-01
Cross-region processing, MCP egressAC-4 Information Flow Enforcement, SC-7 Boundary ProtectionPR.AA-05
Observability and usage historyAU-2 Event Logging, AU-12 Audit Record Generation, SI-4 System MonitoringDE.CM-03

Practitioner checklist

  • Revoke USE AI FUNCTIONS and SNOWFLAKE.CORTEX_USER from PUBLIC after granting named roles.
  • Remove the bootstrap CORTEX-MODEL-ROLE-ALL grant and govern models with model application roles.
  • Set CORTEX_ENABLED_CROSS_REGION explicitly to your residency policy.
  • Build Cortex Search services over restricted views with dedicated owner roles.
  • Set orchestration.tool_not_accessible to reject on sensitive agents and mark production agents secure.
  • Use OAuth for applications that call the Agents API for end users; never a shared PAT.
  • Restrict MCP integrations with allowed prefixes and finite refresh token validity.
  • Enable Cortex AI Guardrails for agents where the account qualifies.
  • Limit unredacted observability access and alert on its grant.
  • Monitor Cortex usage history for per-user spend and model anomalies.

Standards and references

Related NHI Mgmt Group resources: Snowflake Security Guide · Service Accounts in Snowflake Guide · Permission-Aware RAG Guide · MCP Security Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 8 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick the PDF box to continue.