[KYUUBI #3222][FOLLOWUP] Fixing placeholder and config of user in JDBC Authentication Provider#3288
Closed
bowenliang123 wants to merge 25 commits into
Closed
[KYUUBI #3222][FOLLOWUP] Fixing placeholder and config of user in JDBC Authentication Provider#3288bowenliang123 wants to merge 25 commits into
bowenliang123 wants to merge 25 commits into
Conversation
…ig name `kyuubi.authentication.jdbc.user`, 2. use ${user} placeholder instead of ${username}
…add ut for the fix.
Contributor
Author
|
@pan3793 Please have a look and I suggest to merge it to v1.6.0 and master. |
3 tasks
bowenliang123
commented
Aug 20, 2022
3 tasks
Codecov Report
@@ Coverage Diff @@
## master #3288 +/- ##
============================================
+ Coverage 51.37% 51.42% +0.05%
Complexity 13 13
============================================
Files 469 469
Lines 26229 26237 +8
Branches 3630 3629 -1
============================================
+ Hits 13474 13493 +19
+ Misses 11469 11464 -5
+ Partials 1286 1280 -6
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
…le times with "i+1"
…t or authenticate
Contributor
Author
|
@pan3793 UT and docs improved and CI passed. Ready for the merge. Please take a look again. |
pan3793
reviewed
Aug 22, 2022
pan3793
reviewed
Aug 22, 2022
Member
|
Thanks, merging to master/1.6 |
pan3793
pushed a commit
that referenced
this pull request
Aug 22, 2022
…C Authentication Provider ### _Why are the changes needed?_ To fix the config name and placeholder with `username` introduced in #3235 violate this convention as in JDBC driver use `user` keyword used for connection user rather than `username`, 1. change config name from `kyuubi.authentication.jdbc.username` to `kyuubi.authentication.jdbc.user` 2. change placeholder from `${username}` to `${user}` 3. update docs and config description related to above changes, and sync the update in jdbc auth docs statement details to config docs. 4. fix error in throwing AuthenticationException with auth db password. ut added for the fix. 5. other minor update in docs of custom auth ### _How was this patch tested?_ - [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request Closes #3288 from bowenliang123/jdbc-auth-config-update. Closes #3222 502703f [Bowen Liang] skip map for placeholder value lookup 3733be4 [liangbowen] nit ab00525 [liangbowen] nit 2301c4f [liangbowen] fix ut of jdbc auth with wrong_password 06f0c1b [liangbowen] remove redundant docs ec4565b [liangbowen] remove redundant docs ae1cce2 [liangbowen] fix compilation error of configLog 5d14103 [liangbowen] simplify configLog 6678e65 [liangbowen] reformat 52c1038 [liangbowen] simplify placeholder checking 21c2d5e [liangbowen] check whether placeholders in supported list before conn establishment or authenticate 7db0adf [liangbowen] ut for unknown placeholder 657de6a [liangbowen] nit 736b3f2 [liangbowen] refactoring placeholder value lookup, for preventing setString multiple times with "i+1" 86c8912 [liangbowen] setMaxRows after prepare placeholder, to postpone operation on jdbc conn 115fae5 [liangbowen] increase test code coverage b45b28c [liangbowen] resultSet returned by executeQuery is never null e1c0727 [liangbowen] update ut for redactPassword in JdbcUtils b4a52e2 [liangbowen] fix typo in docs of custom auth 371c2c6 [liangbowen] move redactPassword method to JdbcUtils and add ut. a4973c5 [liangbowen] reformat code 486e150 [liangbowen] fix error in throwing AuthenticationException with auth db password. add ut for the fix. efced90 [liangbowen] update settings.md ef97e35 [liangbowen] add SELECT prefix hint for doc of kyuubi.authentication.jdbc.query 025f94c [liangbowen] fix username to user in JdbcAuthenticationProviderImpl by 1. use config name `kyuubi.authentication.jdbc.user`, 2. use ${user} placeholder instead of ${username} Lead-authored-by: liangbowen <liangbowen@gf.com.cn> Co-authored-by: Bowen Liang <liangbowen@gf.com.cn> Signed-off-by: Cheng Pan <chengpan@apache.org>
Contributor
Author
|
@zhaomin1423 FYI. This PR has been merged to master/1.6. |
This file contains hidden or 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
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.
Why are the changes needed?
To fix the config name and placeholder with
usernameintroduced in #3235 violate this convention as in JDBC driver useuserkeyword used for connection user rather thanusername,kyuubi.authentication.jdbc.usernametokyuubi.authentication.jdbc.user${username}to${user}How was this patch tested?
Add some test cases that check the changes thoroughly including negative and positive cases if possible
Add screenshots for manual tests if appropriate
Run test locally before make a pull request