Use feature policies to limit the objects an app can create¶
This topic describes how to use feature policies to limit the objects that a Snowflake Native App can create. For information about creating and managing feature policies — including privileges required, replication, and account-level management — see Feature policies.
About feature policies for native apps¶
If an app is configured to use automated granting of privileges, the app can request to use the following privileges:
- EXECUTE TASK
- EXECUTE MANAGED TASK
- CREATE WAREHOUSE
- CREATE COMPUTE POOL
- BIND SERVICE ENDPOINT
- CREATE DATABASE
- CREATE EXTERNAL ACCESS INTEGRATION
If the app is configured to use these privileges, a consumer cannot directly revoke these privileges after the app is installed. However, consumer administrators can use feature policies to limit the objects an app can create in the consumer account.
For example, if a consumer does not want an app to create warehouses or compute pools, a consumer account administrator can create a feature policy that prohibits a particular app or all apps from creating warehouses or compute pools.
Feature policies also let consumers block many other object types, including Cortex Agents and MCP servers, which apps can create without requesting account-level privileges. For more information about app-created agents and MCP servers, see Use Cortex Agents and MCP servers in an app. For the full list of blockable object types, see Blockable object types.
Warning
Blocking object types that an app requires for installation or upgrade may prevent the app from functioning properly.
Note
External access integrations can’t be blocked using feature policies. Instead, consumers can choose to approve or decline the endpoints for an app using app specifications.
Workflow¶
The general workflow for using feature policies to limit the objects an app can create is:
-
View the listing for the app to determine the privileges the app is requesting.
-
Create a feature policy to block the objects you want to restrict.
For more information, see Feature policies.
-
Apply the feature policy to the account or to a specific app.
For more information, see Assign a feature policy at the account level and Apply a feature policy to a specific app.
Assign a feature policy at the account level¶
Consumers can apply a feature policy to all apps in the account by using the ALTER ACCOUNT command, as shown in the following example:
This command applies the block_create_db_policy policy for any app that is installed
in the account. After applying this policy, apps can no longer create databases.
To unapply the policy from all apps:
Apply a feature policy to a specific app¶
To apply a feature policy when creating an app manually, use the WITH FEATURE POLICY clause of the
CREATE APPLICATION command,
as shown in the following example:
To apply a feature policy to an existing app, use the ALTER APPLICATION command, as shown in the following example:
To unapply a feature policy from a specific app:
View feature policies on an app¶
To view the feature policies applied to a specific app: