Snowflake
Snowflake Integration Setup
Honeydew is built on top of Snowflake and requires access to Snowflake in order to operate. You have two options to set up Snowflake access - either using a central org-level connection parameters or map your individual Snowflake user credentials to Honeydew.
If you would like to use a central org-level connection, it is advised to create a new dedicated Snowflake user for Honeydew integration. The following Snowflake connection parameters are required for Honeydew setup:
- Account name
- Username
- Role
- Warehouse
Authentication Methods
Honeydew supports the following authentication methods for Snowflake:
Key-pair authentication
This is the recommended method for org-level service accounts. For this method, you will need to provide a Private Key and possibly a Private Key Passphrase (if used).
Generate a key pair
Generating an unencrypted private key can be done using the following command:
Generating an encrypted private key can be done using the following command:
Generating the public key:
Generating an unencrypted private key can be done using the following command:
Generating an encrypted private key can be done using the following command:
Generating the public key:
Make sure the OpenSSH feature is enabled on your Windows machine. For the output folder we use Windows command line %userprofile% to direct to your user home folder. You can replace it with your preferred (existing) folder.
Convert the generated .pub file to a compatible format:
Store the generated keys in a secure location.
Assign the public key to a Snowflake user
To assign the public key to a Snowflake user, execute the following SQL command in Snowflake:
Exclude the public key delimiters in the SQL statement.
Configure the Snowflake connection in Honeydew
In Honeydew App settings page, configure the Snowflake connection using the Private Key and Private Key Passphrase (if used) from the previous step.
OAuth authentication
This is the recommended method for individual users credentials. Each user will need to connect to Honeydew using their own Snowflake OAuth credentials. For this method, you will need to create a new Snowflake OAuth integration and then provide a Client ID and Client Secret.
When Snowflake OAuth is used, users can authorize their Honeydew credentials using SSO via Snowflake. If Snowflake is set up with SSO through a third-party identity provider, Honeydew users can use this method to log into Snowflake and authorize Honeydew credentials without any additional setup.
OAuth integration configuration
Locate the Honeydew redirect URI
You will need to provide the Honeydew redirect URI when creating the OAuth integration in Snowflake. The redirect URI can be found in the Honeydew App settings page under the Snowflake connection section. It should look like this (exact URI may vary based on your Honeydew deployment):
Save it for later use.
Create a Snowflake OAuth integration
To create a new OAuth integration in Snowflake, execute the following SQL command. You can find the complete documentation on creating an oauth integration here.
In the following query, replace <REDIRECT_URI>
with the Honeydew redirect URI you saved in the previous step.
Replace <VALIDITY_IN_SECONDS>
with the desired validity period for the refresh token - for example, 2592000
for 30 days.
If not provided, the default is 7776000
(90 days).
If you are using secondary roles, please include OAUTH_USE_SECONDARY_ROLES = 'IMPLICIT'
in the statement.
If you would like to pre-authorize specific roles for OAuth authentication,
provide the PRE_AUTHORIZED_ROLES_LIST
parameter with a list of the actual role names you want to pre-authorize.
Additional configuration options may be specified for the security integration as needed.
Only Snowflake users with the ACCOUNTADMIN
role or a role with the global CREATE INTEGRATION
privilege can execute this SQL command
Retrieve OAuth Client ID and Client Secret
Once the OAuth integration is created, you can configure the Snowflake connection in Honeydew. First, retrieve the Client ID and Client Secret for the OAuth integration you just created. You can do this by executing the following SQL command in Snowflake:
Configure the Snowflake connection in Honeydew
In Honeydew App settings page, configure the Snowflake connection using the Client ID and Client Secret from previous step.
User setup
Once Snowflake OAuth integration is configured, Honeydew users will be able to provide their credentials via OAuth. By clicking “Connect to Snowflake” in the Snowflake settings, users will be redirected to Snowflake to authorize with the configured SSO provider.
PAT (programmatic access tokens) authentication
For this method, you will need to provide a generated access token.
Generate a PAT in Snowflake
Follow the steps in the Snowflake documentation to create a PAT. Note the prerequisites required for PAT generation, such as:
Configure the PAT in Honeydew
In Honeydew App settings page, configure the Snowflake connection using the Access Token generated in Snowflake.
Password authentication
For this method, you will need to provide a password, and will likely be required to approve access via MFA.
Password authentication is not recommended for production use.
It is advised to use Key-pair authentication for Snowflake integration, when using an org-level service account, and to use OAuth authentication or PAT (programmatic access tokens) authentication for individual users credentials.
It is strongly recommended to keep MFA enabled for any Snowflake users that are integrated with Honeydew.
The following Snowflake connection parameters are required to be able to deploy dynamic datasets to Snowflake:
- Database - the database where Honeydew will deploy any dynamic datasets as views or tables
- Schema - the schema where Honeydew will deploy any dynamic datasets as views or tables
- Dev Database - the database where Honeydew will deploy any dynamic datasets as views or tables when working on a dev branch
- Dev Schema - the schema where Honeydew will deploy any dynamic datasets as views or tables when working on a dev branch
Allowing Honeydew client IP addresses
If you have IP-based access restrictions in Snowflake, add the IP addresses displayed in the Snowflake connection screen in Honeydew App settings page to the “Allowed IP Addresses” list.
For the Honeydew Cloud deployment, the following IP addresses are used:
34.86.209.90
34.145.147.92
If you are using a private Honeydew deployment, the IP addresses will be different. You can find them in the Snowflake connection screen in Honeydew App settings page.
Permissions
Honeydew does not process any Snowflake data, but only reads metadata and deploys views/tables. You can find more security-related information here.
If using an integration user deployment, the Honeydew integration user/role require the following permissions to operate:
- USAGE on any databases and schemas which will be used as part of the semantic layer
- SELECT on any tables/views which will be used as part of the semantic layer
- CREATE TABLE, CREATE DYNAMIC TABLE and CREATE VIEW on the database/schema where dynamic datasets will be deployed
Honeydew has a growing number of AI-powered features, built on top of Snowflake Cortex.
To be able to use these features in Honeydew, the SNOWFLAKE.CORTEX_USER
database role is required to be granted:
For more details, see the Snowflake Cortex documentation.