What you will be able to do
- Declare global privileges such as EXECUTE TASK, EXECUTE MANAGED TASK, CREATE WAREHOUSE, MANAGE WAREHOUSES and CREATE DATABASE in manifest.yml with consumer-facing descriptions
- Explain how a consumer reviews and grants requested privileges, including IMPORTED PRIVILEGES, and how the app checks what it holds
- Design references as a least-privilege, consumer-revocable alternative to broad global privileges
- Build an application role hierarchy in the setup script and expose it to consumer account roles
- Choose between app specifications and feature policies as consumer-side governance controls
- Configure a privilege specification in the manifest file with its required name and description fields, disclosing only the minimum privileges the app needs
- Establish the privilege-granting workflow in order, from the provider determining and declaring privileges to the consumer reviewing and granting them
Key concept
Closed by default, opened by explicit grants — An installed Native App starts with no access to consumer data or account-level operations, and the consumer starts with no visibility into the app's internals. Every widening of access, in either direction, comes from a deliberate grant by whoever owns the thing being opened.
1.Configuring privilege specifications in the manifest file
An app can do anything it likes inside its own application object, but it cannot touch the rest of the consumer account until someone allows it. Once it needs to create a warehouse, run a task or create a database outside itself, the consumer has to grant a global privilege to the application. The provider's part is to declare those needs up front in the privileges block of manifest.yml.
Establishing the privilege-granting workflow takes two parties working in a fixed order:
- The provider determines which privileges the app needs, for example
CREATE DATABASEwhen the app creates a database in the consumer account. - The provider adds each of those privileges to the manifest file.
- After installing the app, the consumer reviews the privileges it requests.
- The consumer grants the privileges they accept to the application.
The Native App Framework limits which global privileges a provider can request. The list is BIND SERVICE ENDPOINT, CREATE COMPUTE POOL, CREATE DATABASE, CREATE WAREHOUSE, EXECUTE ALERT, EXECUTE TASK, EXECUTE MANAGED TASK, IMPORTED PRIVILEGES ON SNOWFLAKE DB, MANAGE WAREHOUSES and READ SESSION. An app that schedules work needs EXECUTE TASK or EXECUTE MANAGED TASK. One that provisions its own compute needs CREATE WAREHOUSE, or MANAGE WAREHOUSES to manage warehouses. One that lays down its own databases outside the app needs CREATE DATABASE.
A privilege specification is a single entry in the manifest file's privileges block: the name of a privilege the app requests in the consumer account, and the reason it needs it. The block is optional, and an app that stays inside its own application object can leave it out. Once the block is present, though, every entry must have both its name and its description. Configuring the block is also how the requests travel with the app, because privileges specified in the manifest file are included in the installed app for the consumer to see.
privileges:
- EXECUTE TASK:
description: "Privilege to run tasks within the consumer account"Each entry needs a description, and the consumer reads it. It appears in Snowsight and in SHOW PRIVILEGES output, so it is the provider's one chance to explain the request. Write the reason, and say whether the app breaks without the privilege or just loses a feature. A consumer who sees a bare CREATE DATABASE with no explanation has every reason to decline it.
Security review holds the manifest file to the same standard. An app shared through a listing must disclose in its manifest every privilege it requires on every object, and it should ask only for the minimum set it needs to function. A privilege the code uses but the manifest leaves out is a defect, not a shortcut. If the app prompts the consumer to grant something it never communicated in advance, Snowflake can reject the app at review.
Reading Snowflake's own metadata works a little differently. IMPORTED PRIVILEGES ON SNOWFLAKE DB lets an app query the shared SNOWFLAKE database, and that exposes the consumer's usage and cost information, so providers should make sure consumers understand what they are granting. If the app only needs a specific role in that database, such as CORTEX_USER for Cortex AI functions, it can ask for just that role in the snowflake_database block. Consumers can review, grant and revoke that role like any other request.
Checkpoint 1 of 9· Fill the gap
A provider's app has to schedule work in the consumer account, so it requests EXECUTE TASK. Which manifest.yml block does this request go in?
? :
- EXECUTE TASK:
description: "Privilege to run tasks within the consumer account"Global privileges such as EXECUTE TASK, CREATE WAREHOUSE or CREATE DATABASE are requested in the manifest's privileges block. Each entry has a description that the consumer reads before granting it. The snowflake_database block is only for asking for specific roles in the SNOWFLAKE database, such as CORTEX_USER.
Source: docs.snowflake.comCheckpoint 2 of 9· Put it in order
Put the steps of the global privilege-granting workflow in order, from the provider's first decision to the moment the app can use the privilege.
- 1.Provider adds the required privileges to the manifest file
- 2.Consumer installs the app and reviews the privileges it requests
- 3.Provider determines the privileges the app requires, such as CREATE DATABASE
- 4.Consumer grants the accepted global privileges to the application
The provider's two steps happen while developing the app, so the requests are already part of the installed app. Only after installation can the consumer review those requests and then grant them.
“To configure a Snowflake Native App to request global privileges providers use the following workflow:”Source: docs.snowflake.com
2.How consumers grant privileges, and how the app checks them
The manifest only lists what the app wants. Unless automated granting is in play, nothing is granted at install time. The consumer first reviews the requests, either in Snowsight or by running SHOW PRIVILEGES IN APPLICATION hello_snowflake_app;, reading each description as they go. They then grant the ones they accept, using an ordinary GRANT statement that targets the application object.
GRANT CREATE DATABASE ON ACCOUNT TO APPLICATION hello_snowflake_app;Database imports follow the same pattern. To let the app read a shared database, the consumer runs GRANT IMPORTED PRIVILEGES ON DATABASE MYDATABASE TO APPLICATION hello_snowflake_app;.
Which manifest version the app uses decides how much of this happens automatically. Under version 1 the consumer grants each privilege themselves, and privileges in this model can be reviewed, granted and revoked. Version 2 adds automated granting of privileges. The app receives the privileges it declares (EXECUTE TASK, EXECUTE MANAGED TASK, CREATE WAREHOUSE, CREATE COMPUTE POOL, BIND SERVICE ENDPOINT, CREATE DATABASE, CREATE EXTERNAL ACCESS INTEGRATION) without a manual grant, but the consumer can't revoke them directly afterwards. Their lever then becomes a feature policy, covered below. Either way, the consumer can apply a feature policy to an app at any time, even after granting everything it asked for.
References follow their own timing. A reference marked required_at_setup: true must be bound when the app is installed, so installation can't finish until the consumer picks the object.
The app can't assume a grant happened, so it should check before it acts. SYSTEM$HOLD_PRIVILEGE_ON_ACCOUNT('<privilege_name>') returns TRUE or FALSE, and only an app can call it. A setup script that creates a compute pool without first checking SYSTEM$HOLD_PRIVILEGE_ON_ACCOUNT('CREATE COMPUTE POOL') will fail on every install where the consumer hasn't granted it yet. The check also accepts 'IMPORTED PRIVILEGES ON SNOWFLAKE DB'.
| Step | Actor | Mechanism |
|---|---|---|
| Declare need and reason | Provider | privileges block in manifest.yml, each with a description |
| Review requests | Consumer | Snowsight, or SHOW PRIVILEGES IN APPLICATION |
| Grant | Consumer | GRANT ... ON ACCOUNT TO APPLICATION, or automated granting under manifest_version 2 |
| Verify before use | App | SYSTEM$HOLD_PRIVILEGE_ON_ACCOUNT |
| Constrain later | Consumer | Feature policy on the app or the whole account |
Checkpoint 3 of 9· Check yourself
Under manifest_version 1, an app's manifest lists CREATE DATABASE with a clear description. Right after install, its setup script tries to create a database outside the app. What should the provider expect, and design for?
Under manifest version 1, the manifest only records a request. The consumer reviews it and then grants it to the application object, so until that happens the app has to check that it holds the privilege before using it. Automatic grants at install only happen with automated granting under manifest version 2.
“After determining the privileges required by a Snowflake Native App, the consumer must then grant these privileges to the app.”Source: docs.snowflake.com
Checkpoint 4 of 9· Exam question
A provider is establishing the privilege-granting workflow a consumer will follow after installing a Native App with several requested global privileges and one required reference. Which statements correctly describe that workflow? (Select all that apply)(Select 3)
Correct answers: A, B, D — The consumer can review each requested privilege's description before deciding whether to grant it; A required reference with required_at_setup true must be bound before installation can complete; The consumer can apply a feature policy to further constrain the app even after granting requested privileges
- A. Each privilege entry in the manifest carries a description specifically so the consumer can evaluate the request before deciding to grant it.
- B. When a reference is marked required_at_setup, the consumer must supply the bound object as part of installation, or the installation cannot proceed.
- C. Automatic usability without consumer action only applies under manifest_version 2's automated granting; under manifest_version 1 the consumer must issue explicit GRANT statements, so privileges are not universally auto-usable regardless of manifest version.
- D. Feature policies can be layered on top of granted privileges to further restrict what the app is allowed to do, giving the consumer an additional governance lever.
- E. Granted privileges can be revoked by the consumer at any time using standard REVOKE statements; grants are not permanent or irreversible.
3.References as the least-privilege alternative to global privileges
Global privileges cover the whole account. Most apps need much less: one table, one view, one warehouse. A reference lets the consumer choose exactly which object the app may use and which privileges it gets on that object (the mechanics are in References to consumer objects). A plain grant can't do this job, because the app has no way of knowing what the consumer's schema and object are called. A reference also stays under the consumer's control after it is bound, since the registration callback handles REMOVE and CLEAR operations as well as ADD.
Each field in a reference definition is a security control in its own right:
object_typerestricts binding to one kind of object, such asTABLE, so nothing incompatible can be attached.privilegesshould list only what the code needs. A reporting app asks forSELECT, notINSERTandDELETEas well.labelanddescriptionare what the consumer reads when choosing an object. Leaving them out doesn't protect anyone; it just leaves the consumer guessing.register_callbacknames the provider's procedure that runs when the consumer binds an object, so validation logic runs at that moment.required_at_setup: trueforces binding at install. Leave it false when the consumer will choose the object later, so they aren't made to expose data before they're ready.
Checkpoint 5 of 9· Check yourself
Your reporting app only has to read one sales table that the consumer owns, and you don't know its database, schema or table name in advance. Which approach gives the app the access it needs with the least privilege?
A reference lets the consumer choose the exact object and limits the app to the privileges listed, here SELECT only. A plain grant doesn't work because the app can't know what the consumer's objects are called. Global privileges apply to the whole account and are far broader than one table needs.
“Specific tables, views, or functions in the consumer account | Request references from the consumer”Source: docs.snowflake.com
Checkpoint 6 of 9· Exam question
A provider is designing a cross-account reference so a Native App can process a consumer's table that will be chosen after installation, and wants the binding process itself to be secure. Which design choices support that goal? (Select all that apply)(Select 4)
Correct answers: A, B, C, E — Setting required_at_setup to false so the consumer is not forced to expose an object before they are ready to select one; Declaring object_type so only a compatible kind of object can be bound to the reference; Requesting the minimum privileges list needed on the bound object rather than defaulting to broader access; Using register_callback to run provider validation logic immediately after the consumer selects an object
- A. Letting the reference be optional at setup gives the consumer time to choose the right object deliberately instead of being forced into a hasty binding during installation.
- B. Typing the reference to a specific object kind prevents the consumer from accidentally, or an attacker from deliberately, binding an incompatible or overly broad object.
- C. Requesting only the minimum privileges needed on the bound object limits what the app can do even if the wrong object is bound, reducing the impact of a binding mistake.
- D. Omitting the description removes exactly the context a consumer needs to make an informed, secure choice about what to bind, which works against secure reference design rather than supporting it.
- E. Running validation logic right after binding lets the provider check the selected object meets expectations before the app relies on it, closing a window where a bad binding could go unnoticed.
Sources6
4.Application roles expose what the app owns
The previous sections cover access flowing into the app. Application roles cover the other direction: they decide which of the app's own objects consumers can use. They are created in the setup script, because an application role has to be created inside the app. The setup script then grants them privileges on schemas, procedures and functions. Snowflake grants every application role automatically to the role that owns the app instance, which is the role that installed it. That owner then grants the application roles to other account roles in the consumer account, never directly to individual users.
CREATE APPLICATION ROLE admin;
CREATE APPLICATION ROLE user;
GRANT APPLICATION ROLE user TO APPLICATION ROLE admin;
CREATE OR ALTER VERSIONED SCHEMA app_code;
GRANT USAGE ON SCHEMA app_code TO APPLICATION ROLE admin;
GRANT USAGE ON SCHEMA app_code TO APPLICATION ROLE user;Granting user to admin means the administrator inherits everything the user persona can do, so the shared grants are written once instead of repeated on every role. Least privilege then lives in the role-specific grants. In the same example, the configuration procedure app_code.config_app is granted only to admin, while the add function goes to both roles. Treat role names as documentation for the consumer. A consumer who sees admin and user knows which one to give an analyst team. Giving every role identical privileges throws that away and leaves everyone with the widest access.
Checkpoint 7 of 9· Fill the gap
This setup script creates a role that will give consumers access to the app's config schema. Which keyword makes it a role that lives inside the app and can be granted to the consumer's account roles?
CREATE ? ROLE app_admin;
CREATE OR ALTER VERSIONED SCHEMA config;
GRANT USAGE ON SCHEMA config TO APPLICATION ROLE app_admin;Application roles have to be created inside the app, in the setup script, with CREATE APPLICATION ROLE. The app then grants them privileges on its own schemas and procedures. Snowflake grants them automatically to the role that owns the app, and that owner passes them on to other account roles. A setup script can't create the consumer's account roles.
Source: docs.snowflake.comCheckpoint 8 of 9· Exam question
A provider is designing an application role structure following least-privilege principles for a Native App with distinct viewer, analyst, and administrator personas. Which practices are consistent with sound application role design? (Select all that apply)(Select 3)
Correct answers: A, B, E — Grant only the privileges each role's persona actually needs on the app's own objects, rather than granting broad privileges to every role; Build a hierarchy so the administrator role includes the analyst and viewer capabilities instead of duplicating grants across each role; Document, through role naming and structure, which application role a consumer should grant for a given persona
- A. Scoping each role's grants to only what its persona needs on the app's objects is the core of least-privilege role design and limits the blast radius of any single role.
- B. Nesting broader roles on top of narrower ones avoids duplicating privilege grants and keeps the hierarchy easy to reason about as personas expand.
- C. Application roles are typically granted to the consumer's account roles rather than to individual user accounts, so that access follows the consumer's existing role-based access model.
- D. Giving every role the same privileges collapses the persona distinctions entirely and defeats the purpose of building separate viewer, analyst, and administrator roles.
- E. Clear, descriptive role structure and naming helps consumers correctly map their own personas to the right application role during the granting workflow.
Sources7
5.App specifications and feature policies
Some of an app's actions reach beyond the consumer's account. App specifications govern these. With automated granting, an app can create an external access integration, a security integration for OAuth, or a share and listing during setup. Because these objects open external connections or share data, the consumer still has to approve each one. A consumer reviews each specification and approves or declines it. Specifications also cover inter-app connections and restricted operations such as overriding account-level parameters. Every change to a specification's definition bumps its sequence number, which tells the consumer there is something new to review.
Approval can be partial, so the app has to cope with it. A consumer might allow one of several requested network ports, or approve sharing to some target accounts but not others. Providers can declare a specification_action lifecycle callback, for example callbacks.on_spec_update. It receives the specification's name, status and payload, so the app can wait for approval before making API calls or starting data population.
Feature policies govern what an app can create inside the account. Consumers can't directly revoke privileges that came from automated granting, but an administrator can create a feature policy that blocks object types such as warehouses, compute pools or databases. They then apply it to a single app, with ALTER APPLICATION ... SET FEATURE POLICY or CREATE APPLICATION ... WITH FEATURE POLICY, or to every app in the account.
ALTER ACCOUNT
SET FEATURE POLICY feature_policy_db.sch.block_create_db_policy
FOR ALL APPLICATIONS;Checkpoint 9 of 9· Check yourself
Two apps installed under manifest_version 2 received CREATE WAREHOUSE through automated granting. The administrator wants App A to stop creating warehouses. App B creates a warehouse during every upgrade and must keep working. What should the administrator do?
The administrator can't revoke privileges that came from automated granting directly. A feature policy is the control to use, and applying it to App A alone leaves App B able to create the warehouse it needs during upgrades. App specifications cover external connections, authentication, data sharing, inter-app connections and restricted operations. They don't cover creating warehouses.
“a consumer account administrator can create a feature policy that prohibits a particular app or all apps from creating warehouses or compute pools.”Source: docs.snowflake.com
Sources
(11)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“the consumer must grant the privileges to allow the application to do so.”
↩︎ Configuring privilege specifications in the manifest file“To configure a Snowflake Native App to request global privileges providers use the following workflow:”
↩︎ Configuring privilege specifications in the manifest file“When a provider specifies a privilege in the manifest file, the privilege requests are included as part of the installed Snowflake Native App.”
↩︎ Configuring privilege specifications in the manifest file“Granting IMPORTED PRIVILEGES ON SNOWFLAKE DB allows the Snowflake Native App to see information about usage and costs associated with the consumer account.”
↩︎ Configuring privilege specifications in the manifest file“To view the global privileges required by an app, run the SHOW PRIVILEGES command”
↩︎ How consumers grant privileges, and how the app checks them“After determining the privileges required by a Snowflake Native App, the consumer must then grant these privileges to the app.”
↩︎ Checkpoint - 2.
“Specifies the name of a privilege that the app requests in a consumer account.”
↩︎ Configuring privilege specifications in the manifest file“This field is required if the privileges field is specified.”
↩︎ Configuring privilege specifications in the manifest file“include as much information as possible about why the Snowflake Native App needs this privilege and if the privilege is required or optional”
↩︎ Configuring privilege specifications in the manifest file“Similar to how an app requests account-level privileges, the roles requested here are presented to consumers, who can review, grant, and revoke them.”
↩︎ Configuring privilege specifications in the manifest file“Indicates that references must be bound when the app is installed.”
↩︎ How consumers grant privileges, and how the app checks them“This version of the manifest file provides support for additional features, including automated granting of privileges.”
↩︎ Exam trap 1 - 3.
“All apps must provide the following information in the manifest file: All privileges required by the app on all objects.”
↩︎ Configuring privilege specifications in the manifest file“Apps should only ask for the minimum set of privileges needed for the app to function.”
↩︎ Configuring privilege specifications in the manifest file - 4.
“providers can use this function in the setup script to check if the app has the necessary privileges to create an object.”
↩︎ How consumers grant privileges, and how the app checks them - 5.
“consumer administrators can use feature policies to limit the objects an app can create in the consumer account.”
↩︎ How consumers grant privileges, and how the app checks them“Blocking object types that an app requires for installation or upgrade may prevent the app from functioning properly.”
↩︎ App specifications and feature policies“Instead, consumers can choose to approve or decline the endpoints for an app using app specifications.”
↩︎ Exam trap 2“If the app is configured to use these privileges, a consumer cannot directly revoke these privileges after the app is installed.”
↩︎ Prediction“External access integrations can’t be blocked using feature policies.”
↩︎ Prediction“a consumer account administrator can create a feature policy that prohibits a particular app or all apps from creating warehouses or compute pools.”
↩︎ Checkpoint - 6.
“the app cannot determine the name of the schema and object in the consumer account.”
↩︎ References as the least-privilege alternative to global privileges“The register_callback property specifies a stored procedure used to bind a consumer table to this reference definition.”
↩︎ References as the least-privilege alternative to global privileges - 7.
“However, the app owner can grant privileges to other account roles in the consumer account.”
↩︎ Application roles expose what the app owns“the application role itself must be created within the app.”
↩︎ Application roles expose what the app owns“Application roles defined in the setup script are automatically granted to the role owning the app instance.”
↩︎ Exam trap 3 - 8.
“because these objects enable external connections or data sharing, consumers must approve these operations when configuring the app.”
↩︎ App specifications and feature policies“When developing an app, you must account for situations where app specifications might not be approved.”
↩︎ App specifications and feature policies
Also cited
- https://docs.snowflake.com/en/developer-guide/native-apps/consumer-guide-responsibilityOfficial docs
“Both defaults can be selectively and carefully relaxed by the respective owners of the data and other objects such as stored procedures and functions.”
↩︎ Key concept “the app requests that a consumer grants privileges on an object without communicating the required privileges to the consumer in advance.”
↩︎ Exam trap 4“Specific tables, views, or functions in the consumer account | Request references from the consumer”
↩︎ Checkpoint