Skip to main content

Hello,

I’m setting a new connection for Snowflake datasource, and I need to use key pair authentication for this.

In the credentials drop-down menu it doesn’t look like this option to be present:

 

 

What do you advise?

Hi @babamar, thank you for posting, and for your patience while I was checking with our team. Here are the guidelines on how to connect to Snowflake using the JWT mechanism, you’d need to go through these steps in order to have Snowflake as one of the data sources. Please note that this was tested using Ataccama ONE version 14.5.0.

Set up Snowflake JWT

Go to the section “Connect to Snowflake using JWT” if you already set up the key in Snowflake.

Generating the JWT (this is only one example, it can be done in other ways): Alternatively you can also search for “generate pem rsa key” to find alternative ways of generating the key.

  • Use openssl command.
  • Generate private key: openssl genrsa -out keypair.pem 2048
  • Generate public key from the private key: openssl rsa -in keypair.pem -pubout -out publickey.crt

Set public key to Snowflake account

Set the public key for the user in the Snowflake console. Please note that you need to be logged in as an admin. The SQL template is: alter user "<username>" set rsa_public_key='<public key content>'. Here, put only the content of the key into the query (omit the first and last rows that start with dashes).

Connect to Snowflake using JWT

Use these steps in order to connect to Snowflake from ONE Catalog:

  1. Create a Snowflake connection, and fill in the JDBC string as usual.
  2. Add credentials. Select “Username and password”.

     

  3. Type in the correct username.
  4. Password can be left empty or you can fill in anything. It does not have to be correct.
  5. Add driver property authenticator with value snowflake_jwt. Alternatively, you can put this property as a parameter into jdbc string like &authenticator=snowflake_jwt.
  6. Add driver property private_key_file. Set driver property type to “File”. Check the box “Encrypted”. Finally, upload your private key.

     

  7. Test your connection to make sure everything is working ✅

Hope this helps!


Reply