Mithun Vishwakarma Posted May 8 Share Posted May 8 Currently I am facining issue in configuring key pair authentication in setting up data connection, I have confirfured encrypted key path and provided path in datasource template and i am getting issue on invalid configuration. Please can anyone help if you have allready configured key pair authenticaiton. ? Datasource template: <jdbc-type-settings> <type-name>Snowflake</type-name> <driver>net.snowflake.client.jdbc.SnowflakeDriver</driver> <connection-url-pattern>jdbc:snowflake://<ACCOUNT>.snowflakecomputing.com</connection-url-pattern> <supports-catalogs>true</supports-catalogs> <supports-schemas>true</supports-schemas> <supports-procedures>false</supports-procedures> <fetch-size>10000</fetch-size> <batch-size>100</batch-size> <use-ansii-style-outer-join>true</use-ansii-style-outer-join> <connection-properties> <connection-property> <key>rsa_key_unencrypted.p8</key> <value>E:\tibco\tss\12.0.9\tomcat\certs\</value> </connection-property> </connection-properties> </jdbc-type-settings> Information link designer connection URL jdbc:snowflake://xxxxx.snowflakecomputing.com/?private_key_file=E:\tibco\tss\12.0.9\tomcat\certs\rsa_key_unencrypted.p8&authenticator=snowflake_jwt&User=USER_ID Link to comment Share on other sites More sharing options...
Peter McKinnis Posted May 8 Share Posted May 8 Mithun, According to the Java stacktrace in the log file which you provided via email, the Snowflake JDBC driver is rejecting the connection string: -------- Caused by: net.snowflake.client.jdbc.SnowflakeSQLException: Connection string is invalid. Unable to parse. at net.snowflake.client.jdbc.SnowflakeDriver.connect(SnowflakeDriver.java:185) ~[snowflake-jdbc-3.14.2.jar:3.14.2] --------- I suggest the following changes: (1) Remove the <connection-property> with the rsa_key_unencrypted.p8 from the data source template. rsa_key_unencrypted.p8 is not a valid property for the Snowflake driver. (2) Based on searching the web, I always see examples of the Snowflake private key including private_key_file and private_key_file_pwd in the connection string. You can check with Snowflake to see if both are required or not. (3) Recommend using a unix path separator since Java will be parsing the path, e.g. E:/tibco/tss/12.0.9/tomcat/certs/rsa_key_unencrypted.p8, again Snowflake should tell you what the driver is expecting. Since the error is coming from the Snowflake driver, Snowflake should be able to guide you on what is expected by the JDBC driver. Regards, Peter P.S. I sent the above information to you in an email too last week and not sure if you received it or not. Link to comment Share on other sites More sharing options...
Rajesh Kumar 10 Posted July 30 Share Posted July 30 On 5/8/2024 at 10:04 AM, Mithun Vishwakarma said: cator=snowflake_ Hi Mithun Are you able to connect Snowflake using key pair authentication? Can you please share some details how did you resolve it. Thanks, Rajesh Link to comment Share on other sites More sharing options...
Rajesh Kumar 10 Posted July 30 Share Posted July 30 On 5/8/2024 at 10:04 AM, Mithun Vishwakarma said: cator=snowflake_ Hi Mithun Are you able to connect Snowflake using key pair authentication? Can you please share some details how did you resolve it. Thanks, Rajesh Link to comment Share on other sites More sharing options...
Rajesh Kumar 10 Posted July 30 Share Posted July 30 I am getting below error. Cannot connect to data source 'SnowfDS', due to invalid configuration or that the data source is not running. Database reported: Illegal configuration: empty password Can you also share your working data source template and Snowflake JDBC driver version? Link to comment Share on other sites More sharing options...
Mahesh Ankaraju Posted August 20 Share Posted August 20 Is this issue resolved? Mithun, were you able to connect to snowflake using key pair? Link to comment Share on other sites More sharing options...
Peter McKinnis Posted August 22 Share Posted August 22 Mahesh, We resolved the issue a while ago. I would recommend looking at the Snowflake Configuring the JDBC Driver documentation. If you look at the "Private key file name and password in connection string" section, you can use this pattern to set the Connection URL in Spotfire Information Services Data Source creation. Example: jdbc:snowflake://mysnowflakedb.snowflake.com/?private_key_file=/tmp/rsa_key.p8&private_key_file_pwd=mypassword The key pair file properties only need to be set in the connection url. The Spotfire data source template does not need any connection-properties set in it. Regards, Peter 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now