michelin / snowflake-grafana-datasource

Snowflake Grafana datasource plugin enables the visual representation of Snowflake data within Grafana dashboards and manages alerts.
Apache License 2.0
67 stars 33 forks source link

The private key of base64 URL encoded pkcs8 #38

Closed mingtao13595 closed 1 year ago

mingtao13595 commented 1 year ago

Thanks for this increidible plugin for visualizing snowflake data on Grafana. I've successfully installed and tested my snowflake acount with multi-factor authentication (i.e. MFA). But it needs Approval each time for testing SQL and refreshing visualizations, which is inconveniently for me. Since Key Pair Authentication will be more silently and the keys obtained by the way below works well for SnowSQL. https://docs.snowflake.com/en/user-guide/key-pair-auth.html However, neither manually converting "+" to "-" and "\" to "_" and remove "\n" as told, nor the methods given in readme, it gives the same error as follow. The private key is generated as RSA2048, is it means impossible to conver rsa2048 to base64 URL ? In addition, the private key was generated as follow. $ openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 Thank you in advance!

egrep -v '^(-----BEGIN PRIVATE KEY|-----END PRIVATE KEY)' rsakey.p8 | tr -d '\n' | sed 's/+/-/g; s/\///g' > rsa_key_urlbase64.p8 image

mingtao13595 commented 1 year ago

Generating private key again as the method SNOWFLAKE told as follow. It works well! sorry for this issue. please close it. Thank you! $ openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt

devnied commented 1 year ago

Thanks for your feedback.