Opt out of Snowflake AI features¶
Most Snowflake AI features are initially available to all users in your Snowflake account. Access to most features is controlled by the CORTEX_USER database role, which is initially granted to the PUBLIC role. All users are granted the PUBLIC role, giving them access to Cortex features by default. (Access to Snowflake Copilot is controlled by the COPILOT_USER database role, also granted to PUBLIC by default.) Two features, Cortex Analyst and Document AI, are opt-in features that are not accessible to users by default.
Opt out of default features¶
To revoke access to all Snowflake AI features that are available to users by default, revoke the CORTEX_USER and COPILOT_USER database roles from the PUBLIC role. You can grant these roles to specific roles that you want to have access to the features, if any, then grant those roles to specific users as needed.
Note
If you have not granted access to any opt-in features, revoking the CORTEX_USER and COPILOT_USER roles from PUBLIC disables all Snowflake AI features for your account.
Use SQL like the following to revoke access to the CORTEX_USER and COPILOT_USER roles from the PUBLIC role, then grant them to specific roles and users.
-- Revoke access to most Snowflake AI features from all users in the account
REVOKE ROLE CORTEX_USER FROM ROLE PUBLIC;
REVOKE ROLE COPILOT_USER FROM ROLE PUBLIC;
-- Optionally, grant access to specific roles
GRANT ROLE CORTEX_USER TO ROLE my_cortex_role;
GRANT ROLE COPILOT_USER TO ROLE my_copilot_role;
-- Then grant those roles to specific users
GRANT ROLE my_cortex_role TO USER alice;
GRANT ROLE my_copilot_role TO USER bob;
Revoke access to opt-in features¶
Two Snowflake AI features, Document AI and Cortex Analyst, are opt-in. Access to these features is disabled by default, so if you have never granted access to them, your users cannot use them. If you have granted access to one or both of these features, howveer, you can revoke access as follows:
Cortex Analyst: Set the ENABLE_CORTEX_ANALYST account parameter to FALSE.
Document AI: Revoke the SNOWFLAKE.DOCUMENT_INTELLIGENCE_CREATOR database role from any roles you have granted it to.
Note
Pipelines that have already been created will continue to operate after revoking access to the feature. Suspend or drop the tasks associated with the pipelines to stop them from running.
Access control by feature¶
The following table has more detailed information on access control for individual Snowflake AI features:
Feature |
Opt in |
Main access control method |
Additional access control methods |
---|---|---|---|
CORTEX_USER database role |
USAGE on the search service that the agent queries, plus USAGE on the database, schema, and table used by the search service |
||
CORTEX_USER database role |
|||
✔ |
ENABLE_CORTEX_ANALYST account parameter |
||
CORTEX_USER database role |
CREATE MODEL on the schema where you create fine-tuned models |
||
CORTEX_USER database role |
Relies on access control for the underlying Cortex Search Service |
||
CORTEX_USER database role |
USAGE on the search service, database, schema, and table used by the search service |
||
✔ |
SNOWFLAKE.DOCUMENT_INTELLIGENCE_CREATOR database role |
Numerous object-level privileges for creating models and pipelines |
|
COPILOT_USER database role |
|||
CORTEX_USER database role |
Relies on access control for the underlying Cortex Agent or Search Service |
Opt out of specific models and AISQL functions¶
Because the cost of using different large language models and AISQL functions varies, you might limit access to specific LLMs or functions. Access to individual models and functions can be controlled by an account-level allowlist, role-based access control, or both. For more information, see Control model access.
Controlling access to ML features¶
Snowflake ML features are not AI features so access to them is not controlled by the CORTEX_USER role.
ML Functions¶
ML Functions employ classical machine learning for forecasting, anomaly detection, classification, and analysis of your data. Creation of models by ML Functions is opt-in and controlled by a function-specific privilege, such as CREATE SNOWFLAKE.ML.FORECAST, on schemas. Access to trained models is controlled by the USAGE privilege on the model object. If you have granted these privileges already, revoke them to prevent users from creating or using ML Functions models.
Owners of schemas can create ML Functions models in them, regardless of whether they have CREATE privileges for a specific type of model, so limit ownership and creation of schemas to trusted users. Grant specific privileges to create models within each schema only to users who need them, if any.
Snowflake ML¶
Snowflake ML lets you build, deploy, and manage custom machine learning models developed in Python, at Snowflake scale. Creation and use of Snowflake ML objects, including the model registry, the feature store, and models and their versions, is not controlled by the CORTEX_USER role.
Snowflake ML objects are schema-level objects, which means that users can create Snowflake ML objects in any schema on which they have OWNERSHIP or an appropriate CREATE privilege (for example, CREATE MODEL REGISTRY). Therefore, access to Snowflake ML is best controlled by limiting ownership and creation of schemas to trusted users. Grant specific privileges to create Snowflake ML objects within each schema only to users who need them, if any.