Authenticate with Snowflake

The Snowflake Connector provides several ways to authenticate with the repository. You can choose which type of authentication to use by setting the AuthType configuration parameter.

Key-Pair Authentication

OpenText recommends using key-pair authentication.

To use key-pair authentication, you first create a key pair. You can do this with a tool such as openSSL. The private key is private and is known only to the user (the connector). You must provide Snowflake with the public key. For information about how to accomplish this, refer to the Snowflake documentation.

To configure the connector

OAuth Authentication

To use OAuth authentication, you configure a security integration in Snowflake using the function CREATE SECURITY INTEGRATION. For example:

CREATE SECURITY INTEGRATION IDOL_CONNECTOR_OAUTH
  TYPE = OAUTH
  OAUTH_CLIENT = CUSTOM
  OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
  OAUTH_REDIRECT_URI = 'http://localhost:7878/idol-nifi-oauth'
  OAUTH_ALLOW_NON_TLS_REDIRECT_URI = TRUE
  OAUTH_ISSUE_REFRESH_TOKENS = TRUE
  OAUTH_REFRESH_TOKEN_VALIDITY = 7776000
  ENABLED = TRUE;

The redirect URI should match the location where you will run the OAuth tool. If you are using NiFi you can obtain the correct URL from the OAuth Setup tab in the processor UI.

After creating the integration, obtain the client ID and secret by using the function SHOW_OAUTH_CLIENT_SECRETS.

To configure the NiFi Ingest connector

  1. In the NiFi web interface, right-click the processor and click Advanced.
  2. Complete the guided setup wizard. Then configure OAuth using the OAUTH SETUP tab.

To configure the ACI connector

  1. Open the folder where you installed the connector.
  2. Open the OAuth tool configuration file, oauth_tool.cfg, in a text editor.
  3. In the [Default] section, set any SSL or proxy settings that are required to access the repository:

    SSLMethod The version of SSL/TLS to use.
    ProxyHost The host name or IP address of the proxy server to use.
    ProxyPort The port of the proxy server to use.

    For example:

    SSLMethod=NEGOTIATE
    ProxyHost=10.0.0.1
    ProxyPort=8080
  4. In the [OAuthTool] section, replace the following placeholders with suitable values:

    {AppKey} The client ID you obtained from Snowflake.
    {AppSecret} The client secret you obtained from Snowflake.
    {AccountUrl} The Snowflake account base URL, for example https://<orgname>-<account>.snowflakecomputing.com.
  5. Open a command-line window and run the following command:

    oauth_tool.exe oauth_tool.cfg OAuthTool

    A web browser opens, asking you to log in and grant consent.

  6. Log in and grant consent.

    The web page displays a message stating that the OAuth details have been successfully stored, and the OAuth tool creates the files oauth.cfg and oauth2_sites.bin. When you configure the connector, import the parameters from oauth.cfg into your task configuration. For more information about including parameters from another file, see Include an External Configuration File.

Programmatic Access Token

To use a programmatic access token, first generate the token by following the instructions in the Snowflake documentation.

To configure the connector