SNOW-1279620: Error: Could not read private key with value passed in connection string. \n Error : incorrect private key value or private key format #903
Labels
bug
status-information_needed
Additional information is required from the reporter
status-triage
Issue is under initial triage
Main Issue
My issue is that the private key is not being read for some reason. I've included a sample project below and the format of my key file that is being read.
My main question is: how do I get my private key to be read properly?
My secondary question would be if there are character limitations on the passphrase for the file.
I have already read #587 and it didn't help. I'm at a loss, as no matter what I do it seems the key isn't being read properly. I'm assuming the issue is with the key, but I can't confirm this (I'm working with a key shared with me)
1. What version of .NET driver are you using?
3.1
2. What operating system and processor architecture are you using?
Windows 11, x64
3. What version of .NET framework are you using?
.NET 6
4. What did you do?
I have a runnable program - repo link is here:
https://github.com/jamespfluger-ava/snowflake-privatekey
Program.cs
:SnowflakePrivateKey.csproj
:This uses the the private key file (does not contain any equals sign) with the exact format of
5. What did you expect to see?
Expect: to have a connection open to Snowflake and the text
Connection successful!
printed to the consoleInstead: I receive a
Snowflake.Data.Client.SnowflakeDbException
with this message:With this stack trace:
Inner exception is an
Org.BouncyCastle.Crypto.InvalidCipherTextException
:Inner exception stack trace:
6. Can you set logging to DEBUG and collect the logs?
Yes, but they are empty. Log files in the format
snowflake_dotnet_XXXXXX.log
are created, but do not have ANY contents (at all) whenlog_level
is set toDEBUG
orTRACE
using Easy Logging and theCLIENT_CONFIG_FILE
According to a coworker, there are no logs of an attempted connection, so it seems the issue is that the key isn't being read properly.
The text was updated successfully, but these errors were encountered: