[PAIMON-9337] Support Kerberos proxy user when reading Paimon table via Hive - #9340
Open
sohurdc wants to merge 2 commits into
Open
[PAIMON-9337] Support Kerberos proxy user when reading Paimon table via Hive#9340sohurdc wants to merge 2 commits into
sohurdc wants to merge 2 commits into
Conversation
Contributor
|
The test file contains a leftover, unused |
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.
Fixes #9337 (#9337)
What does this PR do?
When querying a Paimon table from Hive via HiveServer2 with a Kerberos proxy user
(
hive.server2.proxy.user), the query fails with:This happens because
KerberosLoginProviderthrows unconditionally when the currentUserGroupInformationhas auth methodPROXY, both inisLoginPossible()anddoLogin().Unlike Spark/Flink, Hive cannot pass a keytab directly — HiveServer2 itself holds the
Kerberos credentials and proxies requests on behalf of the business user. In this case,
Paimon should simply skip its own Kerberos login and let the existing proxy credentials
work.
Changes
This fix targets the scenario where a Paimon table is read from Hive via HiveServer2
with a Kerberos proxy user (
hive.server2.proxy.user).isLoginPossible(): proxy user now returnstrueinstead of throwingUnsupportedOperationException.doLogin(): proxy user branch skips login (credentials already provided by the proxymechanism) instead of throwing.
throwProxyUserNotSupported().KerberosLoginProviderITCaseto reflect the new behavior:isLoginPossibleMustReturnTrueWithProxyUser(was:mustThrowException)doLoginMustDoNothingWithProxyUser(was:mustThrowException)Verifying this change
Run the existing ITCase:
mvn test -pl paimon-common -Dtest=KerberosLoginProviderITCaseManual verification: after rebuilding the Hive connector, a Hive query via HiveServer2
proxy user on a Paimon table returns results normally. Ranger authorization still works
as expected (proxy user must still have the required privileges).
Does this PR introduce any user-facing change?
Yes. Hive queries on Paimon tables via HiveServer2 Kerberos proxy user no longer fail
with
UnsupportedOperationException.Does this PR introduce any breaking change?
No.