Note: The Configuration Manager is currently supported only on Windows platforms.

You need the following information before you begin.

  • Authorization URI: The endpoint for obtaining an authorization code from a third-party authorization service
  • Token URI: The endpoint used to exchange authentication credentials for access tokens
  • Redirect URI: The endpoint that the client is returned to after authenticating with the service
  • Client ID: The client ID for your application
  • Client Secret: The client secret for your application

The following steps describe how you can use the Progress DataDirect Snowflake Configuration Manager to obtain access and refresh tokens for either the access token flow or the refresh token grant. In addition, the Configuration Manager produces a connection string that you can use in your application.

Note: You must allow popups in your browser to obtain access and refresh tokens with the Configuration Manager.
  1. Open the Windows ODBC Administrator.
  2. Open the Configuration Manager through the User DSN or System DSN tab.
    • User DSN: If you are configuring an existing user data source, select the data source name and click Configure to display the Configuration Manager in your browser.

      If you are configuring a new user data source, click Add to display a list of installed drivers. Select your driver and click Finish to display the Configuration Manager.

    • System DSN: If you are configuring an existing system data source, select the data source name and click Configure to display the Configuration Manager in your browser.

      If you are configuring a new system data source, click Add to display a list of installed drivers. Select the driver and click Finish to display the Configuration Manager.

    Note: Configuring data sources using the File DSN tab in the ODBC Administrator is not currently supported.
  3. On the Connection tab, provide values for the following fields:

    For user ID and password authentication:

    • Data Source Name: Type a string that identifies this data source configuration, such as Projects.
    • Description: Type an optional long description of a data source name, such as My Development Projects.
    • Account Name: Type the name of your account and the region where it is hosted. For example, my_account.us-east-1.
    • Database Name: Type the name of database to which you want to connect.
    • Password: Type the password that is used to connect to the Snowflake instance.
    • Schema: Type the schema for the specified database.
    • User: Type the user name that is used to connect to the Snowflake instance.
    • Warehouse: Type the name of the virtual warehouse.
    • Role Name: Type the role for access control in the Snowflake session initiated by the driver.
    Note: User and Password connection options can also be specified in the logon dialog box or passed by your application.
    Note: The driver supports a number of authentication methods. See Authentication for more information.
  4. Set Authentication Method to 24 - OAuth2.
  5. Provide the following information in the fields provided.
    • Authorization URI
    • Token URI
    • Redirect URI
    • Client ID
    • Client Secret
  6. Retrieve the access and refresh tokens.
    1. Click Fetch OAuth Token.
    2. If the logon popup appears, enter your credentials. (This popup may not appear if you previously logged on.)
    3. If the consent popup appears, provide consent, allowing the Configuration Manager to retrieve the tokens. (This popup may not appear if you previously provided consent to the Configuration Manager.)
    4. The Access Token and Refresh Token fields populate with values retrieved from the OAuth authorization server.
  7. Click Test Connect to verify connectivity and run SQL queries against the service.

Results:

The Access Token and Refresh Token fields include access and refresh tokens that you can use to implement OAuth 2.0.

The connection string in the Connection String field may be copied and used in your ODBC application to connect with your service.

Note:

Not all the values in the resulting connection string are required. However, the connection string can be copied directly to a location that can be used by your application. The driver ignores any values that do not apply to your OAuth implementation.

For example, the connection string derived from the Configuration Manager might include the following options.

DRIVER=DataDirect 8.0 Snowflake;AccountName=account_name.us-east-1;
       DatabaseName=MyDB;Schema=MySchema;Warehouse=accounting;AuthenticationMethod=24;
       AuthURI=auth_uri;TokenURI=token_uri;ClientID=client_id;
       ClientSecret=client_secret;AccessToken=access_token;
       RefreshToken=refresh_token;

However, only the following options are required for a refresh token grant connection string.

DRIVER=DataDirect 8.0 Snowflake;AccountName=account_name.us-east-1;DatabaseName=MyDB;
       Schema=MySchema;Warehouse=accounting;AuthenticationMethod=24;TokenURI=token_uri;
       RedirectURI=redirect_uri;ClientID=client_id;
       ClientSecret=client_secret;RefreshToken=refresh_token;