You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Qihua Yang <ya...@gmail.com> on 2021/10/23 05:07:44 UTC
Flink JDBC connect with secret
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
Re: Flink JDBC connect with secret
Posted by Qihua Yang <ya...@gmail.com>.
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 <be...@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 <ya...@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
>>
>
Re: Flink JDBC connect with secret
Posted by JING ZHANG <be...@gmail.com>.
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 <ya...@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
>