Skip to content

You are viewing documentation for Immuta version 2023.2.

For the latest version, view our documentation for Immuta SaaS or the latest self-hosted version.

Configure Snowflake Governance Features Integration

This page details how to install the Snowflake integration for users on Snowflake Enterprise. If you currently use Snowflake Standard, see the installation guide for that integration.

Snowflake resource names

Use uppercase for the names of the Snowflake resources you create below.

  1. Click Native Integrations in the left panel of the app settings page.
  2. Click the +Add Native Integration button and select Snowflake from the dropdown menu.
  3. Complete the Host, Port, and Default Warehouse fields.
  4. Opt to check the Enable Project Workspace box. This will allow for managed write access within Snowflake. Note: Project workspaces still use Snowflake views, so the default role of the account used to create the data sources in the project must be added to the Excepted Roles List. This option is unavailable when table grants is enabled.
  5. Opt to check the Enable Impersonation box and customize the Impersonation Role to allow users to natively impersonate another user. You cannot edit this choice after you configure the integration.
  6. Opt to check the Enable Native Query Audit box to allow Immuta to ingest audit records for native queries.
  7. Opt to check the Automatically ingest Snowflake object tags box to allow Immuta to automatically import table and column tags from Snowflake.

Select your configuration method

You have two options for configuring your Snowflake environment:

  • Automatic setup: Grant Immuta one-time use of credentials to automatically configure your Snowflake environment and the integration.
  • Manual setup: Run the Immuta script in your Snowflake environment yourself to configure your Snowflake environment and the integration.

Automatic setup

Immuta requires temporary, one-time use of credentials with specific permissions.

When performing an automated installation, Immuta requires temporary, one-time use of credentials with the following permissions:

  • CREATE DATABASE ON ACCOUNT WITH GRANT OPTION
  • CREATE ROLE ON ACCOUNT WITH GRANT OPTION
  • CREATE USER ON ACCOUNT WITH GRANT OPTION
  • MANAGE GRANTS ON ACCOUNT WITH GRANT OPTION
  • APPLY MASKING POLICY ON ACCOUNT WITH GRANT OPTION
  • APPLY ROW ACCESS POLICY ON ACCOUNT WITH GRANT OPTION

These permissions will be used to create and configure a new IMMUTA database within the specified Snowflake instance. The credentials are not stored or saved by Immuta, and Immuta doesn’t retain access to them after initial setup is complete.

You can create a new account for Immuta to use that has these permissions, or you can grant temporary use of a pre-existing account. By default, the pre-existing account with appropriate permissions is ACCOUNTADMIN. If you create a new account, it can be deleted after initial setup is complete.

Alternatively, you can create the IMMUTA database within the specified Snowflake instance manually using the manual setup option.

From the Select Authentication Method Dropdown, select one of the following authentication methods:

  • Username and Password: Complete the Username, Password, and Role fields.
  • Key Pair Authentication:

    1. Complete the Username field.
    2. Click Key Pair (Required), and upload a Snowflake key pair file.
    3. Complete the Role field.

Manual setup

Best practices: account creation

The account you create for Immuta should only be used for the integration and should not be used as the credentials for creating data sources in Immuta; doing so will cause issues. Instead, create a separate, dedicated READ-ONLY account for creating and registering data sources within Immuta.

Required privileges

The specified role used to run the bootstrap needs to have the following privileges:

  • CREATE DATABASE ON ACCOUNT WITH GRANT OPTION
  • CREATE ROLE ON ACCOUNT WITH GRANT OPTION
  • CREATE USER ON ACCOUNT WITH GRANT OPTION
  • MANAGE GRANTS ON ACCOUNT WITH GRANT OPTION
  • APPLY MASKING POLICY ON ACCOUNT WITH GRANT OPTION
  • APPLY ROW ACCESS POLICY ON ACCOUNT WITH GRANT OPTION

It will create a user called IMMUTA_SYSTEM_ACCOUNT, and grant the following privileges to that user:

  • APPLY MASKING POLICY ON ACCOUNT
  • APPLY ROW ACCESS POLICY ON ACCOUNT
  • Additional grants associated with the IMMUTA database
  • If you have selected to automatically ingest Snowflake object tags, which enables Snowflake tag ingestion,
    • GRANT IMPORTED PRIVILEGES ON DATABASE snowflake
    • GRANT APPLY TAG ON ACCOUNT

Run the script

  1. Select Manual.

  2. Use the Dropdown Menu to select your Authentication Method:

    • Username and password: Enter the Username and Password and set them in the bootstrap script for the Immuta system account credentials.
    • Key pair authentication: Upload the Key Pair file.
    • Snowflake External OAuth:

      1. Create a security integration for your Snowflake External OAuth. Note that if you have an existing security integration, then the Immuta system role must be added to the existing EXTERNAL_OAUTH_ALLOWED_ROLES_LIST. The Immuta system role will be the Immuta database provided above with _SYSTEM. If you used the default database name it will be IMMUTA_SYSTEM.
      2. Fill out the Token Endpoint: Where the generated token is sent, also known as aud (Audience) and iss (Issuer).
      3. Fill out the Client ID: The subject of the generated token, also known as sub (Subject).
      4. Optionally fill out Resource, depending on who the Authorization Server is.
      5. Fill out the x509 Thumbprint Certificate: This certificate identifies the corresponding key to the token, often abbreviated as x5t or also known as sub (Subject).
      6. Upload the PEM Certificate: This is the client certificate that is used to sign the authorization request.
  3. Download, fill out the appropriate fields, and run the bootstrap script linked in the Setup section.

    Warning: different accounts

    The account used to enable the integration must be different from the account used to create data sources in Immuta. Otherwise, workspace views won't be generated properly.

Select available warehouses (optional)

If you enabled a Snowflake workspace, select Warehouses from the dropdown menu that will be available to project owners when creating native Snowflake workspaces. Select from a list of all the warehouses available to the privileged account entered above. Note that any warehouse accessible by the PUBLIC role does not need to be explicitly added.

Select excepted roles and users

Enter the Excepted Roles/User List. Each role or username (both case-sensitive) in this list should be separated by a comma.

Excepted roles/users will have no policies applied to queries.

Any user with the username or acting under the role in this list will have no policies applied to them when querying Immuta protected Snowflake tables in Snowflake. Therefore, this list should be used for service or system accounts and the default role of the account used to create the data sources in the Immuta projects (if you have Snowflake workspace enabled).

Test the connection and save the configuration

  1. Click Test Snowflake Connection.
  2. Once the credentials are successfully tested, click Save and Confirm your changes.