CertSafari
    Snowflake SnowPro Specialty: Native Apps· Lessons

    Domain 2 · Lesson 4/12

    Native App execution rights and IP protection: owner's vs restricted caller's

    Implement security and privileges.

    9 min read
    9.5% of exam
    3 sources
    Published 21 Oct 2026
    Docs as of 18 Oct 2026

    What you will be able to do

    • State how an app's stored procedure runs when no EXECUTE AS clause is given
    • Create a restricted caller's rights executable and explain the consumer GRANT CALLER workflow
    • Identify the limitations of restricted caller's rights inside an app
    • Pick the access mechanism that fits a given access requirement
    • Explain how execution rights and redaction protect provider code

    1.Owner's rights: the default execution model

    Execution rights decide whose privileges an app's code runs with. Two kinds of executable in an app can be configured this way: stored procedures owned by the app, and services in apps with containers. Each runs with either owner's rights or restricted caller's rights.

    Owner's rights is the default. CREATE PROCEDURE with no EXECUTE AS clause produces a procedure that runs as the app. Consumers who have been granted the procedure through an application role can call it, and whatever the app is privileged to do, the procedure can do. This is what lets an app read data in the provider account and present the results to the consumer, while the consumer never gets direct access to that data. Providers also don't need to ask the consumer for anything to create or access objects the app owns.

    Checkpoint 1 of 5· Check yourself

    A provider's setup script creates a stored procedure that reads tables owned by the app and returns summary results to consumers. Consumers must never query the underlying data directly. What does the provider need to set up for this procedure to work?

    Sources1

    2.Restricted caller's rights and the GRANT CALLER workflow

    Restricted caller's rights let an executable act with the caller's privileges, but only those the consumer has explicitly allowed. The provider opts in by adding EXECUTE AS RESTRICTED CALLER to the executable.

    A setup-script procedure that runs with restricted caller's rightssql
    CREATE OR REPLACE PROCEDURE CORE.HELLO()
    RETURNS STRING
    LANGUAGE SQL
    EXECUTE AS RESTRICTED CALLER
    AS
    BEGIN
      RETURN 'Hello Snowflake!';
    END;

    Snowflake recommends announcing this in the manifest. With enabled: true, Snowsight adds a Restricted caller's rights section to the app's listing, so consumers see it before they install.

    Manifest block that surfaces restricted caller's rights in the listingyaml
    restricted_callers_rights:
      enabled: true
      description: This app includes stored procedure that uses restricted caller's rights.

    On the consumer side, an administrator issues caller grants that name the app with TO APPLICATION. Each grant applies to one level of the hierarchy, and Snowflake recommends granting at a container level rather than object by object. The levels don't cascade downwards:

    • Schema: CALLER USAGE grants only USAGE on the schema. Objects inside need an inherited grant, such as GRANT INHERITED CALLER USAGE ON ALL FUNCTIONS IN SCHEMA.
    • Database: CALLER USAGE covers the database and its schemas. Objects need GRANT INHERITED CALLER USAGE ON ALL FUNCTIONS IN DATABASE;.
    • Account: CALLER USAGE grants access to the account only. Operations need their own caller grant, such as GRANT CALLER CREATE DATABASE ON ACCOUNT TO my_app;.
    Consumer lets an app's service use the caller's role on one databasesql
    GRANT CALLER USAGE ON DATABASE consumer_db TO APPLICATION hello_snowflake_app;

    Checkpoint 2 of 5· Fill the gap

    A consumer has already run GRANT CALLER USAGE ON DATABASE for an app, but the app's restricted caller's rights procedure still can't use the functions in that database. Which keyword completes the grant that gives it access to those functions?

    GRANT  ?  CALLER USAGE ON ALL FUNCTIONS IN DATABASE;

    Sources1

    3.Limitations of restricted caller's rights

    Native Apps never allow unrestricted caller's rights, because an executable that could use every privilege of whoever called it would undermine the app's security guarantees. Restricted caller's rights come with further limits:

    • Persistent reference functions are not supported.
    • Relative paths to objects on a stage are not supported.
    • A restricted caller's rights executable cannot access the app's internal objects.
    • An owner's rights executable can call a restricted caller's rights executable only if the app owns both. An app procedure can't call a consumer's restricted-caller procedure.

    The internal-objects rule catches people when they design. Suppose a procedure needs to read consumer tables owned by another role and also write results into the app's own tables. Restricted caller's rights alone can't do both. Split the work: a restricted-caller executable handles the consumer side, and an owner's-rights executable owned by the app handles the app's internal objects.

    Checkpoint 3 of 5· Check yourself

    An app must read consumer tables that belong to another role in the consumer account, then write the results into tables the app owns. How should the provider design the executables?

    Sources1

    4.Choosing the right access mechanism

    The choice follows from who owns the thing the code needs. When the app owns it, owner's rights are enough. When the consumer owns it and the app knows exactly which object it needs, a reference is the narrowest option. Restricted caller's rights are for objects owned by other users or roles, and for account-level operations the consumer wants to authorise via caller grants.

    Access requirement against the mechanism to use
    Access requiredHow to get access
    Data or functions owned by the appOwner's rights (default); no consumer request needed
    Specific tables, views, or functions in the consumer accountRequest references from the consumer
    Tables, views, functions, and row policies owned by another user or roleRestricted caller's rights
    Broad access to consumer-owned databasesDatabase role grants
    Queries combining consumer and provider dataReferences and owner's rights together
    Account-level operations such as creating databases or executing tasksRestricted caller's rights

    Checkpoint 4 of 5· Match them up

    Match each access requirement of a Native App to the mechanism Snowflake recommends for it.

    Tap a term, then the definition that fits it.

    Sources1

    5.How execution rights and redaction protect provider code

    Provider intellectual property is protected by default, just as consumer data is. A consumer who installs the app can't view the objects inside the application object unless the provider grants access through application roles. That makes owner's rights the main IP tool. Granting USAGE on a procedure lets consumers run the logic without seeing the objects or data behind it.

    The framework also redacts what a consumer would otherwise see in metadata. For queries run at install or upgrade, queries from a stored procedure the app owns, and queries involving a non-secure view or function the app owns, Snowsight collapses the query profile to a single empty node. In query history, query_text and error_message show blank for install and upgrade queries and for child jobs of app-owned procedures.

    Checkpoint 5 of 5· Check yourself

    To protect its IP, a provider wants consumers to run a proprietary scoring model, which the app keeps in its own procedure and lookup tables. Consumers must never see the logic or the lookup data. Which design does this?

    Sources23

    Sources

    (3)

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

    1. 1.
      “they run with the privileges granted to the owner of the executable, which is the app itself.”
      ↩︎ Owner's rights: the default execution model
      “they do not allow the consumer to access the data directly.”
      ↩︎ Owner's rights: the default execution model
      “cannot run with a specific privilege unless an administrator in the consumer account explicitly allows it by using the GRANT CALLER command”
      ↩︎ Restricted caller's rights and the GRANT CALLER workflow
      “if it is present and enabled is set to true, Snowsight includes a section named Restricted caller’s rights in the app’s listing.”
      ↩︎ Restricted caller's rights and the GRANT CALLER workflow
      “Snowflake recommends that consumers grant caller grants at a container level and not on specific objects in their account.”
      ↩︎ Restricted caller's rights and the GRANT CALLER workflow
      “an app’s stored procedure with owner’s rights cannot call a consumer’s stored procedure with restricted caller’s rights.”
      ↩︎ Limitations of restricted caller's rights
      “Relative paths to objects on a stage are not supported.”
      ↩︎ Limitations of restricted caller's rights
      “Use restricted caller’s rights, which allow the consumer to enable access to perform these actions.”
      ↩︎ Choosing the right access mechanism
      “granting the CALLER USAGE caller grant on a schema only grants the USAGE privilege on the schema.”
      ↩︎ Exam trap 1
      “Restricted caller’s rights executables cannot access the app’s internal objects.”
      ↩︎ Exam trap 2
      “To guarantee that executables in an app are secure, Snowflake Native Apps do not support unrestricted caller’s rights.”
      ↩︎ Exam trap 3
      “Providers do not need to request access from the consumer to create or access objects owned by the app.”
      ↩︎ Checkpoint
      “Restricted caller’s rights executables cannot access the app’s internal objects.”
      ↩︎ Checkpoint
      “Queries that access a combination of consumer and provider data | Use references and owner’s rights together”
      ↩︎ Checkpoint
      “owner’s rights allow an executable to access data in the provider account and present that data to the consumer”
      ↩︎ Checkpoint
    2. 2.
      “they are not allowed to view the objects within the application object unless a provider grants permissions on the objects using application roles.”
      ↩︎ How execution rights and redaction protect provider code
      “Snowsight collapses the query profile data into a single empty node instead of displaying the full query profile tree.”
      ↩︎ How execution rights and redaction protect provider code
    3. 3.
      “It does not provide any access to consumer data by default while also protecting the provider’s intellectual property (IP) by default.”
      ↩︎ How execution rights and redaction protect provider code

    Ready to test yourself?

    Practise the 35 questions on this subdomain.

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