Make user property optional in JDBC#11350
Conversation
kokosing
left a comment
There was a problem hiding this comment.
Can we remove things like the below from product tests that are using KRB or other authentications methods and use user mapping instead there?
# 1) It should belong to the "admin" role in hive
# 2) It should have the required privileges (such as SELECT) on Hive tables (such as hive.default.nation)
jdbc_user: hdfs
client/trino-client/src/main/java/io/trino/client/ClientSession.java
Outdated
Show resolved
Hide resolved
client/trino-jdbc/src/main/java/io/trino/jdbc/TrinoDatabaseMetaData.java
Outdated
Show resolved
Hide resolved
I'd strongly prefer to avoid breaking change like this when no authentication is used. (if i were reviewing this PR, it would be 'must have' change; i am currently not reviewing this) |
c7ef95e to
fc574b5
Compare
electrum
left a comment
There was a problem hiding this comment.
It’s good to make it optional, but we shouldn’t make it a breaking change. Let’s allow setting it to empty to indicate that it shouldn’t be sent.
|
JDBC and CLI are different and the behavior needs to be considered separately. Can you create separate pull requests? |
fc574b5 to
c7948d5
Compare
I've removed CLI related changes from this PR. I'll create a seperate PR. |
c7948d5 to
efb38b8
Compare
core/trino-main/src/main/java/io/trino/server/security/InsecureAuthenticator.java
Outdated
Show resolved
Hide resolved
client/trino-client/src/main/java/io/trino/client/StatementClientV1.java
Outdated
Show resolved
Hide resolved
efb38b8 to
b33fab2
Compare
b33fab2 to
83251af
Compare
I removed it but this cause a lot of product test failures. I tried to replace it with user mapping but it didn't work: it was using |
83251af to
4004b86
Compare
|
@electrum Do you want to take a look into this? There are no more breaking changes, so I would like to merge it. |
|
CI hit: #6315 |
`user` property is only required in two scenarios: * no authentication - in this case the server will return a well-formed error, * basic authentication - the driver will validate the configuration and return an error if only password was provided.
4004b86 to
4bdaec3
Compare
|
Any updates on this @electrum? |
|
@lukasz-walkiewicz @kokosing please merge as this was positively reviewed 21 days ago. |
|
Merged, thanks! |
Description
userproperty is only required in two scenarios:error,
return an error if only password was provided.
Documentation
(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text:
Fixes: #9669