-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove extra newline from private key check #335
Comments
hi, thank you for submitting this issue and pinpointing where it happens. Checked and it seems that both the however if one would paste the private key as a literal and try to use that with |
Thanks David :) |
PR is now merged and will be part of the next release; expected towards end of July |
PR is released as part of the latest Snowflake Node.JS driver version 1.7.0. Closing this issue. |
Releng team hit a bump in the release process which will be continued on Monday as expected. Reopening the issue and will only close when artifact confirmed to published to npm. Apologies for the inconvenience. |
PR is released as part of the latest Snowflake Node.JS driver version 1.7.0, for real this time :) Visible on |
What did you do?
Didn't have an extra newline in my private key in my credentials.
What did you expect to see?
It not to matter.
What did you see instead?
InvalidParameterError: Invalid private key. The specified value must be a string in pem format of type pkcs8
This took a lot of debugging to check if the key encryption was OK and the format could be read by OpenSSL, but it turned out to just be the lack of a newline.
The culprit is
isPrivateKey
in lib/utils.jssnowflake-connector-nodejs/lib/util.js
Lines 153 to 158 in 5bd5c13
which requires a newline at the end, and I can't imagine why it's necessary.
You've already got a regex based private key detector here
snowflake-connector-nodejs/lib/secret_detector.js
Line 72 in 7b3eaa9
The text was updated successfully, but these errors were encountered: