Allow configuring credential-cache for kerberized hive connector#13482
Allow configuring credential-cache for kerberized hive connector#13482Praveen2112 merged 3 commits intotrinodb:masterfrom
Conversation
2f86907 to
2cdea75
Compare
...plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosAuthentication.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/main/java/io/trino/plugin/hive/authentication/HdfsKerberosConfig.java
Outdated
Show resolved
Hide resolved
...plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosAuthentication.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Can we use keytab together with cache? Do we need validation for this?
There was a problem hiding this comment.
Using a keytab along with cache is also a valid configuration. So I don't think we need a verification for it. Maybe we can add an additional config to check if either of them are present.
There was a problem hiding this comment.
Can we have a test for this then?
There was a problem hiding this comment.
Additional PT environment for both keytab with cache ?
There was a problem hiding this comment.
then we need to multiply the tests. Instead of copying tests I think adding more environment would give us better coverage.
There was a problem hiding this comment.
It is also kind of tricky - if we are testing for group configured_features then we need to make all the tests parametric but some of them would run in a non-kerberos environment. So we need to duplicate them for kerberos and non-kerberos environment - or introduce some dummy catalogs to non-keberos environment.
There was a problem hiding this comment.
OK. So let's add new environment then.
...plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosAuthentication.java
Outdated
Show resolved
Hide resolved
bde6ddd to
1ec7ef9
Compare
1ec7ef9 to
3fb0190
Compare
There was a problem hiding this comment.
Wow, I've not known that we can do that. So it's either null, or path to existing file correct?
There was a problem hiding this comment.
Yeah. And it applies check if the file exists.
3fb0190 to
12ff76c
Compare
...-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosConfiguration.java
Outdated
Show resolved
Hide resolved
...-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosConfiguration.java
Outdated
Show resolved
Hide resolved
...-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosConfiguration.java
Outdated
Show resolved
Hide resolved
...nment/singlenode-kerberos-kms-hdfs-no-impersonation-with-credential-cache/iceberg.properties
Outdated
Show resolved
Hide resolved
12ff76c to
a794072
Compare
14c6238 to
252dbef
Compare
|
CI is red |
...src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreAuthenticationModule.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Use HOST_NAME in these values to make it clear what you tests
252dbef to
58df151
Compare
|
@wendigo / @kokosing / @s2lomon We made one change in |
I would start with this approach. It sounds that we could relax that in future when we learn about the use case. Configuring these two things is kind of misleading and I am not sure what user really wants. |
|
I agree with @kokosing on this |
58df151 to
4671f70
Compare
Hostname substitution happens even if the realm part is missing. Realm is optional, if there is no realm component in the principal, then it will be assumed that the principal is in the default realm.
4671f70 to
16c9650
Compare
...-plugin-toolkit/src/main/java/io/trino/plugin/base/authentication/KerberosConfiguration.java
Outdated
Show resolved
Hide resolved
16c9650 to
adf88dc
Compare
|
@Praveen2112 the template suggests there's another PR with docs for this change, but I can't find it. Could you link? Also, what section should the release note go into? |
|
I'm working on the PR for docs. The release notes should be part of |
Description
This allows us deploy hive connector in a keytab less environment where the credentials are fetched from credential cache file.
New feature for Hive and iceberg connector.
This is specific to hive connector and iceberg connector.
This allows us deploy hive connector in a keytab less environment where the credentials are fetched from credential cache file.
Related issues, pull requests, and links
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
(x) 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: