Key Pair Authentication
In this tutorial we will show how to setup a user with key pair authentication. We will then use a python example to connect to our account and run a simple query.
For the official Snowflake documentation this tutorial was based on: https://docs.snowflake.com/en/user-guide/key-pair-auth
Video
Requirement
This tutorial assumes you have nothing in your Snowflake account (Trial) and no complex security needs.
Create Key
Lets create the private and public key so that we can apply the public key to our user.
This will create two files in the folder we are currently located.
Apply key to user
Lets apply the public key to our user in Snowflake. The public key file will end with .pub
.
status |
---|
Statement executed successfully. |
With our key now set on the user, we might want to test it via local python. Here is a tutorial to test it.