sqltools-snowflake-driver
sqltools-snowflake-driver copied to clipboard
OpenSSL Unknown Algorithm
Using keypair auth:
[1618273502356] ERROR (ext): ERROR: Error opening connection error:13000077:PKCS8 routines:OPENSSL_internal:UNKNOWN_ALGORITHM, {"code":-32001,"data":{"driver":"Snowflake","driverOptions":{}}}
Private key was generated using LibreSSL 2.8.3 in PKCS8 format
Same error message for me. Key works everywhere else I use it (DBeaver, snowsql, dbt, etc).
Same here. Anyone found a fix for this?
If it's of any help, here's some possible details and possible workaround I found. Below are my notes from a year or so ago, so this is all I can offer, I don't remember other details
Specify the -v2 aes-256-cbc
cipher algorithm when generating the private key.
This only appears to be required for MacOS and/or LibreSSL (the OpenSSL
implementation shipped with MacOS).
openssl genrsa -out snowflake_key 4096
openssl rsa -in snowflake_key -pubout -out snowflake_key.pub
openssl pkcs8 -topk8 -inform pem -in snowflake_key -outform PEM -v2 aes-256-cbc -out snowflake_key.p8
See https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs#keypair-authentication-passhrase
And also see Google search results for snowflake macos openssl libressl encrypt
.
I saw this when I was using "snowflake-sdk" npm module in my project. The fact this also uses it (I haven't used sqltools-snowflake-driver, or know anything about it, was just linked here and wanted to provide some possible help) is a bit suspicious. The root cause points to "snowflake-sdk" by this reasoning.
Has anyone found a workaround to this issue? I still see the same situation: