Open gautam-goudar opened 3 weeks ago
hi and thanks for raising this issue with us, will take a look
I was able to find the root cause finally. The problem is with the way a passphrase is read locally and in k8s by the same code base.
What was shared with me was
[redacted]v\"qS[redacted]
The actual working one is (without the \ )
[redacted]v"qS[redacted]
I suppose the \ interpretation when running locally vs in k8s is different. Locally, the code is able to understand that \ is required for the = character in the passphrase.
But, what was very mis-leading was the error that was being displayed by the library
\n Error : incorrect private key value or private key format: use "\n" for newlines and double the equals sign. SqlState: , VendorCode: 270052, QueryId: )
Thanks.
glad you figured this out and even shared the solution. apologies, did not have the time yet to set up a repro, you were much quicker than that ;) guess we can enhance the error message to provide more useful pointers.
Please answer these questions before submitting your issue. In order to accurately debug the issue this information is required. Thanks!
What version of .NET driver are you using? Snowflake.Data - 3.1.0
What operating system and processor architecture are you using? macOS Sonoma Version 14.5
What version of .NET framework are you using? .net core 7.0.314
What did you do?
I have the below code to connect to Snowflake and run a query
What did you expect to see?
Running locally, using VS Code, I am able to connect and fetch the results successfully as expected.
However, when the app is deployed to k8s, I see the below error, when the same certificate file (or it's contents) are used to query Snowflake
I have tried using both "PRIVATE_KEY" and "PRIVATE_KEY_FILE" and they both result in the pad block corrupted error when running from k8s.
I used the below docker ADD command to copy the p8 file during the application deployment. Both COPY and ADD end up in the same above error
Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
There is an example in READMD.md file showing you how to enable logging.
What is your Snowflake account identifier, if any? (Optional)