evidence icon indicating copy to clipboard operation
evidence copied to clipboard

[Bug]: Snowflake Keypair connection does not work

Open archiewood opened this issue 1 year ago • 3 comments

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

CleanShot 2024-06-17 at 17 15 32@2x

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

archiewood avatar Jun 17 '24 21:06 archiewood

@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

  1. open your private key file in a text editor that supports regex find and replace
  2. replace \n with \\n
  3. 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)

archiewood avatar Jun 17 '24 22:06 archiewood

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.

ItsMeBrianD avatar Jul 22 '24 14:07 ItsMeBrianD

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

jamesohare84 avatar Jul 24 '24 08:07 jamesohare84

Hey hey, I experience the same issue. What is confusing: when entering values in evidence UI - it works image 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

pinkiguanna avatar Aug 30 '24 10:08 pinkiguanna