I am using snowflake-jdbc to make a connection to snowflake database
below is the library
<!-- https://mvnrepository.com/artifact/net.snowflake/snowflake-jdbc -->
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>3.13.11</version>
</dependency>
Driver properties are set below.
String url = "jdbc:snowflake://<account_identifier>.snowflakecomputing.com";
Properties prop = new Properties();
prop.put("user", "<user>");
props.put("private_key_file", "/tmp/rsa_key.p8");
props.put("private_key_file_pwd", "dummyPassword");
prop.put("db", "<database_name>");
prop.put("schema", "<schema_name>");
prop.put("warehouse", "<warehouse_name>");
prop.put("role", "<role_name>");
Connection conn = DriverManager.getConnection(url, prop);
Statement stat = conn.createStatement();
ResultSet res = stat.executeQuery("select 1");
res.next();
System.out.println(res.getString(1));
conn.close();
When I test on my local PC, I am able to make a connection but when I deployed on AWS ECS(docker) I am getting the below error when I tried to make a connection
private key provided is invalid or not support 1.2.840.113549.1.5.13 secretkeyfactory not available I checked all paths and verified that there is private_key file in the specified path.
is there anything missing from config?