Skip to content

Snowflake OAuth using dataopsly

dataopsly now provides users to use snowflake login to login the user into dataopsly as a part of our sso and oauth

For any snowflake account(account identifier), to login through this needs to configure an integration setup in their respective accounts, the step by step process is given by, please follow to login through snowflake

Integration Creation:

    CREATE SECURITY INTEGRATION dataopsly_oauth
    TYPE = OAUTH
    ENABLED = TRUE
    OAUTH_CLIENT = CUSTOM
    OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
    OAUTH_REDIRECT_URI = 'https://b54rmx30-8000.inc1.devtunnels.ms/callback/snowflake/'
    OAUTH_ISSUE_REFRESH_TOKENS = TRUE
    OAUTH_REFRESH_TOKEN_VALIDITY = 7776000;

Call the Oauth Endpoints:

Now that we have created the integration, then we can now get to know the details of the integration and also the client id and secret by running the following scripts:

desc SECURITY INTEGRATION dataopsly_oauth;
This is to describe about the integration

SELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('DATAOPSLY_OAUTH');
This will give the client_id and two client_secrets, take note of both, anyhow we are going to use only one client_secret, not the client_secret 2

OAuth endpoints are the URLs that clients call to request authorization codes and to request and refresh access tokens. These endpoints refer to specific OAuth 2.0 policies that execute when the endpoint is called.

Snowflake provides the following OAuth endpoints:

Authorization: <snowflake_account_url>/oauth/authorize

Token requests: <snowflake_account_url>/oauth/token-request

where the <snowflake_account_url> is nothing but your account_url

This second point is just for your testing purpose, now that you have created the integration and have the client_id and client_secret, and now you can provide the account_identifier, client_id and client_secret to our team such that you'll gain the login through snowflake option.

Info

Make sure you don't have your default role as ACCOUNTADMIN, SECURITYADMIN, and ORGADMIN. Because these roles are blocked by snowflake by default.

For any further clarifications, please contact team. Or refer Snowflake Docs


Reference article:

  1. Oauth
  2. Snowflake OAuth Custom Guide
  3. Invalid Consent Request Article
  4. Snowflake SQL API Guide