-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
HIVE-27271: Client connection to HS2 fails when transportMode=http, ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL #4262
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…sl=true, sslTrustStore specified without trustStorePassword in the JDBC URL
dengzhhu653
approved these changes
Apr 25, 2023
Kudos, SonarCloud Quality Gate passed! |
yeahyung
pushed a commit
to yeahyung/hive
that referenced
this pull request
Jul 20, 2023
…sl=true, sslTrustStore specified without trustStorePassword in the JDBC URL Closes apache#4262
pan3793
pushed a commit
to apache/kyuubi
that referenced
this pull request
Nov 17, 2023
…en transportMode=http, ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL # 🔍 Description Backport apache/hive#4262 ## Issue References 🔗 This pull request fixes ##5713 ## Describe Your Solution 🔧 trustStorePassword is not a necessary parameter in connection URL. Connection can be established without it. From the javadocs [Link](https://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html#load(java.io.InputStream,%20char%5B%5D)) A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed. In order to create an empty keystore, or if the keystore cannot be initialized from a stream, pass null as the stream argument. Reference PR comes from HIVE-27271 ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklists ## 📝 Author Self Checklist - [ ] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project - [ ] I have performed a self-review - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) ## 📝 Committer Pre-Merge Checklist - [x] Pull request title is okay. - [x] No license issues. - [x] Milestone correctly set? - [ ] Test coverage is ok - [x] Assignees are selected. - [x] Minimum number of approvals - [x] No changes are requested **Be nice. Be informative.** Closes #5712 from dev-lpq/ssl_http_store. Closes #5713 c1011e4 [pengqli] Support client connection when transportMode=http,ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL Authored-by: pengqli <[email protected]> Signed-off-by: Cheng Pan <[email protected]>
pan3793
pushed a commit
to apache/kyuubi
that referenced
this pull request
Nov 17, 2023
…en transportMode=http, ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL # 🔍 Description Backport apache/hive#4262 ## Issue References 🔗 This pull request fixes ##5713 ## Describe Your Solution 🔧 trustStorePassword is not a necessary parameter in connection URL. Connection can be established without it. From the javadocs [Link](https://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html#load(java.io.InputStream,%20char%5B%5D)) A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed. In order to create an empty keystore, or if the keystore cannot be initialized from a stream, pass null as the stream argument. Reference PR comes from HIVE-27271 ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklists ## 📝 Author Self Checklist - [ ] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project - [ ] I have performed a self-review - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) ## 📝 Committer Pre-Merge Checklist - [x] Pull request title is okay. - [x] No license issues. - [x] Milestone correctly set? - [ ] Test coverage is ok - [x] Assignees are selected. - [x] Minimum number of approvals - [x] No changes are requested **Be nice. Be informative.** Closes #5712 from dev-lpq/ssl_http_store. Closes #5713 c1011e4 [pengqli] Support client connection when transportMode=http,ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL Authored-by: pengqli <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit 0bcd107) Signed-off-by: Cheng Pan <[email protected]>
pan3793
pushed a commit
to apache/kyuubi
that referenced
this pull request
Nov 17, 2023
…en transportMode=http, ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL # 🔍 Description Backport apache/hive#4262 ## Issue References 🔗 This pull request fixes ##5713 ## Describe Your Solution 🔧 trustStorePassword is not a necessary parameter in connection URL. Connection can be established without it. From the javadocs [Link](https://docs.oracle.com/javase/7/docs/api/java/security/KeyStore.html#load(java.io.InputStream,%20char%5B%5D)) A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed. In order to create an empty keystore, or if the keystore cannot be initialized from a stream, pass null as the stream argument. Reference PR comes from HIVE-27271 ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklists ## 📝 Author Self Checklist - [ ] My code follows the [style guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html) of this project - [ ] I have performed a self-review - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) ## 📝 Committer Pre-Merge Checklist - [x] Pull request title is okay. - [x] No license issues. - [x] Milestone correctly set? - [ ] Test coverage is ok - [x] Assignees are selected. - [x] Minimum number of approvals - [x] No changes are requested **Be nice. Be informative.** Closes #5712 from dev-lpq/ssl_http_store. Closes #5713 c1011e4 [pengqli] Support client connection when transportMode=http,ssl=true, sslTrustStore specified without trustStorePassword in the JDBC URL Authored-by: pengqli <[email protected]> Signed-off-by: Cheng Pan <[email protected]> (cherry picked from commit 0bcd107) Signed-off-by: Cheng Pan <[email protected]>
tarak271
pushed a commit
to tarak271/hive-1
that referenced
this pull request
Dec 19, 2023
…sl=true, sslTrustStore specified without trustStorePassword in the JDBC URL Closes apache#4262
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
keyStore.load() is invoked with null password when the trustStorePassword is not passed in JDBC URL.
Why are the changes needed?
Client connection to HS2 fails with transportMode as http, ssl is enabled, sslTrustStore is specified without trustStorePassword in the JDBC URL. trustStorePassword is not a necessary parameter in connection URL. Connection can be established without it.
From the javadocs Link A password may be given to unlock the keystore (e.g. the keystore resides on a hardware token device), or to check the integrity of the keystore data. If a password is not given for integrity checking, then integrity checking is not performed.
At present, org.apache.hive.jdbc.HiveConnection#getHttpClient() access sslTrustStorePassword null reference(NPE) and fails.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Verified manually with cluster