Repository navigation
Commit 2b1442f
fix: FIX-KERBEROS-DOAS — wire fs/jdbc HDFS authenticator (M-8) + wrap all read RPCs in doAs (M-11)
Both are Kerberos-only (harmless on simple-auth: the no-op authenticator's
execute() == task.call()).
Root cause
- M-8 (fe-core): paimon filesystem/jdbc catalogs over Kerberized HDFS lost UGI
doAs on the cutover path. The HDFS HadoopExecutionAuthenticator is built only
inside initializeCatalog(), which is dead on the plugin path (only legacy
PaimonExternalCatalog calls it), so PluginDrivenExternalCatalog read the base
no-op from getExecutionAuthenticator(). HMS was unaffected — it wires the
authenticator in initNormalizeAndCheckProps(), which always runs.
- M-11 (connector): metadata read RPCs (listDatabases/getDatabase/listTables/
getTable[handle+sys+resolveTable]/listPartitions) ran without
executeAuthenticated; only the 4 DDL ops were wrapped (signed D7=B read-vs-DDL
asymmetry). On a Kerberos HMS catalog these reads ran outside the catalog
principal. Legacy wrapped every read.
Fix
- M-8 (filesystem+jdbc only; DLF/REST/HMS excluded — DLF uses Aliyun STS not
Kerberos, the review's "DLF" clause was overstated): new internal fe-core hook
MetastoreProperties.initExecutionAuthenticator(List<StorageProperties>) (default
no-op), invoked by PluginDrivenExternalCatalog.initPreExecutionAuthenticator from
the already-built storage list; filesystem/jdbc override it to build the HDFS
authenticator (shared AbstractPaimonProperties helper), mirroring HMS. No
connector change; no connector SPI change.
- M-11 (full legacy parity, signed D-052, supersedes the D7=B read clause): wrap
all 7 connector read RPCs in context.executeAuthenticated. A single resolveTable
wrap covers all resolveTable callers (metadata + scan). Domain exceptions are
caught INSIDE the lambda because Kerberos UGI.doAs wraps a thrown checked
Catalog.*NotExistException in UndeclaredThrowableException.
Tests
- M-11: PaimonConnectorMetadataReadAuthTest (12) + 2 scan-path tests assert each
read runs inside executeAuthenticated (RecordingConnectorContext failAuth/
authCount). Connector module 248/0/0 (1 CI-gated skip).
- M-8: Paimon{FileSystem,Jdbc}MetaStorePropertiesTest assert getExecutionAuthenticator()
returns HadoopExecutionAuthenticator after wiring without initializeCatalog;
fe-core metastore-props 21/0/0 (DLF/HMS regression-clean).
- fail-before verified red for both (M-8: stays base no-op AbstractPaimonProperties$1;
M-11: authCount/log-empty).
- True end-to-end doAs is live-Kerberos-e2e only (no paimon-kerberos suite); DV-031.
Decisions D-052 (M-11) / D-053 (M-8); deviation DV-031; design
plan-doc/tasks/designs/P5-fix-KERBEROS-DOAS-design.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>1 parent 56bc95f commit 2b1442f
15 files changed
Lines changed: 623 additions & 31 deletions
File tree
- fe
- fe-connector/fe-connector-paimon/src
- main/java/org/apache/doris/connector/paimon
- test/java/org/apache/doris/connector/paimon
- fe-core/src
- main/java/org/apache/doris/datasource
- property/metastore
- test/java/org/apache/doris/datasource/property/metastore
- plan-doc
- tasks/designs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | | - | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
102 | 104 | | |
103 | 105 | | |
104 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
110 | 122 | | |
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
114 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
120 | 139 | | |
121 | 140 | | |
122 | 141 | | |
| |||
127 | 146 | | |
128 | 147 | | |
129 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
130 | 152 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
142 | 169 | | |
143 | 170 | | |
144 | 171 | | |
| |||
287 | 314 | | |
288 | 315 | | |
289 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
290 | 320 | | |
291 | 321 | | |
292 | | - | |
293 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
294 | 333 | | |
295 | 334 | | |
296 | 335 | | |
| |||
889 | 928 | | |
890 | 929 | | |
891 | 930 | | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
892 | 935 | | |
893 | 936 | | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
899 | 947 | | |
900 | 948 | | |
901 | 949 | | |
| |||
983 | 1031 | | |
984 | 1032 | | |
985 | 1033 | | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
986 | 1038 | | |
987 | | - | |
| 1039 | + | |
988 | 1040 | | |
989 | 1041 | | |
990 | 1042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
186 | 191 | | |
187 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
188 | 196 | | |
189 | 197 | | |
190 | 198 | | |
| |||
0 commit comments