In the Snowflake integration, Immuta manages access to Snowflake tables by administering Snowflake row access policies and column masking policies on those tables, allowing users to query tables directly in Snowflake while dynamic policies are enforced.
Role used to configure, edit, or remove the integration needs to have the following Snowflake 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
Configure the integration
You have two options for configuring your Snowflake integration:
Automatic setup: Grant Immuta one-time use of credentials to automatically configure your Snowflake environment and the integration. When performing an automated installation, Immuta requires temporary, one-time use of credentials with the Snowflake privileges listed in the requirements section.
These permissions will be used to create and configure a new Immuta-managed 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.
Manual setup: Run the Immuta script in your Snowflake environment yourself to configure your Snowflake environment and the integration. The specified role used to run the bootstrap needs to have the Snowflake privileges listed in the requirements section.
Automatic setup
Select the section below that matches your authentication method.
Copy the request example and replace the values with your own as directed to configure the integration settings. The examples provided use JSON format, but the request also accepts YAML.
See the config object description for parameter definitions, value types, and additional configuration options.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
username is the system account user that can assume the role to manage the database and administer Snowflake masking and row access policies.
privateKey is your private key. If you are using curl, replace new lines in the private key with a backslash before the new line character: "\n". If you are using another means of configuration, such as a Python script, the "\n" should not be added.
connectArgs is used to set PRIV_KEY_FILE_PWD if the private key is encrypted.
Response
The response returns the status of the Snowflake integration configuration connection. See the response schema reference for details about the response schema.
A successful response includes the validation tests statuses.
{"id":"123456789","status":"creating","validationResults": {"status":"passed","validationTests": [ {"name":"Initial Validation: Basic Connection Test","status":"passed" }, {"name":"Initial Validation: Default Warehouse Access Test","status":"passed","result": [] }, {"name":"Initial Validation: Validate access to Privileged Role","status":"passed","result": [] }, {"name":"Validate Automatic: Database Does Not Exist","status":"passed" }, {"name":"Validate Automatic: Impersonation Role Does Not Exist","status":"skipped" }, {"name":"Validate Automatic Bootstrap User Grants","status":"passed" } ] }}
An unsuccessful request returns the status code and an error message. See the HTTP status codes and error messages for a list of statuses, error messages, and troubleshooting guidance.
{"statusCode":409,"error":"Conflict", "message": "Snowflake integration already exists on host organization.us-east-1.snowflakecomputing.com (id = 123456789)"
}
Manual setup
Best practices
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.
To manually configure the integration, complete the following steps:
Select the tab below that matches your authentication method.
Copy the request example and replace the values with your own as directed to generate the script. The examples provided use JSON format, but the request also accepts YAML.
See the config object description for parameter definitions, value types, and additional configuration options.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
audit specifies whether query audit is enabled for Snowflake. See the object description for child parameters.
workspaces represents an Immuta project workspace configured for Snowflake. See the object description for child parameters.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
username and password are the credentials for the system account that can assume the role to manage the database and administer Snowflake masking and row access policies.
Run the script returned in the response in your Snowflake environment.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
audit specifies whether query audit is enabled for Snowflake. See the object description for child parameters.
workspaces represents an Immuta project workspace configured for Snowflake. See the object description for child parameters.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
username is the system account user that can assume the role to manage the database and administer Snowflake masking and row access policies.
privateKey is your private key. If you are using curl, replace new lines in the private key with a backslash before the new line character: "\n". If you are using another means of configuration, such as a Python script, the "\n" should not be added.
connectArgs is used to set PRIV_KEY_FILE_PWD if the private key is encrypted.
Run the script returned in the response in your Snowflake environment.
In this example, Snowflake External OAuth is used to authenticate the system account user, ensuring secure communication between Immuta and Snowflake. To use this authentication method, autoBootstrap must be false.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
audit specifies whether query audit is enabled for Snowflake. See the object description for child parameters.
workspaces.enabled specifies whether Immuta project workspaces are enabled for Snowflake.
workspaces.warehouses is a list of warehouses that workspace users have usage privileges on.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
username is the system account user that can act on Snowflake objects and configure the integration.
oAuthClientConfig specifies your provider, client ID, client secret, authority URL, and your encoded public and private keys. See the object description for details about child parameters.
Run the script returned in the response in your Snowflake environment.
Response
The response returns the script for you to run in your environment.
Configure the integration in Immuta
Select the tab below that matches your authentication method.
Copy the request example and replace the values with your own as directed to configure the integration settings. The examples provided use JSON format, but the request also accepts YAML. The parameters and values you provide in this payload must match those you provided when generating the script.
See the config object description for parameter definitions, value types, and additional configuration options.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
audit specifies whether query audit is enabled for Snowflake. See the object description for child parameters.
workspaces represents an Immuta project workspace configured for Snowflake. See the object description for child parameters.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
username and password are the credentials for the system account that can assume the role to manage the database and administer Snowflake masking and row access policies.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
audit specifies whether query audit is enabled for Snowflake. See the object description for child parameters.
workspaces represents an Immuta project workspace configured for Snowflake. See the object description for child parameters.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
username is the system account user that can assume the role to manage the database and administer Snowflake masking and row access policies.
privateKey is your private key. If you are using curl, replace new lines in the private key with a backslash before the new line character: "\n". If you are using another means of configuration, such as a Python script, the "\n" should not be added.
connectArgs is used to set PRIV_KEY_FILE_PWD if the private key is encrypted.
In this example, Snowflake External OAuth is used to authenticate the system account user, ensuring secure communication between Immuta and Snowflake. To use this authentication method, autoBootstrap must be false.
warehouse is the default pool of Snowflake compute resources the Immuta system user will use to run queries and perform other Snowflake operations.
database is the name of a new empty database that the Immuta system user will manage and store metadata in.
impersonation specifies whether user impersonation is enabled. See the object description for child parameters.
workspaces specifies whether Immuta project workspaces are enabled for Snowflake. See the object description for details about child parameters.
oAuthClientConfig specifies your provider, client ID, client secret, authority URL, and your encoded public and private keys. See the object description for details about child parameters.
Response
The response returns the status of the Snowflake integration configuration connection. See the response schema reference for details about the response schema.
A successful response includes the validation tests statuses.
{"id":"123456789","status":"creating","validationResults": {"status":"passed","validationTests": [ {"name":"Initial Validation: Basic Connection Test","status":"passed" }, {"name":"Initial Validation: Default Warehouse Access Test","status":"passed","result": [] }, {"name":"Initial Validation: Validate access to Privileged Role","status":"passed","result": [] }, {"name":"Validate Automatic: Database Does Not Exist","status":"passed" }, {"name":"Validate Automatic: Impersonation Role Does Not Exist","status":"skipped" }, {"name":"Validate Automatic Bootstrap User Grants","status":"passed" } ] }}
An unsuccessful request returns the status code and an error message. See the HTTP status codes and error messages for a list of statuses, error messages, and troubleshooting guidance.
{"statusCode":409,"error":"Conflict", "message": "Snowflake integration already exists on host organization.us-east-1.snowflakecomputing.com (id = 123456789)"
}
Replace the {id} request parameter with the unique identifier of the integration you want to get. Alternatively, you can get a list of all integrations and their IDs with the GET /integrationsendpoint.
Response
The response returns the Snowflake integration configuration. See the response schema reference for details about the response schema. An unsuccessful request returns the status code and an error message. See the HTTP status codes and error messages for a list of statuses, error messages, and troubleshooting guidance.
{"id":"123456789","status":"enabled","validationResults": {"status":"passed","validationTests": [ {"name":"Initial Validation: Basic Connection Test","status":"passed" }, {"name":"Initial Validation: Default Warehouse Access Test","status":"passed","result": [] }, {"name":"Initial Validation: Validate access to Privileged Role","status":"passed","result": [] }, {"name":"Validate Automatic: Database Does Not Exist","status":"passed" }, {"name":"Validate Automatic: Impersonation Role Does Not Exist","status":"skipped" }, {"name":"Validate Automatic Bootstrap User Grants","status":"passed" } ] },"type":"Snowflake","autoBootstrap":true,"config": {"host":"organization.us-east-1.snowflakecomputing.com","warehouse":"SAMPLE_WAREHOUSE","database":"SNOWFLAKE_SAMPLE_DATA","port":443,"audit": {"enabled":false, },"workspaces": {"enabled":false },"impersonation": {"enabled":false },"lineage": {"enabled":false },"authenticationType":"userPassword","username":"<REDACTED>","password":"<REDACTED>","role":"ACCOUNTADMIN" }}
{"id":"123456789","status":"enabled","validationResults": {"status":"passed","validationTests": [ {"name":"Initial Validation: Basic Connection Test","status":"passed" }, {"name":"Initial Validation: Default Warehouse Access Test","status":"passed","result": [] }, {"name":"Initial Validation: Validate access to Privileged Role","status":"passed","result": [] }, {"name":"Validate Automatic: Database Does Not Exist","status":"passed" }, {"name":"Validate Automatic: Impersonation Role Does Not Exist","status":"skipped" }, {"name":"Validate Automatic Bootstrap User Grants","status":"passed" } ] },"type":"Snowflake","autoBootstrap":false,"config": {"host":"organization.us-east-1.snowflakecomputing.com","warehouse":"SAMPLE_WAREHOUSE","database":"SNOWFLAKE_SAMPLE_DATA","port":443,"impersonation": {"enabled":true,"role":"IMMUTA_IMPERSONATION" },"audit": {"enabled":false },"workspaces": {"enabled":true,"warehouses": ["SAMPLE_WAREHOUSE"] },"lineage": {"enabled":false },"authenticationType":"oAuthClientCredentials","oAuthClientConfig": {"provider":"Okta","clientId":"123456abc","useCertificate":false,"clientSecret":"secret","authorityUrl":"example.authority.com" } }}
The response returns the configuration for all integrations. See the response schema reference for details about the response schema. An unsuccessful request returns the status code and an error message. See the HTTP status codes and error messages for a list of statuses, error messages, and troubleshooting guidance.
[ {"id":"1","status":"enabled","validationResults": {"status":"passed","validationTests": [ {"name":"Initial Validation: Basic Connection Test","status":"passed" }, {"name":"Initial Validation: Default Warehouse Access Test","status":"passed","result": [] }, {"name":"Initial Validation: Validate access to Privileged Role","status":"passed","result": [] }, {"name":"Validate Automatic: Database Does Not Exist","status":"passed" }, {"name":"Validate Automatic: Impersonation Role Does Not Exist","status":"skipped" }, {"name":"Validate Automatic Bootstrap User Grants","status":"passed" } ] },"type":"Snowflake","autoBootstrap":true,"config": {"host":"organization.us-east-1.snowflakecomputing.com","warehouse":"SAMPLE_WAREHOUSE","database":"SNOWFLAKE_SAMPLE_DATA","port":443,"audit": {"enabled":false