Newly Generated Private Keys are not Being Accepted by Live Snowflake Connection
Newly Generated Private Keys are not Being Accepted by Live Snowflake Connection
What to do when you add new private keys to a Live Snowflake connection and receive an Error: "Unsupported type of UI property in the connection string to UI mapping".
When you rotate credentials for live connections and generate new private keys, you may encounter situations when these new keys are not accepted. Usually, the UI error is:
"Unsupported type of UI property in the connection string to UI mapping". However, despite the issue being related to key-authentication the UI error can be "Missing password" as well.
In most cases the root cause is the following:
The Snowflake connector in Sisense only supports keys generated via a `pbeWithMD5AndDES-CBC` algorithm. Therefore, the keys cannot be accepted when the private key used to authenticate to Snowflake is the `des3` encryption algorithm.
You may check the key's encryption algorithm using the command:
openssl asn1parse -inform PEM -in rsa_key.p8 -i
How to fix this issue:
1) Install libressl with brew (visit Homebrew website for the currently valid installation command)
2) Ensure openssl uses libressl on the backend
You can do this by using the command openssl version
You should see libressl version as an output if openssl uses libressl on the backend
If not, you can do this via this command, run once for a session, or added to
~/.zshrc: export PATH="/opt/homebrew/opt/libressl/bin:$PATH"
3)Generate a private key using the alternative algorithm:
openssl genrsa 2048 | openssl pkcs8 -topk8 -v1 pbeWithMD5AndDES-CBC -inform PEM -out rsa_key.p8
You will be asked to insert an encryption password, and then insert it again verifying it.
4)Generate a public key from this:
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub
You will be asked to insert the passphrase. After you do so and press Enter, the keys will be generated
You may use ‘ls’ command to check that the keys are indeed generated
5)Update the user's public key in Snowflake
6)Add the private key to Sisense, and pass it into the connection string