Skip to content

SNOW-1909756: Unable to connect with key pair authentication #2061

@tosehee

Description

@tosehee

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using? -> 3.22.0

  2. What operating system and processor architecture are you using? Mac OSX

  3. What version of Java are you using? Java 17

  4. What did you do?

I am using the Hikari + Snowflake JDBC Drivers to connect using key pair authentication.

config.addDataSourceProperty("private_key_base64", privateKey);
config.addDataSourceProperty("private_key_pwd", privateKeyPw);

where "config" is the HikariHikariConfig.

When trying to connect, I get the following error.

Caused by: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: Private key provided is invalid or not supported: net.snowflake.client.jdbc.internal.org.bouncycastle.operator.OperatorCreationException: 1.2.840.113549.1.5.13 not available: Wrong algorithm: DESede or TripleDES required
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initialize(DefaultSFConnectionHandler.java:136) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initializeConnection(DefaultSFConnectionHandler.java:104) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.SnowflakeConnectionV1.initConnectionWithImpl(SnowflakeConnectionV1.java:155) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.SnowflakeConnectionV1.(SnowflakeConnectionV1.java:132) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]

  1. What did you expect to see?

Connect to Snowflakes DB.

  1. Can you set logging to DEBUG and collect the logs?

Caused by: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: Private key provided is invalid or not supported: net.snowflake.client.jdbc.internal.org.bouncycastle.operator.OperatorCreationException: 1.2.840.113549.1.5.13 not available: Wrong algorithm: DESede or TripleDES required
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initialize(DefaultSFConnectionHandler.java:136) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.DefaultSFConnectionHandler.initializeConnection(DefaultSFConnectionHandler.java:104) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.SnowflakeConnectionV1.initConnectionWithImpl(SnowflakeConnectionV1.java:155) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]
at net.snowflake.client.jdbc.SnowflakeConnectionV1.(SnowflakeConnectionV1.java:132) ~[snowflake-jdbc-3.22.0.jar!/:3.22.0]

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions