CertSafari
    Snowflake SnowPro Specialty: Gen AI (GES-C02)· Lessons

    Domain 3 · Lesson 8/15

    Cortex model access controls: the allowlist and model RBAC

    Set up model access controls.

    15 min read
    7.25% of exam
    2 sources
    Published 21 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • Place the model-level checks correctly after the function-level gates for Cortex AI functions
    • Set CORTEX_MODELS_ALLOWLIST to All, None or a model list and predict the account-wide effect
    • Grant and revoke per-model CORTEX-MODEL-ROLE application roles, including the SNOWFLAKE.PUBLIC bootstrap grant
    • Work out whether a given call succeeds when both the allowlist and model RBAC are in play
    • Migrate an account to RBAC-only model access by setting the allowlist to None

    Key concept

    Either-or model access check — When a Cortex call names a model, Snowflake allows it if the calling role holds USAGE on that model object through a model application role, or if the model is allowed by CORTEX_MODELS_ALLOWLIST. The call is refused only when neither check allows it.

    1.Where model access sits in the order of checks

    Two different questions decide whether a Cortex LLM call goes through. The first is whether the role may use an AI function at all. The second is which model that function may run. The two gates: USE AI FUNCTIONS privilege and the SNOWFLAKE.CORTEX_USER database role answer the first question, and they are checked first. A role needs the account privilege and a Cortex database role before any model is considered. After that, the account-level allowlist and model RBAC decide whether the specific model named in the call is allowed.

    The two layers do not stand in for each other. A model role tells Snowflake which model a role may use. It never makes a function callable. CORTEX_USER does the opposite: it opens the function and says nothing about which model the function may run. Granting SNOWFLAKE.CORTEX_USER to a role therefore cannot limit that role to one model.

    The defaults on a new account make this distinction practical. By default, the function-level privilege is granted to PUBLIC, and every user and role inherits PUBLIC. Revoking the default CORTEX_USER grant from PUBLIC is a separate step. Until someone takes it, every user passes the function gate, and model-level restrictions only narrow which models those users can reach. They do not narrow who can call the functions.

    Model checks apply to more than AI_COMPLETE. Functions that run a model internally, such as AI_CLASSIFY, AI_FILTER, AI_AGG, AI_EXTRACT and AI_REDACT, support both the allowlist and model RBAC. So do the Cortex REST API and Cortex Playground. When the model behind one of these functions is not allowed, the error message explains how to change the allowlist or the model RBAC grants.

    Checkpoint 1 of 9· Check yourself

    An ACCOUNTADMIN has revoked both USE AI FUNCTIONS and SNOWFLAKE.CORTEX_USER from PUBLIC. They then grant only the application role SNOWFLAKE."CORTEX-MODEL-ROLE-LLAMA3.1-70B" to the ANALYST role. A user with ANALYST calls AI_COMPLETE with llama3.1-70b. What happens?

    Sources1

    2.The CORTEX_MODELS_ALLOWLIST account parameter

    CORTEX_MODELS_ALLOWLIST is one parameter set on the account, and it applies to every role in it. You cannot set it per role, per user or per session. Run SHOW PARAMETERS LIKE 'CORTEX_MODELS_ALLOWLIST' IN ACCOUNT; as ACCOUNTADMIN to see the current value. It takes one of three forms.

    The three forms of CORTEX_MODELS_ALLOWLIST and what each allows
    ValueEffect on the accountRBAC equivalent
    'All'Every model is accessibleThe CORTEX-MODEL-ROLE-ALL bootstrap, or granting CORTEX-MODEL-ROLE-ALL to PUBLIC yourself
    'model-a,model-b'Only the listed models are accessiblePer-model roles granted to PUBLIC
    'None'The allowlist allows no models, so RBAC grants alone decideGrant model roles only to the roles that need them

    Because the allowlist covers the whole account, it can only control models, never roles. Adding llama3.1-70b to the list gives that model to every role in the account, not to one team. Use the allowlist when one policy fits everyone, for example a short list of models your company has approved. It does not work when two teams need different models.

    Checkpoint 2 of 9· Match them up

    Match each CORTEX_MODELS_ALLOWLIST value to its effect on the account

    Tap a term, then the definition that fits it.

    Checkpoint 3 of 9· Check yourself

    The data science team needs claude-sonnet-4-6. The finance team should only reach mistral-large2. Which approach meets both requirements?

    Checkpoint 4 of 9· Exam question

    A financial services company wants only its ACCOUNTADMIN and a small group of approved analyst roles to be able to invoke SNOWFLAKE.CORTEX.COMPLETE against any large language model, while every other role in the account should be blocked from calling any Cortex LLM function entirely. Which mechanism should the security team configure first to enforce this account-wide restriction?

    Sources12

    3.Model objects and CORTEX-MODEL-ROLE application roles

    Model RBAC treats each model as an object. Every available model exists in the SNOWFLAKE.MODELS schema, which Snowflake refreshes daily. Each model has a matching application role in the SNOWFLAKE application, named CORTEX-MODEL-ROLE-<MODEL>. Granting that role to an account role gives it USAGE on that one model object. SELECT and CORTEX_USER grants do not give model access. To list the roles, run SHOW APPLICATION ROLES LIKE 'CORTEX-MODEL%' IN APPLICATION SNOWFLAKE;

    Grant different models to different rolessql
    -- Grant specific models only to the roles that need them
    GRANT APPLICATION ROLE SNOWFLAKE."CORTEX-MODEL-ROLE-MODEL-A" TO ROLE analyst_role;
    GRANT APPLICATION ROLE SNOWFLAKE."CORTEX-MODEL-ROLE-MODEL-B" TO ROLE data_science_role;

    A call can name a model object in three ways: fully qualified ('SNOWFLAKE.MODELS."LLAMA3.1-70B"'), partially qualified after USE SCHEMA MODELS, or by a simple name like 'llama3.1-70b'. A simple name resolves automatically to SNOWFLAKE.MODELS. Qualified identifiers are quoted, which makes them case-sensitive. A lowercase name inside the quotes will not match the object.

    On a new account, all-models access does not come from anything you granted. Snowflake grants CORTEX-MODEL-ROLE-ALL to SNOWFLAKE.PUBLIC. That is an application role on the SNOWFLAKE database, and every account role inherits it. Because it is a different object from the account-level PUBLIC role, SHOW GRANTS TO ROLE PUBLIC might not show it. Check with SHOW GRANTS TO APPLICATION ROLE SNOWFLAKE.PUBLIC. A plain REVOKE APPLICATION ROLE ... FROM ROLE PUBLIC only removes a grant you made yourself. It does not remove the bootstrap grant, and the revoke is not kept across Snowflake upgrades.

    Remove the bootstrap all-models grant (run as ACCOUNTADMIN)sql
    CALL SNOWFLAKE.LOCAL.REVOKE_FROM_PUBLIC_APPLICATION_ROLE(
      'APP_ROLE',
      'CORTEX-MODEL-ROLE-ALL'
    );

    SNOWFLAKE.LOCAL.GRANT_TO_PUBLIC_APPLICATION_ROLE, called with the same two arguments, puts the bootstrap grant back.

    Checkpoint 5 of 9· Fill the gap

    An administrator wants analyst_role to be able to use only model A. Which keyword completes this grant?

    -- Grant specific models only to the roles that need them
    GRANT  ?  ROLE SNOWFLAKE."CORTEX-MODEL-ROLE-MODEL-A" TO ROLE analyst_role;

    Checkpoint 6 of 9· Exam question

    An account has set CORTEX_MODELS_ALLOWLIST to 'None' and has revoked the default CORTEX-MODEL-ROLE-ALL bootstrap grant from PUBLIC, so no role can call a Cortex model unless it is explicitly granted access. A platform engineer now needs to let the ML_ENGINEERING role call llama3.1-70b specifically, without granting access to any other model in the account. Which approach achieves this fine-grained, per-model access?

    Sources1

    4.How the allowlist and RBAC combine on each call

    For each call that names a model, Cortex first looks for a matching model object in SNOWFLAKE.MODELS. If the calling role has USAGE on that object through a model application role, the call is allowed and the allowlist does not matter. If not, Cortex falls back to the allowlist: the call is allowed when the name is on the list or the list is 'All'. The call fails only when both checks fail. Neither layer can take away access the other one gives.

    Setup: the allowlist allows mistral-large2, and PUBLIC holds the Llama 3.1 70B model rolesql
    USE SECONDARY ROLES NONE;
    USE ROLE ACCOUNTADMIN;
    ALTER ACCOUNT SET CORTEX_MODELS_ALLOWLIST = 'MISTRAL-LARGE2';
    CALL SNOWFLAKE.MODELS.CORTEX_BASE_MODELS_REFRESH();
    GRANT APPLICATION ROLE SNOWFLAKE."CORTEX-MODEL-ROLE-LLAMA3.1-70B" TO ROLE PUBLIC;

    Under PUBLIC, AI_COMPLETE('MISTRAL-LARGE2', 'Hello') succeeds because of the allowlist. AI_COMPLETE('SNOWFLAKE.MODELS."LLAMA3.1-70B"', 'Hello') succeeds because of the model role, even though Llama is not on the list. AI_COMPLETE('claude-sonnet-4-6', 'Hello') fails because neither layer allows it.

    The OR logic has one consequence that is easy to miss. While the allowlist is 'All', careful per-role model grants restrict nothing, because the fallback allows every model to every role. Take a contractor role limited to a short approved list and an analytics team that also needs one extra, vetted model. The setup that works is the allowlist set to 'None', the approved models granted to the contractor role, and the approved models plus the extra one granted to the analytics role.

    A few things make access look different from what the grants say:

    • Secondary roles can hide the real result. If ACCOUNTADMIN is a secondary role, every model may look accessible, so run USE SECONDARY ROLES NONE before testing.
    • Having access to a model does not guarantee you can use it. Cross-region, legacy or end-of-life, and other availability limits produce errors that look like access errors. SHOW CORTEX BASE MODELS lists what is available and each model's lifecycle status.
    • Native app code uses the app's own role hierarchy, not the consumer account's PUBLIC role. A grant to PUBLIC does not reach it. Grant the model role to the application, or to the role used inside the app.

    Checkpoint 7 of 9· Match them up

    In this setup, CORTEX_MODELS_ALLOWLIST = 'MISTRAL-LARGE2', and PUBLIC holds the CORTEX-MODEL-ROLE-LLAMA3.1-70B application role. Secondary roles are off. Match each call run under PUBLIC to its outcome.

    Tap a term, then the definition that fits it.

    Checkpoint 8 of 9· Exam question

    A role has been granted the SNOWFLAKE."CORTEX-MODEL-ROLE-MISTRAL-LARGE2" application role, but the account's CORTEX_MODELS_ALLOWLIST parameter is set to a list that does not include mistral-large2. When a user under this role calls a Cortex function targeting mistral-large2, what happens?

    Sources1

    5.Moving to RBAC-only access with the allowlist set to None

    The safe migration copies what the allowlist does today before it tightens anything:

    1. As ACCOUNTADMIN, read the current allowlist value.
    2. Reproduce it with grants to PUBLIC: per-model roles for a list, or CORTEX-MODEL-ROLE-ALL (or the bootstrap) for 'All'.
    3. Switch to a non-ACCOUNTADMIN role that holds the model role and run a test call. Test every workload, including stored procedures and native apps.
    4. Set the allowlist to 'None'.
    5. Remove the broad access with the bootstrap procedure, a REVOKE of any grant you made yourself, or both. Then grant specific model roles to the roles that need them.
    Turn off the allowlist fallback so only RBAC grants decide model accesssql
    ALTER ACCOUNT SET CORTEX_MODELS_ALLOWLIST = 'None';

    'None' is what makes a model restriction apply to the whole account. With the fallback off, a role reaches only the models it holds application roles for. If you also remove the bootstrap grant, a role with no model grants reaches no model at all. Restricted caller's rights stored procedures are covered by grants to PUBLIC, because model RBAC does not evaluate the caller's grants in that context.

    Checkpoint 9 of 9· Put it in order

    Your account currently relies on CORTEX_MODELS_ALLOWLIST. Put the steps for safely moving to RBAC-only model access in the right order.

    1. 1.Switch to a non-ACCOUNTADMIN role that holds the model role, then test every workload, including stored procedures and native apps
    2. 2.As ACCOUNTADMIN, run SHOW PARAMETERS LIKE 'CORTEX_MODELS_ALLOWLIST' IN ACCOUNT and note the current value
    3. 3.Run ALTER ACCOUNT SET CORTEX_MODELS_ALLOWLIST = 'None' to turn off the allowlist fallback
    4. 4.Grant model application roles to PUBLIC so they give the same access as the current allowlist value
    5. 5.Remove broad all-models access (bootstrap procedure and/or REVOKE), then grant specific model roles only to the roles that need them

    Sources1

    Sources

    (2)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “Model access controls only govern the use of a model and not the use of a feature itself.”
      ↩︎ Where model access sits in the order of checks
      “By default, the USE AI FUNCTIONS privilege is granted to the PUBLIC role.”
      ↩︎ Where model access sits in the order of checks
      “If the model powering this function is not allowed”
      ↩︎ Where model access sits in the order of checks
      “Because CORTEX_MODELS_ALLOWLIST applies account-wide, the direct RBAC equivalent is granting model application roles to the PUBLIC role.”
      ↩︎ The CORTEX_MODELS_ALLOWLIST account parameter
      “Because CORTEX_MODELS_ALLOWLIST is planned for deprecation, Snowflake recommends migrating to model RBAC.”
      ↩︎ The CORTEX_MODELS_ALLOWLIST account parameter
      “The SNOWFLAKE.MODELS schema is refreshed daily and already contains objects for all available models.”
      ↩︎ Model objects and CORTEX-MODEL-ROLE application roles
      “Qualified model object identifiers are quoted and therefore case-sensitive.”
      ↩︎ Model objects and CORTEX-MODEL-ROLE application roles
      “SNOWFLAKE.PUBLIC is an application role on the SNOWFLAKE database. It is not the same object as the account-level PUBLIC role.”
      ↩︎ Model objects and CORTEX-MODEL-ROLE application roles
      “Cortex first attempts to locate a matching model object in SNOWFLAKE.MODELS.”
      ↩︎ How the allowlist and RBAC combine on each call
      “Access is denied only if both checks fail.”
      ↩︎ How the allowlist and RBAC combine on each call
      “Secondary roles can obscure permissions.”
      ↩︎ How the allowlist and RBAC combine on each call
      “It may still be subject to cross-region, legacy or end-of-life, or other availability constraints.”
      ↩︎ How the allowlist and RBAC combine on each call
      “Setting the allowlist to 'None' disables the allowlist fallback entirely, so only RBAC grants determine access.”
      ↩︎ Moving to RBAC-only access with the allowlist set to None
      “Test all your workloads, including stored procedures and native apps, before you disable the allowlist.”
      ↩︎ Moving to RBAC-only access with the allowlist set to None
      “Access is denied only if both checks fail.”
      ↩︎ Key concept
      “The calling role has USAGE on the model object (via an application role granted through RBAC)”
      ↩︎ Exam trap 1
      “Always use SNOWFLAKE.LOCAL.REVOKE_FROM_PUBLIC_APPLICATION_ROLE to revoke the bootstrap grant.”
      ↩︎ Exam trap 2
      “Model access controls only govern the use of a model and not the use of a feature itself.”
      ↩︎ Exam trap 3
      “'model-a,model-b': only specific models are accessible. Grant per-model roles to replace this.”
      ↩︎ Checkpoint
      “Always use SNOWFLAKE.LOCAL.REVOKE_FROM_PUBLIC_APPLICATION_ROLE to revoke the bootstrap grant.”
      ↩︎ Prediction
      “Start by replicating the allowlist behavior exactly, then tighten access to specific roles as needed.”
      ↩︎ Checkpoint
    2. 2.
      “you can limit access to specific LLMs via an account-level allowlist, by role-based access control, or by a combination of both.”
      ↩︎ The CORTEX_MODELS_ALLOWLIST account parameter

    Continue to part 2 of 2

    Cortex data safety: cross-region inference, guardrails, AI_REDACT and REST API auth

    Spotted a mistake, or was something unclear? Tell us.