Register a Snowflake Host
The enhanced onboarding API is a REST API which allows users to register a Snowflake to Immuta with a single set of credentials rather than configuring an integration and creating data sources separately. Then Immuta can manage and enforce access controls on your data through that host. To manage your host, see the Manage a host reference guide.
Requirements
The following permissions and personas are used in the registration process:
Immuta permission:
CREATE_DATA_SOURCE
Snowflake permissions for the user registering the host and running the script:
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
REFERENCES
on all tablesUSAGE
on the schema and database to register data sources
Snowflake permissions for the new Immuta system account that is created:
APPLY MASKING POLICY ON ACCOUNT
APPLY ROW ACCESS POLICY ON ACCOUNT
Additional grants associated with the
IMMUTA
database
Complete the following steps to register a Snowflake host:
Use the
/integrations/scripts/create
endpoint to receive a script.Run the script in Snowflake.
Use the
/data/connection
endpoint to finish registering your host in Immuta.
Step 1: Generate the script
POST
/integrations/scripts/create
Using the example request, update the
<placeholder_values>
with your connection details.Copy the
config
object to use later in the setup process.Run the request.
Copy the returned script and use it in the next step.
Find descriptions of the editable attributes in the table below and of the full payload in the Integration configuration payload reference guide.
Payload parameters
Attribute | Description | Required |
---|---|---|
config.host | The URL of your Snowflake account. | Yes |
config.warehouse | The default pool of compute resources the Immuta system user will use to run queries and perform other Snowflake operations. | Yes |
config.database | Name of a new empty database that the Immuta system user will manage and store metadata in. | Yes |
config.username | The new username of the system account that can act on Snowflake objects and configure the host. The system account will be created by the script in step two. | Yes |
config.password | The password of the system account that can act on Snowflake objects and configure the host. The system account will be created by the script in step two. | Yes |
config.audit | This object enables Snowflake query audit. | No |
config.audit.enabled | If | No |
config.workspaces | This object represents an Immuta project workspace configured for Snowflake. | No |
config.workspaces.enabled | If | No |
config.impersonation | This object enables user impersonation. | No |
config.impersonation.enabled | If | No |
config.lineage | This object enables Snowflake lineage ingestion. | No |
config.lineage.enabled | If | No |
config.userRolePattern | This object excludes roles and users from authorization checks. | No |
config.userRolePattern.exclude | This array is a list of roles and users to exclude from authorization checks. The roles and users will not have policies applied to them when querying Immuta protected Snowflake tables. | No |
Step 2: Run the script in Snowflake
Using your generated script, run it in your Snowflake environment as a user with the permissions listed in the requirements section.
The script will create an Immuta system user that will authenticate using the credentials you specified in the script generation. This new system user will have the permissions listed above. Additionally, the script will create the database you specified in the earlier step.
Step 3: Create the host in Immuta
POST
/data/connection
Using the tabs below, copy the request and update the <placeholder_values>
with your connection details. The connection
details here should match the ones used when generating the script, and the payload from the script generation should be pasted exactly into nativeIntegration
. Then submit the request.
Find descriptions of the editable attributes in the table below and of the full payload in the Host registration payloads reference guide. The recommended setting values are included in the example.
Test run
Opt to test and validate the create connection payload using a dry run:
POST
/data/connection/test
Payload parameters
Attribute | Description | Required |
---|---|---|
connectionKey | A unique name for the host connection. | Yes |
connection | Configuration attributes that should match the values used when getting the script from the integration endpoint. | Yes |
connection.hostname | The URL of your Snowflake account. This should be the same as | Yes |
connection.port | The port to use when connecting to your Snowflake account host. Defaults to | Yes |
connection.warehouse | The default pool of compute resources the Immuta system user will use to run queries and perform other Snowflake operations. | Yes |
connection.role | The privileged Snowflake role used by the Immuta system account when configuring the Snowflake host. At minimum, it must be able to see the data that Immuta will govern. | Yes |
connection.username | The username of the system account that can act on Snowflake objects and configure the host. | Yes |
connection.password | The password of the system account that can act on Snowflake objects and configure the host. | Yes |
settings | Specifications of the host's settings, including active status. | No |
settings.isActive | When | No |
options.forceRecursiveCrawl | If | No |
nativeIntegration | Configuration attributes that should match the values used when getting the script from the integration endpoint. See the table above for descriptions. | Yes |
Response schema
Attribute | Description |
---|---|
objectPath | The list of names that uniquely identify the path to a data object in the remote platform's hierarchy. The first element will be the associated |
bulkId | A bulk ID that can be used to search for the status of background jobs triggered by this request. |
Example response
Last updated