[Bug]: Snowflake Keypair connection does not work
Describe the bug
Cannot connect to snowflake using Keypair (JWT) Also this connection method should be called Keypair as this is what snowflake call it in their docs
Steps to Reproduce
Try to connect using a keypair
Test connection.
Error
error:1E08010C:DECODER routines::unsupported
Logs
System Info
No response
Severity
blocking all usage of Evidence
Additional Information, or Workarounds
I suspect something to do with newlines in the private key
@ItsMeBrianD and I did some investigation here and we suspect the browser is stripping the newline characters from the private key when you paste them in
I suspect this is because we are using the wrong field type in our form to collect the private key. I think we need to use a <textArea/> not an <input type=text/>
eg dbt: https://docs.getdbt.com/docs/cloud/connect-data-platform/connect-snowflake
Potential Workaround
- open your private key file in a text editor that supports regex find and replace
- replace
\nwith\\n - paste the result into your form field
this should replace actual newline characters with the escape sequence for newline characters , (which wont be stripped by the browser)
The long-term solution is adding support for textarea inputs when defining the options for a datasource (as noted above). This should remain distinct from the default text-box that we are using now, and should probably be denoted with a multiline: true or long: true field.
I get the same error when using a .env (not using browser)
and putting key in one line and using \\n doesn't resolve it
[ ! ] Error connecting to datasource bpe: error:1E08010C:DECODER routines::unsupported
Hey hey, I experience the same issue. What is confusing: when entering values in evidence UI - it works
but once I am trying to run sources in terminal I get same error as mentioned above:
[Processing] snowflake_rsa [ ! ] Error connecting to datasource snowflake_rsa: error:1E08010C:DECODER routines::unsupported