Prerequisites
To generate the JWT token for configuring the Snowflake Cortex AI Connector, the following prerequisites must be met:
- •Generate the private key and the public key
- - To generate a private key, run the following command in your terminal window:
openssl genrsa -out rsa_key.pem 2048
- - To generate a public key, run the following command in your terminal window:
openssl rsa -in rsa_key.pem -pubout -out rsa_public.pem
- •Find the user name in Snowflake
To get the user name, run the following query in the Snowflake Web UI:
SELECT CURRENT_USER();
- •Alter the user and set the generated public key
To alter the user, run the following query in the Snowflake Web UI:
ALTER USER [USER_NAME] SET RSA_PUBLIC_KEY='[Public_KEY_Value]';
For example, ALTER USER example_user SET RSA_PUBLIC_KEY='MIIBIjANBgkqh...';
- •Find the account identifier in Snowflake
To get the account identifier, run the following query in the Snowflake Web UI:
SELECT CURRENT_ORGANIZATION_NAME() || '-' || CURRENT_ACCOUNT_NAME();
- •Get the public key fingerprint
To get the public key fingerprint, run the following query in the Snowflake Web UI:
DESC USER [USER_NAME]