Hi Jing, Thank you for your suggestion. I will check if SSL parameters in URL works.
Thanks, Qihua On Sat, Oct 23, 2021 at 8:37 PM JING ZHANG <beyond1...@gmail.com> wrote: > Hi Qihua, > I checked user documents of several database vendors(postgres, oracle, > solidDB,SQL server)[1][2][3][4][5], and studied how to use JDBC Driver with > SSL to connect to these databases. > Most of database vendors supports two ways: > 1. Option1: Use Connection url > 2. Option2: Define in Properties when call `DriverManager.getConnection` > > Url is exposed to users in JDBC SQL connector currently, while properties > parameters are not exposed yet. > Would you please check whether defining SSL parameters in url could work > first? If not, we would looking for other solution. > > [1] https://jdbc.postgresql.org/documentation/head/connect.html > [2] > https://www.oracle.com/technetwork/topics/wp-oracle-jdbc-thin-ssl-130128.pdf > [3] > https://support.unicomsi.com/manuals/soliddb/100/index.html#page/Administrator_Guide/6_Managing_network.07.13.html > [4] > https://docs.microsoft.com/en-us/sql/connect/jdbc/connecting-with-ssl-encryption?view=sql-server-ver15 > [5] > https://www.ibm.com/docs/ar/informix-servers/14.10?topic=options-connecting-jdbc-applications-ssl > > Best, > JING ZHANG > > > Qihua Yang <yang...@gmail.com> 于2021年10月23日周六 下午1:11写道: > >> Hi, >> >> We plan to use JDBC SQL connector to read/write database. I saw JDBC >> connector use username and password. Is it possible to use secret(*.crt) to >> access database. I didn't find guideline how to use it. How to config jdbc >> with secret? >> >> val jdbc: JdbcConnectionOptions = >> JdbcConnectionOptions.JdbcConnectionOptionsBuilder() >> .withUrl(url) >> .withDriverName("org.postgresql.Driver") >> .withUsername(userName) >> .withPassword(password) >> .build() >> >> Thanks, >> Qihua >> >