-
Notifications
You must be signed in to change notification settings - Fork 174
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
SNOW-899319: Encrypted Private Key connection not working #1499
Comments
@Dionakra Have you had a chance to test? |
Hi @Dionakra , I am able to reproduce this on Ubuntu 22.04. This works with OpenJDK 19 and OpenSSL 3.x generated rsa:
|
Hi @sfc-gh-spanaite , I came to the same conclusion as I saw that the Snowflake Kafka Connector worked for us as intended, but the docs for generating the Key-Pair are a bit different that the general one. The JDBC docs link to this document, but the Kafka Connect docs don't link to that document, they re-write it because, I guess, the team responsible for the Kafka Connect already knew that the JDBC docs weren't working for them. And if you take a look at the Snowflake Kafka Connect source code, you will be able to see that they perform some custom encryption stuff to get it working in older Java versions, as the connector works fine in a Kafka Connect cluster with Java 11 for example. So I guess this should be put in some docs? We migrated to Java 21 as it just hit LTS and it solved our issue, but this should be disclosed in Snowflake's docs. |
Thanks, @Dionakra for this good feedback. Let me circle it back internally. |
I was trying to use key-pair as described in section private-key-file-name-and-password-as-connection-properties. {
private_key_file=/Users/radhe.soni/work/CDP-Platform/key-pair/RSONI_without.p8,
private_key_file_pwd=yes,
application=DBeaver_DBeaver,
authenticator=snowflake, user=RSONI
}
![]()
![]()
![]() ![]()
|
PR #1671 addresses the original issue reported:
@radhe-kishan can I ask you to open a separate issue, please? What you're describing is a different problem and I'll need to look into that a bit more to see what's going on because I haven't personally run into that issue when I was working on that PR I mentioned. I was running tests using keypair authentication and I don't believe I was providing a user password, but it's not something I looked at too closely. Closing this since the original issue is going to be addressed in the next JDBC release. |
1. What version of JDBC driver are you using?
3.14.0
2. What operating system and processor architecture are you using?
MacOs Ventura 13.4.1, Intel
3. What version of Java are you using?
Java 17
4. What did you do?
I tried to connect to Snowflake using a Spring Boot application with Encripted Key-Pair authentication. When trying to do it, it throws the following error:
Private key provided is invalid or not supported: [REDACTED]: PBE parameter parsing error: expecting the object identifier for AES cipher
I generated the Key-Pair as per the docs and added the public key to the user, but it doesn't work. If I repeat the steps, but with an unencrypted Key-Pair, it works.
My
OpenSSL
version info is the following:5. What did you expect to see?
A connection to Snowflake, as it occurs when using Unencripted Key-Pair authentication.
The text was updated successfully, but these errors were encountered: