Add a new connection to Snow CLI that will use the key pair authentication.
NOTE: The Snowflake user that will be added to the connection can have MFA and/or SSO enabled as these options do not conflict with key pair authentication.
2
Install SnowCLI
Copy
Ask AI
pip install -U snowflake-cli-labs
3
Create The Connection
Add a new connection to SnowCLI by running
Copy
Ask AI
snow connection add
Provide a name
Copy
Ask AI
GENESIS_SYSTEM_DATA
Enter the account name (format of <region>-<account_name>)
Copy
Ask AI
dshrnxx-genesis-consumer
Enter the Snowflake user name
Copy
Ask AI
michael.rainey@genesiscomputing.ai
Role for the connection
Copy
Ask AI
accountadmin (or other role that has the application role GENESIS_BOTS.APP_PUBLIC granted to it)
All other settings are blank until…
Authentication method
Copy
Ask AI
SNOWFLAKE_JWT
Path to private key file
Copy
Ask AI
/Users/mrainey/Documents/keys/rsa_key.p8
Output Example
The output will look like the following
Copy
Ask AI
snow connection addName for this connection: GENESIS_SYSTEM_DATASnowflake account name: dshrnxx-genesis-consumerSnowflake username: michael.rainey@genesiscomputing.aiSnowflake password [optional]: Role for the connection [optional]: accountadminWarehouse for the connection [optional]: Database for the connection [optional]: Schema for the connection [optional]: Connection host [optional]: Connection port [optional]: Snowflake region [optional]: Authentication method [optional]: Path to private key file [optional]: /Users/mrainey/Documents/keys/rsa_key.p8Wrote new connection provider-genesis-aws-west to /Users/mrainey/Library/Application Support/snowflake/config.toml
NOTE: Check your config.toml file, it should look like this