You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a08f593
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](hive) Preserve simple HMS user identity (apache#66890)
### What problem does this PR solve?
Issue Number: N/A
Related PR: apache#64304
Problem Summary: After external catalogs became plugin-driven,
simple-auth Hive Metastore RPCs no longer ran under the catalog
configured Hadoop user. HMS-created directories could therefore use the
FE process user while data writes used the configured user, causing
permission failures. Restore a plugin-side simple UGI for HMS RPCs and
preserve the metastore username alias and legacy default user.
### Release note
Fix Hive Metastore writes failing when the configured Hadoop user
differs from the FE process user.
### Check List (For Author)
- Test: Unit Test
- HiveConnectorPluginAuthenticatorTest
- Behavior changed: Yes. Simple-auth HMS RPCs again run as the
configured Hadoop user.
- Does this need documentation: No
Copy file name to clipboardExpand all lines: fe/fe-connector/fe-connector-hive/src/test/java/org/apache/doris/connector/hive/HiveConnectorPluginAuthenticatorTest.java
+115-9Lines changed: 115 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -21,25 +21,31 @@
21
21
22
22
importorg.junit.jupiter.api.Assertions;
23
23
importorg.junit.jupiter.api.Test;
24
+
importorg.junit.jupiter.api.io.TempDir;
24
25
26
+
importjava.nio.file.Files;
27
+
importjava.nio.file.Path;
25
28
importjava.util.HashMap;
26
29
importjava.util.Map;
27
30
28
31
/**
29
32
* Unit tests for {@link HiveConnector#buildPluginAuthenticator(Map)} — the connector-owned plugin-side
30
-
* Kerberos authenticator resolution.
33
+
* authenticator resolution.
31
34
*
32
35
* <p>The load-bearing case is <b>HMS-metastore Kerberos with simple (non-Kerberos) storage</b>
33
36
* (e.g. a Kerberized Hive Metastore over S3). After the catalog flip the FE-injected
34
37
* {@code ConnectorContext.executeAuthenticated} resolves to NOOP (SIMPLE) auth, so a Kerberos HMS would be
35
38
* silently downgraded unless the connector owns the login itself. These tests pin that the connector builds a
36
-
* plugin authenticator from the HMS client principal/keytab facts, and does NOT build one when the metastore
37
-
* is simple-auth (which would force needless SIMPLE-vs-Kerberos churn).
39
+
* plugin authenticator from the HMS client principal/keytab facts. Simple-auth cases also pin the HMS UGI to
40
+
* the configured Hadoop user, including the metastore alias and legacy default.
38
41
*
39
42
* <p>The actual keytab login is lazy (on first {@code doAs}), so these assertions never touch a KDC.
0 commit comments