How Can I Avoid Connection Issues When Switching to Key-Pair Authentication in Snowflake?
Question
I want to switch from username and password to key pair authentication in Snowflake. How can I avoid connection issues during the transition?
Environment
Destination: Snowflake
Answer
To avoid connection issues when switching to key-pair authentication in Snowflake, do the following:
In Snowflake, configure a private-public key-pair. To learn how, see the Snowflake key-pair authentication documentation.
Assign the public key to the relevant Snowflake user by running the following command. Replace the placeholders
<username>
and<public_key>
with the actual values:ALTER USER <username> SET RSA_PUBLIC_KEY='<public_key>';
In Fivetran, update your destination's authentication mode.
i. Go to your Snowflake destination page.
ii. In the top right, click Actions and then click Edit connection details.
iii. Change the authentication mode from PASSWORD to KEY-PAIR.
iv. Enter your Private Key in the following format, replacing the placeholder
<private_key>
with the actual value:-----BEGIN PRIVATE KEY----- <private_key> -----END PRIVATE KEY-----
If you use an encrypted private key, set the Is Private Key encrypted toggle to ON, then enter your Passphrase.
v. Click Save & Test.
Switching authentication methods doesn't trigger a full re-sync.