1. Generate an RSA Private Key
Generate a 2048 or 4096-bit RSA private key:
# 2048-bit (fast, secure enough for most uses)
openssl genrsa -out rsa_key.pem 2048
# Or 4096-bit (stronger, slower)
openssl genrsa -out rsa_key.pem 4096
First, create an unencrypted PKCS#8 key:
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in rsa_key.pem -out rsa_key.p8
Then, create an encrypted PKCS#8 key (Humm prefers encrypted keys):
openssl pkcs8 -topk8 -inform PEM -outform PEM -in rsa_key.pem -out rsa_key_encrypted.p8 -passout pass:YOUR_PASSPHRASE
openssl rsa -in rsa_key.pem -pubout -out rsa_key.pub
4. Secure the Private Key File
chmod 600 rsa_key.p8
# or
chmod 600 rsa_key_encrypted.p8
Store the private key file somewhere safe. Do not commit it to git.
5. Upload the Public Key to Snowflake
Open Snowflake with a role that has user-admin rights and add the public key to the user that will authenticate.
Copy the full contents of rsa_key.pub (including the header and footer lines) and run:
ALTER USER <YOUR_SNOWFLAKE_USER>
SET RSA_PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkq... (rest of key) ...
-----END PUBLIC KEY-----';
6. Upload the Private Key to Humm
- Log into Humm and create a Snowflake integration
- Choose Private Key as the authentication method
- Upload the private key (
.p8 file)
- Enter the passphrase if you created an encrypted key