-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add hostnameInCertificate JDBC property #17939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Can you add some tests? |
9249c14 to
fb9d503
Compare
kokosing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please provide tests?
client/trino-client/src/main/java/io/trino/client/OkHttpUtil.java
Outdated
Show resolved
Hide resolved
client/trino-client/src/main/java/io/trino/client/OkHttpUtil.java
Outdated
Show resolved
Hide resolved
fb9d503 to
e7d4686
Compare
|
Test case added. Addressing other comments! |
e7d4686 to
7f0c6c5
Compare
|
Comments addressed! |
7f0c6c5 to
9031cf4
Compare
client/trino-client/src/main/java/io/trino/client/OkHttpUtil.java
Outdated
Show resolved
Hide resolved
client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDriverAuth.java
Outdated
Show resolved
Hide resolved
9031cf4 to
a6bf4fa
Compare
a6bf4fa to
72b3b4d
Compare
|
Failed check seems to have succeeded. |
kokosing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% comments
client/trino-client/src/main/java/io/trino/client/OkHttpUtil.java
Outdated
Show resolved
Hide resolved
client/trino-jdbc/src/main/java/io/trino/jdbc/ConnectionProperties.java
Outdated
Show resolved
Hide resolved
client/trino-jdbc/src/test/java/io/trino/jdbc/TestTrinoDriverAuth.java
Outdated
Show resolved
Hide resolved
e5eb9f0 to
a9b5730
Compare
|
All comments addressed and the one cancelled check shows as succeeding in the logs. Let me know if you have any questions or if we could get an authorized maintainer to merge! |
|
@electrum Do you want to take a look? |
kokosing
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please suggest the release notes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can you please merge try statements? Same above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
a9b5730 to
0de5aa3
Compare
Something along the lines of "Allow verification of alternative hostname for Full SSL Verification of JDBC Driver" would be great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connection and Statement needs to be closed. By merging try statements I meant:
try (Connection connection = DriverManager.getConnection(url, properties);
Statement statement = connection.createConnection()) {
I have noticed that this how other tests are implemented in this class. So can you please that other try blocks are also improved in preparatory commit before the main change of your PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do!
adds hostnameInCertificate connection property for JDBC driver.
0de5aa3 to
3d623b5
Compare
|
Thanks! @thepetlyon would you like to provide documentation changes for this? |
|
Sure! All that we need to add will be in the Parameter Reference in the JDBC Driver Documentation:
|
|
Agreed @thepetlyon .. please send a PR for the documentation. |
Description
adds hostnameInCertificate connection property for JDBC driver.
Additional context and related issues
Our system requires calling one of multiple separate servers with a different hostname than the final Trino host. For maximum security we still want the benefits of full SSL verification with hostname validation and do not want to use CA validation only.
This property is available in other JDBC drivers such as SqlServer and SAP HANA - documentation linked below.
Release notes
JDBC
hostnameInCertificateproperty.