Skip to content

Commit b0bfd3c

Browse files
morningmanclaude
andcommitted
[fix](catalog) Mask connector catalog secrets and the ALTER CATALOG audit text
### Background SHOW CREATE CATALOG, SHOW CATALOG, the `catalogs()` table function and the audit text of CREATE CATALOG replace a property value with `*XXX` when `DatasourcePrintableMap.isSensitiveKey` matches its key. Until now the keys came from a list in fe-core and from the keys filesystem plugins report at startup. A connector plugin marks its secret properties `sensitive = true`, but that mark only masks the connector's own log lines. A connector tells the engine about its security-relevant properties through `ConnectorProvider#securitySurface()`. ### What problem does this PR solve? Issue Number: None Related PR: #69588 (added the connector security surface this extends), #45164 (introduced the unmasked ALTER CATALOG audit text), #27115 (masked it for the statement #45164 replaced), #59502 (added `iceberg.jdbc.password`), #54523 (added the Paimon REST DLF keys), #65730 (branch-4.1's Lance catalog, whose REST secrets the Lance port will declare on this surface) PR Type: Bugfix Problem Summary: Catalog secrets that only a connector knows are on no masking list, so SHOW CREATE CATALOG and the other renderings print them in clear: `iceberg.jdbc.password`, `paimon.jdbc.password`, the Paimon REST DLF key pair, `mc.access_key`, and credentials passed through under `trino.` or `adbc.`. Separately, `ALTER CATALOG ... SET PROPERTIES` is written to the audit log unmasked, whatever the key. Each connector now declares its secrets on its security surface, taken from its `sensitive` marks, and the surface can also declare a namespace of secret keys for options passed through unread; Fluss's lake options were hard-coded in fe-core for that reason. The engine masks the union, with fe-core's own list kept as the floor. ALTER CATALOG is masked like CREATE CATALOG. ### Details - **Change map:** 42 files, +1035 −76 over two commits: production code +376 −48, tests +645 −24, the connector README +13 −3, the plugin API version in `fe/fe-connector/pom.xml`. The first commit adds secret keys to the surface (reviewed alone before). The second does the rest: 1. Key namespaces on the SPI: `withSensitiveKeyPrefix` and `SensitiveKeyPrefix.covers`, which holds the matching rule; a collection form of `withSensitiveKeys` (`ConnectorSecuritySurface`, +130). 2. Engine: `isSensitiveKey` matches registered namespaces, the Fluss rule becomes one of them; `ConnectorPluginManager` registers them and reads every surface before it publishes a provider (+70). 3. Connectors: every provider declares its secrets; `MetaStoreProviders.sensitivePropertyKeys()` gives the union of a plugin's metastore backends; `IcebergJdbcMetaStoreProvider` reports its keys like its siblings; the keytab paths lose their `sensitive` mark (+140). 4. ALTER CATALOG audit masking (+16). - **Frequency:** Always. Create or alter a catalog that sets one of the keys above, then run SHOW CREATE CATALOG, SHOW CATALOG `<name>` or `select * from catalogs()`, or read the audit log after an ALTER CATALOG ... SET PROPERTIES. - **Root cause:** `isSensitiveKey` consulted only fe-core's list and the filesystem providers' keys. A connector's `sensitive` marks fed only `toMaskedString`; `MetaStoreProvider.sensitivePropertyKeys()` existed for this, but nothing called it, and the Iceberg JDBC backend did not implement it. For ALTER CATALOG, `AlterCatalogPropertiesCommand` does not implement `NeedAuditEncryption` and `LogicalPlanBuilderForEncryption` has no `visitAlterCatalogProperties`, so `AuditLogHelper` records the original text; the statement it replaced in #45164 was masked by #27115. - **Why existing tests missed it:** Unit tests: `DatasourcePrintableMapTest` checks fe-core's own keys, the provider surface tests checked only the SSRF and driver_url keys, and `EncryptSQLTest` and `RepositoryAuditEncryptionTest` cover CREATE CATALOG, repositories and resources but not ALTER CATALOG. Regression: `audit/test_external_catalog_credential_masking` creates only Iceberg REST catalogs, whose keys are on fe-core's list, and never alters one. - **Fix:** The engine must not name a connector's properties, so the connectors declare their secrets, from the same `sensitive` marks that mask their logs; jdbc and es declare both spellings their legacy prefix allows, and trino and adbc declare the namespace they pass through, a key there being a secret when its rest names `key`, `secret`, `password`, `token` or `credential` (also `authorization` for ADBC). fe-core keeps the connector keys it lists, so a catalog whose plugin is not loaded masks what it masked before. A provider whose `securitySurface()` throws at startup is skipped, as a filesystem provider is, instead of stopping FE. - **Other paths and branches:** Fixed here: every rendering above and FE's statement logging, which share `isSensitiveKey` and `NeedAuditEncryption`. Not covered, since a key name cannot express them safely: raw Iceberg SDK keys copied through (`token`, `credential`), Paimon options re-keyed from `paimon.*`, Hadoop `fs.*` keys, and secrets inside a URL. The ALTER CATALOG gap is on branch-4.0, 4.1 and 4.2 (from #45164); branch-3.1 still uses the masked statement. branch-4.1 and 4.2 also print the connector keys above in clear; without the connector SPI their fix differs and is tracked separately. - **Behavior change:** The namespaces also mask non-secrets whose names carry those words, such as `trino.hive.s3.aws-access-key` or a keystore path. Keytab paths, which no release masks, are no longer masked in connector log lines: marked `sensitive`, `hadoop.kerberos.keytab` would be masked in every storage vault and resource. ### Testing All runs were local (macOS), on master `f5c993f2c94` plus this change: - Regression `audit/test_external_catalog_credential_masking`, extended with an Iceberg JDBC catalog: SHOW CREATE CATALOG masks `iceberg.jdbc.password`, and the audit texts of its CREATE CATALOG and of an ALTER CATALOG that sets the password and `s3.secret_key` hold only `*XXX`. Against the local cluster's FE without this change it fails at the first new check, SHOW CREATE CATALOG printing the password; with a FE built from this change it passes. - fe-connector-spi: all 160 tests, with the refreshed surface baseline (+4 lines); the metastore modules: all tests; ten connector modules: 29 classes, 511 tests, including each connector's surface test, which checks real key names. - fe-core: 26 classes, 341 tests, including `ConnectorPluginManagerTest`, `DatasourcePrintableMapTest`, `EncryptSQLTest` and the audit and plugin gate tests; 14 of them again after the last change to registration. - Twenty mutations, each caught by its test: for example, reverting either half of the ALTER CATALOG fix (`EncryptSQLTest` sees the statement in clear), matching a marker anywhere in the key, an empty metastore union, or re-marking a keytab. ### Notes for Reviewers - `SensitiveKeyPrefix.covers` lives on the SPI so that a connector's test can check its declaration against real key names and the engine applies the same rule; the Fluss floor in fe-core uses it too. - The entries both fe-core and a connector declare are deliberate: the floor is frozen, as the comment in `DatasourcePrintableMap` says. - The plugin API stays at 31.0, the first commit's bump. Hudi declares nothing: it owns no catalog properties. ### Release note SHOW CREATE CATALOG, SHOW CATALOG, the `catalogs()` table function and the audit log now mask `iceberg.jdbc.password`, `paimon.jdbc.password`, `paimon.rest.dlf.access-key-id`, `paimon.rest.dlf.access-key-secret`, `mc.access_key`, and the `trino.*` and `adbc.*` properties whose names carry `key`, `secret`, `password`, `token` or `credential` (`authorization` too for `adbc.*`). ALTER CATALOG ... SET PROPERTIES statements are masked in the audit log like CREATE CATALOG. ### Check List (For Author) - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Ready ### AI Disclosure - Tool: Claude Code (Claude Opus 5.5) - Generated: the code, the tests, and this description - Human review: not stated - Prompts: The author first asked for a generic connector SPI to mask a connector's secret catalog properties instead of adding the Lance keys to fe-core's list. Then, in this PR: let the surface express prefix rules such as Fluss's, mask the union of the engine's and the connectors' keys, wire every connector, keep fe-core's existing entries as the floor, mask whatever is marked `sensitive` but stop marking keytab paths, and fix the unmasked ALTER CATALOG audit text on master only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 44ed6b1 commit b0bfd3c

40 files changed

Lines changed: 854 additions & 90 deletions

File tree

‎fe/fe-connector/README.md‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,18 @@ Rules for `of(map)`:
320320
Guava's `checkArgument`. Reversing it compiles cleanly and inverts the check.
321321
- **Mark secrets `sensitive = true`** and implement `toString()` as
322322
`ConnectorPropertiesUtils.toMaskedString(this)`. That covers logs only. For
323-
`SHOW CREATE CATALOG` and the other places that print catalog properties,
324-
also declare the keys in `ConnectorProvider#securitySurface()` with
325-
`ConnectorSecuritySurface.ofSensitiveKeys(...)` or `withSensitiveKeys(...)`;
326-
the engine adds them to its masking list (`DatasourcePrintableMap`) when it
327-
registers the provider. Storage credentials (`s3.secret_key`, ...) are already
328-
on that list.
323+
`SHOW CREATE CATALOG`, the audit log and the other places that print catalog
324+
properties, also declare the keys in `ConnectorProvider#securitySurface()`:
325+
pass `ConnectorPropertiesUtils.getSensitiveKeys(<properties class>)` (or the
326+
metastore dispatcher's `MetaStoreProviders.sensitivePropertyKeys()`) to
327+
`withSensitiveKeys(...)`, so the same mark drives both. A namespace passed
328+
through to a client unenumerated (Trino's `trino.*`, Fluss's lake options)
329+
is declared with `withSensitiveKeyPrefix(prefix, markers...)`. The engine
330+
adds both to its masking list (`DatasourcePrintableMap`) when it registers
331+
the provider. Storage credentials (`s3.secret_key`, ...) are already on that
332+
list. A path is not a secret: don't mark a keytab or certificate *path*
333+
`sensitive`, since the list is matched by key name across every catalog,
334+
resource and storage vault.
329335
- **Never pass the raw map into anything that can reach user-visible output.**
330336
It holds the credentials. `ConnectorTableSchema`'s table properties are the
331337
trap: `SHOW CREATE TABLE` renders them unmasked, and the only thing keeping

‎fe/fe-connector/fe-connector-adbc/src/main/java/org/apache/doris/connector/adbc/AdbcConnectorProvider.java‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.apache.doris.connector.spi.Connector;
2222
import org.apache.doris.connector.spi.ConnectorContext;
2323
import org.apache.doris.connector.spi.ConnectorProvider;
24+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
25+
import org.apache.doris.foundation.property.ConnectorPropertiesUtils;
2426

2527
import java.util.HashMap;
2628
import java.util.Map;
@@ -78,4 +80,19 @@ public void validatePropertiesForUpdate(
7880
public Connector create(Map<String, String> properties, ConnectorContext context) {
7981
return new AdbcConnector(properties, context);
8082
}
83+
84+
/**
85+
* The sensitive properties (the password), and the driver options under
86+
* {@link AdbcCatalogProperties#DRIVER_OPTION_PREFIX}: each driver names its own credentials (an auth
87+
* token, an authorization header, a private key), so a driver option is a secret when its name carries
88+
* a credential-like word. Like {@link #getType()}, this must not touch an ADBC class: the engine asks
89+
* for it before it discards a duplicate directory copy of the plugin.
90+
*/
91+
@Override
92+
public ConnectorSecuritySurface securitySurface() {
93+
return ConnectorSecuritySurface.EMPTY
94+
.withSensitiveKeys(ConnectorPropertiesUtils.getSensitiveKeys(AdbcCatalogProperties.class))
95+
.withSensitiveKeyPrefix(AdbcCatalogProperties.DRIVER_OPTION_PREFIX,
96+
"key", "secret", "password", "token", "credential", "authorization");
97+
}
8198
}

‎fe/fe-connector/fe-connector-adbc/src/test/java/org/apache/doris/connector/adbc/AdbcConnectorProviderIsolationTest.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ void constructingTheProviderLoadsNoAdbcClass() throws Exception {
7575
"getType() must be answerable without any ADBC class");
7676
Assertions.assertTrue(((ConnectorProvider) provider).isStandaloneCatalogType(),
7777
"adbc is a catalog type a user writes in CREATE CATALOG");
78+
// The engine reads the security surface when it registers the provider, before it can tell that a
79+
// directory copy duplicates the built-in one, so it must be answerable without any ADBC class too.
80+
Assertions.assertFalse(((ConnectorProvider) provider).securitySurface().sensitiveKeys().isEmpty(),
81+
"securitySurface() must be answerable without any ADBC class");
7882

7983
Assertions.assertEquals(List.of(), loader.blockedNames(),
8084
"Provider discovery must not load any org.apache.arrow.adbc class");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
package org.apache.doris.connector.adbc;
19+
20+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
21+
import org.apache.doris.connector.spi.ConnectorSecuritySurface.SensitiveKeyPrefix;
22+
23+
import org.junit.jupiter.api.Assertions;
24+
import org.junit.jupiter.api.Test;
25+
26+
import java.util.Collections;
27+
28+
/**
29+
* Pins the ADBC connector's secrets: the password, and the driver options passed through under
30+
* {@code adbc.} whose names carry a credential-like word, since each ADBC driver names its own credentials.
31+
*/
32+
public class AdbcConnectorProviderSecuritySurfaceTest {
33+
34+
@Test
35+
public void declaresThePasswordAndTheCredentialLikeDriverOptions() {
36+
ConnectorSecuritySurface surface = new AdbcConnectorProvider().securitySurface();
37+
Assertions.assertEquals(Collections.singletonList("password"), surface.sensitiveKeys());
38+
Assertions.assertEquals(1, surface.sensitiveKeyPrefixes().size());
39+
SensitiveKeyPrefix driverOptions = surface.sensitiveKeyPrefixes().get(0);
40+
// A driver option keeps its own adbc. name behind the pass-through prefix.
41+
Assertions.assertTrue(driverOptions.covers("adbc.adbc.flight.sql.authorization_header"));
42+
Assertions.assertTrue(driverOptions.covers("adbc.adbc.snowflake.sql.client_option.auth_token"));
43+
Assertions.assertTrue(driverOptions.covers("adbc.adbc.snowflake.sql.client_option.jwt_private_key"));
44+
Assertions.assertFalse(driverOptions.covers("adbc.adbc.snowflake.sql.db"));
45+
Assertions.assertFalse(driverOptions.covers("uri"));
46+
Assertions.assertTrue(surface.ssrfEndpointKeys().isEmpty());
47+
}
48+
}

‎fe/fe-connector/fe-connector-es/src/main/java/org/apache/doris/connector/es/EsCatalogProperties.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
import org.apache.doris.foundation.property.ConnectorProperty;
2222
import org.apache.doris.foundation.property.ParamRules;
2323

24+
import java.util.HashSet;
2425
import java.util.LinkedHashMap;
2526
import java.util.Map;
27+
import java.util.Set;
2628

2729
/**
2830
* Everything a user writes in {@code CREATE CATALOG} for an Elasticsearch catalog, bound and checked.
@@ -172,6 +174,19 @@ public static EsCatalogProperties of(Map<String, String> properties) {
172174
return p;
173175
}
174176

177+
/**
178+
* The names of the properties marked {@code sensitive}, each in both spellings a catalog may use: as
179+
* declared and with {@link #ES_PROPERTIES_PREFIX}.
180+
*/
181+
public static Set<String> sensitiveKeys() {
182+
Set<String> keys = new HashSet<>();
183+
for (String key : ConnectorPropertiesUtils.getSensitiveKeys(EsCatalogProperties.class)) {
184+
keys.add(key);
185+
keys.add(ES_PROPERTIES_PREFIX + key);
186+
}
187+
return keys;
188+
}
189+
175190
/**
176191
* Returns the properties with {@link #ES_PROPERTIES_PREFIX} removed from every key that carries it.
177192
*

‎fe/fe-connector/fe-connector-es/src/main/java/org/apache/doris/connector/es/EsConnectorProvider.java‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.doris.connector.spi.Connector;
2121
import org.apache.doris.connector.spi.ConnectorContext;
2222
import org.apache.doris.connector.spi.ConnectorProvider;
23+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
2324

2425
import java.util.Map;
2526
import java.util.Optional;
@@ -56,4 +57,10 @@ public void validateProperties(Map<String, String> properties) {
5657
public Connector create(Map<String, String> properties, ConnectorContext context) {
5758
return new EsConnector(properties, context);
5859
}
60+
61+
/** The engine masks the sensitive properties (the password) wherever it shows catalog properties. */
62+
@Override
63+
public ConnectorSecuritySurface securitySurface() {
64+
return ConnectorSecuritySurface.EMPTY.withSensitiveKeys(EsCatalogProperties.sensitiveKeys());
65+
}
5966
}

‎fe/fe-connector/fe-connector-es/src/test/java/org/apache/doris/connector/es/EsConnectorProviderTest.java‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@
1717

1818
package org.apache.doris.connector.es;
1919

20+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
21+
2022
import org.junit.jupiter.api.Assertions;
2123
import org.junit.jupiter.api.Test;
2224

25+
import java.util.Arrays;
26+
import java.util.HashSet;
2327
import java.util.Optional;
2428

2529
/** What this connector declares to the engine before any catalog of its type is initialized. */
@@ -41,4 +45,13 @@ public void anEsCatalogIsNotForceInitializedForEventSync() {
4145
// idle es catalog just to look for one.
4246
Assertions.assertFalse(new EsConnectorProvider().providesEventSource());
4347
}
48+
49+
@Test
50+
public void thePasswordIsASecretInBothSpellings() {
51+
// A catalog may write any key with the legacy elasticsearch. prefix, so the engine masks both.
52+
ConnectorSecuritySurface surface = new EsConnectorProvider().securitySurface();
53+
Assertions.assertEquals(new HashSet<>(Arrays.asList("password", "elasticsearch.password")),
54+
new HashSet<>(surface.sensitiveKeys()));
55+
Assertions.assertTrue(surface.sensitiveKeyPrefixes().isEmpty());
56+
}
4457
}

‎fe/fe-connector/fe-connector-fluss/src/main/java/org/apache/doris/connector/fluss/FlussConnectorProvider.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.apache.doris.connector.spi.Connector;
2121
import org.apache.doris.connector.spi.ConnectorContext;
2222
import org.apache.doris.connector.spi.ConnectorProvider;
23+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
2324

2425
import java.util.Map;
2526

@@ -48,4 +49,18 @@ public void validateProperties(Map<String, String> properties) {
4849
public Connector create(Map<String, String> properties, ConnectorContext context) {
4950
return new FlussConnector(FlussCatalogProperties.of(properties), context);
5051
}
52+
53+
/**
54+
* The fluss client's SASL credentials, a small and stable set of keys, and the lake options under
55+
* {@link FlussCatalogProperties#LAKE_OPTION_PREFIX}: those are open-ended (new paimon / filesystem
56+
* credential names may arrive without a Doris release), so a lake option is a secret when its name
57+
* carries a credential-like word, and endpoints and other operational settings stay visible.
58+
*/
59+
@Override
60+
public ConnectorSecuritySurface securitySurface() {
61+
return ConnectorSecuritySurface.ofSensitiveKeys("fluss.client.security.sasl.username",
62+
"fluss.client.security.sasl.password", "fluss.client.security.sasl.jaas.config")
63+
.withSensitiveKeyPrefix(FlussCatalogProperties.LAKE_OPTION_PREFIX,
64+
"key", "secret", "password", "token", "credential");
65+
}
5166
}

‎fe/fe-connector/fe-connector-fluss/src/test/java/org/apache/doris/connector/fluss/FlussConnectorProviderTest.java‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@
2121
import org.apache.doris.connector.spi.ConnectorCapability;
2222
import org.apache.doris.connector.spi.ConnectorContext;
2323
import org.apache.doris.connector.spi.ConnectorProvider;
24+
import org.apache.doris.connector.spi.ConnectorSecuritySurface;
25+
import org.apache.doris.connector.spi.ConnectorSecuritySurface.SensitiveKeyPrefix;
2426

2527
import org.junit.jupiter.api.Assertions;
2628
import org.junit.jupiter.api.Test;
2729

2830
import java.io.IOException;
31+
import java.util.Arrays;
2932
import java.util.HashMap;
3033
import java.util.Map;
3134
import java.util.ServiceLoader;
@@ -111,4 +114,20 @@ public void declaresNestedColumnPruneButNotFieldIdAccessPath() throws IOExceptio
111114
connector.close();
112115
}
113116
}
117+
118+
@Test
119+
public void declaresTheSaslCredentialsAndTheCredentialLikeLakeOptions() {
120+
ConnectorSecuritySurface surface = new FlussConnectorProvider().securitySurface();
121+
Assertions.assertEquals(Arrays.asList("fluss.client.security.sasl.username",
122+
"fluss.client.security.sasl.password", "fluss.client.security.sasl.jaas.config"),
123+
surface.sensitiveKeys());
124+
Assertions.assertEquals(1, surface.sensitiveKeyPrefixes().size());
125+
SensitiveKeyPrefix lake = surface.sensitiveKeyPrefixes().get(0);
126+
Assertions.assertTrue(lake.covers("fluss.lake.paimon.s3.secret-key"));
127+
Assertions.assertTrue(lake.covers("fluss.lake.paimon.rest.token"));
128+
Assertions.assertTrue(lake.covers("fluss.lake.paimon.azure.oauth2_client_secret"));
129+
Assertions.assertFalse(lake.covers("fluss.lake.paimon.s3.endpoint"));
130+
Assertions.assertFalse(lake.covers("fluss.lake.paimon.warehouse"));
131+
Assertions.assertFalse(lake.covers("fluss.bootstrap.servers"));
132+
}
114133
}

‎fe/fe-connector/fe-connector-hive/src/main/java/org/apache/doris/connector/hive/HiveConnectorProvider.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
package org.apache.doris.connector.hive;
1919

20+
import org.apache.doris.connector.metastore.spi.MetaStoreProviders;
2021
import org.apache.doris.connector.spi.Connector;
2122
import org.apache.doris.connector.spi.ConnectorContext;
2223
import org.apache.doris.connector.spi.ConnectorProvider;
@@ -86,8 +87,10 @@ public void validatePropertiesForUpdate(
8687
public ConnectorSecuritySurface securitySurface() {
8788
// Every key the HMS client may take its thrift endpoint from: hive.metastore.uris, its documented alias
8889
// uri, and Hive 3's metastore.thrift.uris, which the client reads first. The engine's SSRF gate rejects
89-
// an intranet target there at CREATE / ALTER CATALOG.
90+
// an intranet target there at CREATE / ALTER CATALOG. The secrets are the metastore's sensitive
91+
// properties (none today: a keytab is named by its path).
9092
return ConnectorSecuritySurface.ofSsrfEndpoints(HiveCatalogProperties.HIVE_METASTORE_URIS,
91-
HiveCatalogProperties.URI, HiveCatalogProperties.METASTORE_THRIFT_URIS);
93+
HiveCatalogProperties.URI, HiveCatalogProperties.METASTORE_THRIFT_URIS)
94+
.withSensitiveKeys(MetaStoreProviders.sensitivePropertyKeys());
9295
}
9396
}

0 commit comments

Comments
 (0)