Gabriel39 commented on code in PR #71205:
URL: https://github.com/apache/doris/pull/71205#discussion_r4791121691


##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorProvider.java:
##########
@@ -95,11 +101,184 @@ public ConnectorSecuritySurface securitySurface() {
         // Keep secret masking and JDBC restrictions when REST decryption adds 
a KMS endpoint check.
         return 
ConnectorSecuritySurface.ofJdbcDriverUrls("iceberg.catalog.type", 
"iceberg.jdbc.driver_url")
                 .withSensitiveKeys(MetaStoreProviders.sensitivePropertyKeys())
+                
.withSensitiveKeys(JdbcTlsStoreUrlSecurity.sensitivePropertyKeys("jdbc."))
                 // Protect inline SDK credentials even when the additional 
name-pattern rule is disabled.
                 .withSensitiveKeys(List.of("gcp.auth.credentials-json", 
"gcs.oauth2.token",
                         "gcs.encryption-key", "gcs.decryption-key"))
-                // Standalone DLF proxies open HMS clients too; Hive's surface 
only covers HMS catalogs.
-                .withSsrfEndpoints("kms.endpoint", "hive.metastore.uris", 
"uri", "metastore.thrift.uris")
+                .withSensitiveKeyPrefix("client.credentials-provider.",
+                        "credential", "password", "secret", "token", "key", 
"authorization", "header")
+                .withSsrfEndpoints("kms.endpoint", "iceberg.rest.uri", "uri",
+                        "hive.metastore.uris", "metastore.thrift.uris", 
"s3tables.endpoint", "iceberg.jdbc.uri",
+                        "dynamodb.endpoint",
+                        "http-client.proxy-endpoint", "signer.uri")
+                // Native GCS overrides its storage service host independently 
of the catalog's REST URI.
+                .withSsrfEndpoints("gcs.service.host")
+                .withSsrfEndpoints("glue.endpoint", "aws.endpoint", 
"aws.glue.endpoint")
+                // DLF accepts bare hosts and uses HTTPS, including on its 
standalone HMS proxy path.
                 .withSsrfEndpoints(443, "dlf.endpoint", 
"dlf.catalog.endpoint");
     }
+
+    @Override
+    public ConnectorSecuritySurface securitySurface(Map<String, String> 
properties) {
+        // Retired aliases and inactive proxy clients must not contribute 
unused metadata destinations.
+        ConnectorSecuritySurface surface = securitySurface()
+                
.withSsrfEndpointValues("dlf.endpoint").withSsrfEndpointValues("dlf.catalog.endpoint");
+        String flavor = 
properties.getOrDefault(IcebergCatalogProperties.ICEBERG_CATALOG_TYPE,
+                IcebergCatalogProperties.TYPE_HMS).trim();
+        Map<String, String> endpointProperties = new HashMap<>(properties);
+        for (String key : new String[] {"signer.endpoint", 
"rest.remote-signing.endpoint",
+                "client.refresh-credentials-endpoint", 
"iceberg.rest.oauth2.server-uri", "oauth2-server-uri",
+                "client.credentials-provider.oauth2-server-uri", 
"gcs.oauth2.refresh-credentials-endpoint"}) {
+            String value = properties.get(key);
+            if (value != null && key.equals("iceberg.rest.oauth2.server-uri")) 
{
+                // The canonical holder trims Strings before emitting the SDK 
OAuth option; raw aliases do not.
+                value = value.trim();
+            }
+            // Iceberg appends signer, credential-refresh and OAuth paths 
(including GCS refresh) to a checked base.
+            // Only these lowercase absolute forms replace that base with an 
independent destination.
+            if (value != null && (value.startsWith("http://";) || 
value.startsWith("https://";))) {
+                surface = surface.withSsrfEndpoints(key);
+            } else {
+                endpointProperties.remove(key);
+            }
+        }
+        if (properties.containsKey("rest.client.proxy.port")) {
+            // The REST client activates this separate host only when a port 
is supplied, including on ALTER.
+            surface = surface.withSsrfEndpoints("rest.client.proxy.hostname");
+            int port = 
explicitProxyPort(properties.get("rest.client.proxy.port"));
+            if (port > 0) {
+                surface = surface.withSsrfEndpoints(port, 
"rest.client.proxy.hostname");
+            }
+        }
+        surface = withProviderProxyEndpoints(surface, properties);
+        // Google credentials are opaque secrets, but their structured token 
endpoints select independent peers.
+        for (String key : new String[] {"gcp.auth.credentials-json",
+                "client.credentials-provider.gcp.auth.credentials-json"}) {
+            if (properties.containsKey(key)) {
+                surface = surface.withSsrfEndpointValues(key,
+                        
IcebergGoogleCredentialValidator.ssrfTokenEndpoints(properties.get(key))
+                                .toArray(new String[0]));
+            }
+        }
+        // JdbcCatalog forwards these as driver Properties, independently of 
options inside the JDBC URL.
+        // Keep Connector/J's exact option names unless a URI alias or 
selected driver also admits MariaDB.
+        String jdbcUriKey = 
JdbcProxyPropertySecurity.metastoreUriKey(properties, "iceberg.jdbc.uri");
+        String jdbcUri = properties.get(jdbcUriKey);
+        // Retired URI aliases cannot choose either a database peer or another 
driver's TLS-store grammar.
+        boolean mariaDb = JdbcTlsStoreUrlSecurity.mayUseMariaDb(jdbcUri, 
properties.get("iceberg.jdbc.driver_class"));
+        boolean connectorJ = JdbcTlsStoreUrlSecurity.mayUseConnectorJ(jdbcUri);
+        List<String> suppliedPorts = new ArrayList<>();
+        Map<String, String> suppliedProperties = new HashMap<>();
+        for (Map.Entry<String, String> entry : properties.entrySet()) {
+            String key = entry.getKey();
+            if (key.startsWith("jdbc.")) {
+                String option = key.substring(5);
+                suppliedProperties.put(option, entry.getValue());
+                if (option.equalsIgnoreCase("port")) {
+                    suppliedPorts.add(entry.getValue());
+                }
+                if (JdbcTlsStoreUrlSecurity.isStoreUrlProperty(option)
+                        || (mariaDb && 
JdbcTlsStoreUrlSecurity.isMariaDbStoreUrlProperty(option))) {
+                    surface = surface.withSsrfEndpointValues(key,
+                            
JdbcTlsStoreUrlSecurity.storePropertyEndpointValues(
+                                    option, entry.getValue(), connectorJ, 
mariaDb)
+                                    .toArray(new String[0]));
+                }
+                // Supplied properties can select proxy/discovery routes 
absent from the JDBC URL.
+                List<String> proxy = 
JdbcProxyPropertySecurity.driverPropertyEndpointValues(option, 
entry.getValue());

Review Comment:
   Fixed in 70b28a4171e67318ea11019487a6bae6f655217f.
   
   JDBC driver/URI projections now follow the typed JDBC flavor in both 
providers. Dormant discovery, SOCKS, TLS-store and URI settings remain 
compatible with Hadoop/filesystem catalogs; complete-candidate ALTER 
reactivates checking on a JDBC switch. Legacy driver fixtures now select their 
intended JDBC consumer without weakening refusal assertions. Static artifact 
policy remains independent.
   
   The current head passed 2846 FE tests, strict FE Checkstyle, a fresh FE 
build, and both local SQL suites. Scope and verification limits are recorded in 
the PR description.



##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorProvider.java:
##########
@@ -95,11 +101,184 @@ public ConnectorSecuritySurface securitySurface() {
         // Keep secret masking and JDBC restrictions when REST decryption adds 
a KMS endpoint check.
         return 
ConnectorSecuritySurface.ofJdbcDriverUrls("iceberg.catalog.type", 
"iceberg.jdbc.driver_url")
                 .withSensitiveKeys(MetaStoreProviders.sensitivePropertyKeys())
+                
.withSensitiveKeys(JdbcTlsStoreUrlSecurity.sensitivePropertyKeys("jdbc."))
                 // Protect inline SDK credentials even when the additional 
name-pattern rule is disabled.
                 .withSensitiveKeys(List.of("gcp.auth.credentials-json", 
"gcs.oauth2.token",
                         "gcs.encryption-key", "gcs.decryption-key"))
-                // Standalone DLF proxies open HMS clients too; Hive's surface 
only covers HMS catalogs.
-                .withSsrfEndpoints("kms.endpoint", "hive.metastore.uris", 
"uri", "metastore.thrift.uris")
+                .withSensitiveKeyPrefix("client.credentials-provider.",
+                        "credential", "password", "secret", "token", "key", 
"authorization", "header")
+                .withSsrfEndpoints("kms.endpoint", "iceberg.rest.uri", "uri",
+                        "hive.metastore.uris", "metastore.thrift.uris", 
"s3tables.endpoint", "iceberg.jdbc.uri",
+                        "dynamodb.endpoint",
+                        "http-client.proxy-endpoint", "signer.uri")
+                // Native GCS overrides its storage service host independently 
of the catalog's REST URI.
+                .withSsrfEndpoints("gcs.service.host")
+                .withSsrfEndpoints("glue.endpoint", "aws.endpoint", 
"aws.glue.endpoint")
+                // DLF accepts bare hosts and uses HTTPS, including on its 
standalone HMS proxy path.
                 .withSsrfEndpoints(443, "dlf.endpoint", 
"dlf.catalog.endpoint");
     }
+
+    @Override
+    public ConnectorSecuritySurface securitySurface(Map<String, String> 
properties) {
+        // Retired aliases and inactive proxy clients must not contribute 
unused metadata destinations.
+        ConnectorSecuritySurface surface = securitySurface()
+                
.withSsrfEndpointValues("dlf.endpoint").withSsrfEndpointValues("dlf.catalog.endpoint");
+        String flavor = 
properties.getOrDefault(IcebergCatalogProperties.ICEBERG_CATALOG_TYPE,
+                IcebergCatalogProperties.TYPE_HMS).trim();
+        Map<String, String> endpointProperties = new HashMap<>(properties);
+        for (String key : new String[] {"signer.endpoint", 
"rest.remote-signing.endpoint",
+                "client.refresh-credentials-endpoint", 
"iceberg.rest.oauth2.server-uri", "oauth2-server-uri",
+                "client.credentials-provider.oauth2-server-uri", 
"gcs.oauth2.refresh-credentials-endpoint"}) {
+            String value = properties.get(key);
+            if (value != null && key.equals("iceberg.rest.oauth2.server-uri")) 
{
+                // The canonical holder trims Strings before emitting the SDK 
OAuth option; raw aliases do not.
+                value = value.trim();
+            }
+            // Iceberg appends signer, credential-refresh and OAuth paths 
(including GCS refresh) to a checked base.
+            // Only these lowercase absolute forms replace that base with an 
independent destination.
+            if (value != null && (value.startsWith("http://";) || 
value.startsWith("https://";))) {

Review Comment:
   Fixed in 70b28a4171e67318ea11019487a6bae6f655217f.
   
   Admission and Iceberg option assembly now share the typed client-credentials 
OAuth endpoint selection. An active nonblank bound server URI retires the raw 
SDK alias, including a relative replacement; clearing it restores raw-fallback 
checking. Pure factory tests, recording checks, and a SQL refusal/retention 
sequence cover the selection.
   
   The current head passed 2846 FE tests, strict FE Checkstyle, a fresh FE 
build, and both local SQL suites. Scope and verification limits are recorded in 
the PR description.



##########
fe/fe-filesystem/fe-filesystem-api/src/main/java/org/apache/doris/filesystem/properties/StorageEndpointProperties.java:
##########
@@ -0,0 +1,275 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.filesystem.properties;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Optional;
+import java.util.function.Predicate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/** Network endpoint aliases consumed by filesystem providers and their 
authentication clients. */
+public final class StorageEndpointProperties {
+    private static final List<String> PAIMON_STORAGE_PREFIXES = List.of(
+            "paimon.s3.", "paimon.s3a.", "paimon.fs.s3.", "paimon.fs.oss.");
+    private static final List<String> S3_REGION_ALIASES = List.of("s3.region", 
"AWS_REGION", "region", "REGION",
+            "aws.region", "glue.region", "aws.glue.region", 
"iceberg.rest.signing-region", "rest.signing-region",
+            "client.region");
+    private static final List<String> S3_ENDPOINT_ALIASES = 
List.of("s3.endpoint", "AWS_ENDPOINT", "endpoint",
+            "ENDPOINT", "aws.endpoint", "glue.endpoint", "aws.glue.endpoint");
+    private static final Pattern[] S3_ENDPOINT_PATTERNS = new Pattern[] {
+            Pattern.compile(
+                    "^(?:https?://)?(?:"
+                            + 
"s3(?:[-.]fips)?(?:[-.]dualstack)?[-.]([a-z0-9-]+)|"
+                            + "s3express-control\\.([a-z0-9-]+)|"
+                            + "s3express-[a-z0-9-]+\\.([a-z0-9-]+)"
+                            + ")\\.amazonaws\\.com(?:/.*)?$",
+                    Pattern.CASE_INSENSITIVE),
+            Pattern.compile(
+                    
"^(?:https?://)?glue(?:-fips)?\\.([a-z0-9-]+)\\.(amazonaws\\.com(?:\\.cn)?|api\\.aws)$",
+                    Pattern.CASE_INSENSITIVE)
+    };
+
+    private StorageEndpointProperties() {
+    }
+
+    public static Map<String, List<String>> derivedEndpointValues(Map<String, 
String> properties) {
+        Map<String, List<String>> result = new 
LinkedHashMap<>(derivedS3EndpointValues(properties));
+        OssEndpointProperties.derivedEndpointValues(properties).forEach((key, 
values) ->
+                result.merge(key, values, (existing, added) -> {
+                    List<String> combined = new ArrayList<>(existing);
+                    combined.addAll(added);
+                    return combined;
+                }));
+        return result;
+    }
+
+    public static boolean hasExplicitFilesystem(Map<String, String> 
properties) {
+        return "true".equalsIgnoreCase(properties.get("oss.hdfs.enabled"))
+                || properties.entrySet().stream().anyMatch(entry -> 
entry.getKey() != null
+                        && entry.getKey().startsWith("fs.") && 
entry.getKey().endsWith(".support")
+                        && "true".equalsIgnoreCase(entry.getValue()));
+    }
+
+    private static Map<String, List<String>> 
derivedS3EndpointValues(Map<String, String> properties) {
+        // S3 yields to inferred GCS too; an unused shared region must not 
invent an AWS destination.
+        if ((hasExplicitFilesystem(properties) && 
!Boolean.parseBoolean(properties.get("fs.s3.support")))
+                || (!GcsEndpointProperties.hasExplicitS3Request(properties)
+                && GcsEndpointProperties.guessIsGcs(properties))) {
+            return Map.of();
+        }
+        String regionKey = firstNonblankKey(properties, S3_REGION_ALIASES);

Review Comment:
   Fixed in 70b28a4171e67318ea11019487a6bae6f655217f.
   
   Moved the unchanged raw S3 guessing predicate into the shared host helper 
and reused it for regional admission. Inferred native OSS with a legacy AWS 
region no longer invents an unused AWS peer; explicit S3 selection reactivates 
it. Tests preserve first-non-null endpoint, URI and GCS selection precedence. 
Both plugin API majors and compiled signatures are updated together.
   
   The current head passed 2846 FE tests, strict FE Checkstyle, a fresh FE 
build, and both local SQL suites. Scope and verification limits are recorded in 
the PR description.



##########
fe/fe-connector/docs/catalog-endpoint-security.md:
##########
@@ -0,0 +1,300 @@
+# External catalog endpoint security
+
+External catalogs can issue requests from FE using addresses supplied by a 
user with `CREATE CATALOG`
+(or permission to alter an existing catalog). Only grant those privileges to 
trusted users and configure
+host-level egress controls where appropriate.
+
+## Operator policy
+
+`security_checker_class_name` selects the operator's security SDK. It defaults 
to an empty string;
+endpoint enforcement remains disabled in that configuration. The SDK owns 
address restrictions and
+allowlist exceptions, including access to legitimate internal catalog services.
+
+When the checker is configured, Doris validates connector-declared endpoints 
and shared storage/authentication
+endpoints before constructing a connector or running CREATE pre-validation. 
ALTER validates the complete
+candidate before provider type validation, which can itself perform discovery, 
including stored addresses that a
+flavor or authentication change could activate. Journal replay
+performs no endpoint probes; subsequent lazy connector construction and 
sibling construction validate again.
+`test_connection=false` does not skip the endpoint policy. Within one CREATE 
statement, the same checked
+host/port is not probed again after compatibility defaults are added. Newly 
introduced destinations still
+require admission; the statement receipt is consumed before pre-validation and 
never authorizes later access.
+ALTER waits for lazy catalog initialization without holding the global 
catalog-manager lock, for both user
+statements and replay, and releases mutation locks before reclaiming detached 
connectors.
+
+The declarations include REST/OAuth/token endpoints, ES hosts, MaxCompute 
endpoints, HMS URIs, MongoDB URIs,
+Fluss bootstrap addresses, ADBC URIs, and URL-valued or endpoint-named SDK 
options forwarded by Paimon, Trino,
+ADBC and Fluss. Shared filesystem declarations include object-store and 
authentication endpoint aliases.
+Malformed or interpolated declared endpoints are rejected rather than skipped. 
Shared storage aliases whose
+SDK default cannot be determined require a URI with an explicit scheme or a 
host with an explicit port.
+Rejections do not echo credential-bearing URI values.
+
+DLF endpoint aliases retain their HTTPS port 443 default and URL authority 
semantics for bare values,
+including user information, paths, queries and fragments. HTTP(S) host escapes 
are normalized before
+checking the destination; unsupported numeric address spellings still fail 
closed. A DLF alias can also
+produce a different OSS storage host. Admission includes the native 
internal/public OSS destination and its
+HTTP default after that bare-host rewrite. DLF-derived OSS-HDFS routing fails 
closed because the Jindo
+transport default is not modeled; set an explicit `oss.hdfs.endpoint` network 
URI to retain that storage path.
+Native OSS binding and admission share region inference and endpoint 
normalization. An explicit region
+can also rewrite a custom metadata/storage endpoint; region-only settings and 
legacy resource URIs enter
+checking with the native SDK's HTTP transport for bare bound authorities. 
Provider selection follows the
+same explicit/guess rules, including suppression of native OSS when OSS-HDFS 
matches or another explicit
+filesystem disables guessing.
+
+The storage prefixes `paimon.s3.`, `paimon.s3a.`, `paimon.fs.s3.` and 
`paimon.fs.oss.` overlay canonical
+Hadoop options in Paimon and the shared Hive/Iceberg HMS path. Their endpoint 
and STS options enter checking;
+credentials stay opaque by their effective Hadoop key even if the 
display-masking pattern is disabled.
+The preferred OSS-HDFS aliases `oss.hdfs.endpoint` and `oss.hdfs.fs.defaultFS` 
also enter admission before
+binding can replace the corresponding canonical properties.
+
+Parsing follows the client's input format: Elasticsearch host lists split 
every comma, while ordinary
+URL paths can contain commas. JDBC admission includes the `jdbc.jdbc_url` 
alias, SQL Server semicolon
+properties and braced values, and Oracle thin SID, Easy Connect and literal 
TCP/TCPS descriptor addresses.
+PostgreSQL query parameters use the driver's host/port aliases, value 
decoding, last-value precedence and
+multi-host pairing. Standalone JDBC selects `jdbc_url` over `jdbc.jdbc_url`, 
including when the canonical
+key is blank, and checks the selected URL after its ASCII-space removal. 
Metastore JDBC consumers retain
+their raw URL semantics and the corresponding conservative parser checks. 
PostgreSQL service-file discovery
+is rejected rather than assuming an address from a service name.
+MySQL's ordinary `jdbc:mysql://` host lists split before per-host credentials 
are removed; encoded credential
+separators remain credential bytes. Query port properties fill only omitted 
authority ports. Ambiguous fallback
+port aliases, grouped/key-value host descriptors and unmodeled MySQL 
connection schemes are rejected.
+Active SOCKS proxy and DNS-SRV settings are rejected because a database-host 
probe cannot validate those routes.
+For Connector/J, a bare or empty `socksProxyHost` still selects SOCKS. 
Supplied exact-case `jdbc.socksProxyHost`
+and enabled `jdbc.dnsSrv` properties also enter admission through Iceberg and 
Paimon, including Paimon's common
+`paimon.jdbc.*` aliases. Disabled discovery, differently cased driver property 
names and opaque credentials
+retain their driver semantics; checking remains conditional on the configured 
policy.
+SQL Server named-instance discovery without an explicit port, failover 
discovery, Oracle naming aliases,
+proxy settings and ambiguous shared-port groups are rejected while enforcement 
is enabled because their
+effective destinations cannot be established by this parser. This does not 
load a user-selected JDBC driver.
+
+Oracle Easy Connect also checks the full `oracle.net.socksProxyHost` / 
`oracle.net.socksProxyPort` and
+`oracle.net.httpsProxyHost` / `oracle.net.httpsProxyPort` connection 
properties, including supplied `jdbc.*`
+properties in Iceberg/Paimon and Paimon's common aliases. These unmodeled 
proxy settings fail closed under
+enforcement: a port can inherit an operator-supplied host. Full names keep 
their exact spelling; quoted key
+fragments and unquoted whitespace follow the driver grammar, while proxy-like 
text inside quoted credentials
+stays opaque. The existing short HTTPS proxy aliases remain checked.
+
+ClickHouse's `jdbc:clickhouse:` and `jdbc:ch:` forms accept an optional 
lowercase HTTP(S) transport.
+Their implicit ports are 8123/8443, including the effective `ssl` query 
option; an explicit port is retained.
+URL-level `connection_url` replacement, proxy routing and legacy V1 selection 
are rejected while checking is
+enabled. DB2 type-4 URLs check the primary authority (default port 446); 
configured client-reroute alternate
+hosts/ports, alternate groups and JNDI server lists are rejected rather than 
omitting their destinations.
+Unmodeled JCC connection aliases are rejected too, including `ibmdb`, `ids` 
and `informix-sqli`.
+Native PostgreSQL URIs, including ADBC's libpq input, reject percent-decoded 
`host`, `hostaddr`, `port` and
+`service` query options. Use literal URI authorities instead. Raw `#`, 
multiple authority `@` delimiters and
+userinfo crossing a query delimiter are rejected because libpq and Java URI 
interpret those structures
+differently. Ordinary native URI options and literal multi-host authorities 
remain checked.
+
+MySQL JDBC TLS keystores can select independent destinations through 
`clientCertificateKeyStoreUrl` and
+`trustCertificateKeyStoreUrl`. Admission decodes their query names/values once 
and uses the last exact
+occurrence, matching Connector/J. Iceberg and Paimon also supply `jdbc.*` 
driver properties; Paimon's
+`paimon.jdbc.*` aliases (case-insensitive outer `paimon.` only) reach that 
same driver map. Each configured
+store URL is checked, including stored values: supplied properties can replace 
the URL's SSL mode,
+store type or location. Password and type values remain opaque.
+Supplied store URLs and passwords are explicitly masked even when the optional 
sensitive-name pattern is disabled.
+
+The driver uses the JDK URL parser, including its ASCII trimming and optional 
`url:` prefix. HTTP(S)
+store peers enter the configured policy. Local `file:` forms, including 
`file:relative`, local path spaces
+and the JDK's literal `localhost` / `~` authorities, remain local; admission 
does not read a store. Other
+file authorities can fall back to FTP in the JDK and therefore fail closed, 
along with FTP, JAR and other
+unmodeled protocols, while enforcement is enabled. A bare explicit store path 
is not a file URL in the
+driver. Missing/empty store options retain the operator's system-store 
fallback without resolving those
+settings during admission. Disabled-policy behavior is unchanged.
+
+Supplied Iceberg/Paimon MySQL `jdbc.port` properties (including Paimon's 
common aliases) override query
+fallbacks when the authority omits its port. Admission combines these inputs 
instead of probing an inert
+3306 default. Explicit authority ports retain precedence, including over 
invalid supplied fallbacks;
+ambiguous case aliases fail closed only when a fallback is needed. Supplied 
property values keep their
+raw driver semantics, and a later URI change rechecks stored fallback ports.
+Paimon first resolves its common `paimon.jdbc.*` overlay, which wins over the 
exact raw `jdbc.*` key;
+only distinct driver case aliases remain ambiguous. Ports, TLS stores and 
proxy options use this same
+overlay on CREATE and on the complete ALTER candidate, so an inactive raw 
default is not probed.
+
+MariaDB TLS material can name another peer through `serverSslCert`, 
`trustStore` and `keyStore`, or the
+case-insensitive Connector/J store aliases. URI aliases and the selected 
MariaDB driver identify that
+interpretation; ordinary Connector/J keeps its exact option names, and ALTER 
rechecks a changed URI or driver.
+A definitive `jdbc:mariadb:` URI uses MariaDB's local-material semantics for 
canonical Connector/J aliases;
+the two driver grammars are combined only when both can apply. Its raw query 
names and values are not
+percent-decoded; exact
+key duplicates replace one another, while different case variants remain 
separate candidates. HTTP(S)
+material locations enter the policy before loading; local/relative paths and 
inline PEM remain local without
+reading them. URI-to-URL syntax follows the driver, and other recognized 
remote protocols fail closed.
+Supplied raw/prefixed store URLs and passwords remain masked independently of 
the optional name pattern.
+A MySQL URL containing the literal `permitMysqlScheme` marker also admits 
MariaDB's driver interpretation;
+both literal/default-port and Connector/J query-port destinations are checked, 
together with their distinct
+TLS syntax. Enforcement and disabled-policy behavior retain the shared gate's 
existing rules.
+
+S3 storage normalization can derive `https://s3.<region>.amazonaws.com` 
without any raw endpoint option.
+Admission checks the first nonblank supported region alias, following binding 
order and trimming, when
+its endpoint is absent or is rewritten from Glue. An explicit non-Glue 
endpoint keeps that default inert.
+The derived hostname component must remain literal. Fluss applies the same 
derivation to the merged
+storage context, retaining direct canonical properties over nested lake 
defaults, including blank direct
+entries. Translated Hadoop lake aliases use that same storage precedence; REST 
metadata retains its own
+nested override rules. These configuration admission checks do not initialize 
a filesystem, credential
+provider or SDK client.
+Glue endpoints also infer a region when no region option is present, including 
FIPS, China and `api.aws`
+forms. Admission retains both the original Glue peer and its derived S3 peer. 
Fluss uses its actual
+storage-option translation, including 
`fluss.lake.paimon.fs.s3a.endpoint.region` to `s3.region`.
+The same Glue rewrite is covered when a legacy `uri` supplies the endpoint, 
respecting path-style,
+forced standard parsing, URI key aliases and the binder's explicit 
endpoint/region precedence. Ordinary
+non-Glue legacy resource URIs also check the bound S3 service authority using 
HTTPS, as the S3 client does.
+Metadata and storage consumers of a shared property are checked independently; 
a selected metadata alias
+cannot erase that property's storage interpretation.
+
+MongoDB literal `mongodb://` authorities retain their default database port 
27017. URI `proxyHost` and
+`proxyPort` select an independent SOCKS peer (default port 1080), with 
case-insensitive names, single
+value decoding and duplicate rejection. Proxy credentials remain opaque. A 
`mongodb+srv://` seed is a
+DNS discovery name, not a database peer at port 27017. SRV routes are rejected 
while enforcement is
+enabled because the admission parser does not resolve and validate their 
discovered peers; use literal
+`mongodb://` host:port authorities instead. Policy-disabled behavior is 
unchanged.
+Raw fragment delimiters in a MongoDB authority are rejected because the driver 
and URI parser disagree
+about that authority; percent-encoded credential characters remain supported.
+
+Trino Hive's `trino.hive.metastore.thrift.client.socks-proxy` is checked 
independently of the metastore
+URI. It requires a literal host and explicit port, including bracketed IPv6, 
matching the transport's
+host:port tuple; no proxy port is inferred from the metastore's scheme.
+
+SAP HANA JDBC rejects a nonempty `proxyHostName` while enforcement is enabled: 
that option selects an
+independent HTTP or SOCKS peer, including when `proxyHttp` is false. This 
includes URL query parameters and
+the supplied `jdbc.*` properties in Iceberg/Paimon, plus Paimon's common 
aliases. Query names are raw and
+case-insensitive; the last occurrence with `=` wins, an explicit empty value 
clears, and bare tokens are
+ignored. Checking does not guess a proxy port or instantiate a driver. Direct 
literal peers, opaque proxy
+credentials and URL-shaped `webSocketUrl` paths keep their existing admission 
behavior.
+
+Trino and Presto JDBC URLs reject `httpProxy` and `socksProxy` under 
enforcement. These drivers decode the
+whole query before splitting parameters, so percent-encoded separators can 
activate a proxy option too.
+Iceberg checks `http-client.proxy-endpoint`, the `signer.uri` base and 
absolute HTTP(S) values in both
+`signer.endpoint` and `rest.remote-signing.endpoint`. Relative signer paths 
keep the checked base, including
+paths beginning with `//`; they are concatenated by Iceberg rather than 
resolved as new authorities.
+Iceberg's REST proxy hostname is checked with its separately configured 
literal port; adding a port on ALTER
+activates and checks a previously stored hostname. Proxy credentials stay 
opaque.
+The canonical `iceberg.rest.oauth2.server-uri` is classified after the 
holder's String trimming, before
+checking whether it is absolute. Raw SDK aliases retain their own untrimmed 
path semantics.
+Iceberg credential-refresh and OAuth options also accept request paths: 
`client.refresh-credentials-endpoint`,
+`iceberg.rest.oauth2.server-uri`, raw `oauth2-server-uri` and 
`client.credentials-provider.oauth2-server-uri`.
+Only lowercase absolute HTTP(S) values select an independent target; other 
values retain the checked REST
+base. Refresh accepts leading slashes; OAuth path syntax is still validated by 
the SDK. Provider-prefix
+inference excludes these known relative paths while retaining other endpoint 
options and opaque credentials.
+Stock vended credentials can also overlay 
`client.credentials-provider.rest.client.proxy.hostname` and
+`.port` onto the REST proxy settings. Admission derives every active host/port 
pair, including inherited
+fields and both ports when one hostname serves the catalog client and 
credentials client differently.
+Derived destinations are checked even without a corresponding raw property, 
with the same literal and
+format rules as directly supplied endpoints.
+Iceberg native GCS FileIO also checks `gcs.service.host` and absolute 
lowercase HTTP(S)
+`gcs.oauth2.refresh-credentials-endpoint` values. Relative GCS refresh paths 
retain the checked SDK `uri`
+base. REST-vended per-prefix credential maps can replace these values at 
runtime; those response-derived
+destinations are outside catalog-property admission and retain the runtime 
scope boundaries below.
+
+Inline Google credential JSON is kept sensitive, but `token_uri` inside 
`gcp.auth.credentials-json` and
+`client.credentials-provider.gcp.auth.credentials-json` enters admission for 
`service_account` and
+`authorized_user`. GDCH credentials use their required `token_uri`, and 
external authorized user credentials
+use their required `token_url`. The SDK JSON parser preserves duplicate-field 
and escaped-name semantics;
+other credential fields are not inferred as URLs. Missing `token_uri` for the 
first two types uses
+`https://oauth2.googleapis.com/token`;
+`authorized_user` also uses that default for an empty value, while an empty 
`service_account` URI fails
+closed. Explicit token endpoints must be absolute HTTP(S) URIs. 
External-account and impersonated
+credential types fail closed with enforcement enabled because their 
nested/discovered routing is not
+modeled. With enforcement disabled, the existing SDK type/fallback behavior 
and JSON validation remain
+unchanged. Empty inline JSON retains credential-path/ADC fallback; admission 
does not open credential
+files or resolve ADC. Both credential maps are checked, including stored 
values activated later on ALTER.
+
+S3A and OBS proxy host/port/SSL tuples, bucket overrides and the four mapped 
Paimon storage prefixes are not
+resolved as a complete route. Their nonblank proxy-host properties therefore 
fail closed under enforcement,
+before any endpoint probe. GCS `fs.gs.proxy.address` is checked as an explicit 
host:port or URI.
+
+Azure's `azure.oauth2_account_host` retains its hostname-only value and uses 
the ABFS OAuth HTTPS port 443
+for admission. URL-shaped passwords, bearer tokens and Hadoop secrets remain 
opaque; explicitly declared
+endpoints and endpoint-named options still enter checking even when their 
names are sensitive.
+
+HDFS-valued warehouses (including the Hive warehouse fallback), Hadoop 
pass-through options, `fs.defaultFS`,
+legacy `fs.default.name` and `oss.hdfs.fs.defaultFS` enter admission. A 
case-insensitive raw `uri` also
+supplies the HDFS storage default when `fs.defaultFS` is absent or blank. A 
canonical HMS metadata URI
+retires its raw `uri` fallback only for that metadata consumer. Physical HDFS 
URIs default to port 8020;
+authority-less HDFS warehouses inherit either an inline HDFS default 
filesystem or the physical legacy
+`uri` / `URI` storage default selected by the binder. Logical nameservices 
declared in `dfs.nameservices`
+are not DNS hosts: provide at least two distinct inline HA node IDs, every 
corresponding
+`dfs.namenode.rpc-address.<nameservice>.<node>` with an explicit port, and a 
failover proxy provider.
+Admission checks the physical RPC addresses and rejects incomplete inline HA 
configurations. HA mappings
+available only in operator XML are not resolved by this admission parser.
+Storage/default and HA routing placeholders are rejected, including 
interpolation that supplies the URI scheme.
+
+WebHDFS (`webhdfs:`), secure WebHDFS (`swebhdfs:`), ViewFS (`viewfs:`), FTP 
(`ftp:`) and HAR (`har:`)
+warehouse/default and forwarded filesystem routes fail closed while 
enforcement is enabled. Their HTTP HA
+addresses, redirects, mount-table URI lists, FTP configuration and archive 
delegates are not modeled by the
+HDFS RPC gate; checking only a logical authority or the first mount target 
would miss peers. FTP can connect
+before login, and a valid-shaped HAR path can read delegate metadata before 
archive validation fails.
+Ordinary HDFS, object-store locations and local paths retain their existing 
rules.
+
+Fluss also forwards direct gateway `paimon.rest.*` options to its Paimon lake 
sibling, separately from
+`fluss.lake.paimon.*`. Admission shares the sibling's REST option selection: a 
nonblank nested override
+replaces the direct gateway option, and clearing it reactivates the stored 
direct route. REST,
+token-metadata and OSS endpoints retain this precedence; bearer tokens and DLF 
access keys remain opaque.
+
+Connector plugin API 44.0 and filesystem plugin API 8.0 include the shared 
endpoint-routing helpers.
+Connector API 44.0 retains the endpoint declarations, derived values and 
network execution scope added in 43.0.
+Out-of-tree connector and filesystem plugins must be rebuilt against the 
matching APIs before loading into this FE.
+
+OceanBase's literal JDBC authorities use the pinned driver's bare-host default 
3306. Query `port` replaces
+every authority port; parameter names stay case-sensitive and undecoded, the 
first duplicate wins, and `#`
+remains query data. The driver's quoted-value rules keep embedded `&` data 
opaque. SOCKS, custom socket
+factories, pipes, local sockets, shared memory, native OB proxy transports and 
HA/discovery descriptors fail
+closed because their peers are not modeled as literal authorities. 
Policy-disabled behavior is unchanged.
+
+MaxCompute admission uses the same pure service-endpoint resolver as its 
catalog holder: the canonical
+endpoint wins, a legacy tunnel endpoint is converted to the service endpoint, 
and legacy ODPS/region
+fallbacks are resolved in runtime order. Inactive aliases are not probed as 
service peers.
+
+Iceberg and Paimon REST bind their first nonblank dedicated REST URI before 
the generic `uri` fallback.
+Replacing that metadata URI retires only the unused metadata peer; an 
independent storage interpretation
+of raw `uri` remains checked. Clearing the dedicated URI on ALTER reactivates 
the stored fallback.
+
+Hive and Iceberg HMS similarly prefer `hive.metastore.uris` over the generic 
metadata `uri` fallback.
+Iceberg Hadoop has no metadata URI. DLF-only catalogs likewise retain only the 
independent storage role
+of raw `uri`; proxy modes that activate HMS recheck the selected HMS alias and 
any reactivated fallback.
+
+Iceberg, Paimon and Hive DLF admission shares the metastore holder's 
region-to-endpoint derivation,
+including public versus VPC hosts and canonical/legacy region aliases. The 
derived DLF service is inactive
+in `METASTORE_ONLY` mode. Other modes retain it, and complete ALTER candidates 
recheck mode and alias changes.
+Only the first nonblank endpoint alias contributes the service peer; clearing 
it reactivates the stored
+fallback. Native OSS checks its selected, normalized storage endpoint 
separately, while OSS-HDFS retains
+the literal DLF aliases it can consume. The driver-artifact gate uses static 
declarations independently
+of this opt-in endpoint projection.
+
+Paimon's typed `paimon.catalog.type` remains authoritative after generic SDK 
option overlays;
+`paimon.metastore` cannot replace the validated metastore branch. Inferred GCS 
storage uses the same pure
+selection signals as binding and does not invent an AWS peer from an unused 
`s3.region`. An explicit S3
+selection reactivates its regional endpoint check.
+
+Elasticsearch checks the holder-selected `hosts` list, including SSL defaults, 
and retires
+`elasticsearch.hosts` when the canonical key is present. Iceberg and Paimon 
JDBC select the first
+nonblank `uri` before their connector-specific alias; only that URI determines 
the database peer and
+TLS-store URL grammar. PostgreSQL database-only URLs inherit exact `PGHOST` / 
`PGPORT` driver properties;
+URL options and explicit URL authorities retain their precedence. 
Driver-download admission similarly
+checks the selected artifact alias while retaining both operator-policy 
declarations.
+
+Native OSS storage checks the normalized HTTP peer for bare endpoints, 
observes the provider-specific
+URI parsing options, and shares those rules with the storage binder. Iceberg 
DLF additionally checks the
+S3-compatible `s3.oss-*` host used by its FileIO and connectivity probe. 
Explicit non-S3 storage selection
+disables unused AWS regional defaults. Fluss does not reintroduce translated 
lake storage aliases over
+a blank direct canonical setting. Paimon filesystem catalogs interpret raw 
`uri` as storage only.
+
+## Runtime scope
+
+For Java SDK calls on the calling thread, network checking is independent of 
authentication. Paimon and

Review Comment:
   Fixed in 70b28a4171e67318ea11019487a6bae6f655217f.
   
   Qualified the runtime-scope guide to match the implementation: Hive default 
authentication uses the context wrapper, while plugin-owned authentication and 
DLF-only direct actions retain endpoint admission without a per-call network 
hook. The PR description now records the same boundary.
   
   The current head passed 2846 FE tests, strict FE Checkstyle, a fresh FE 
build, and both local SQL suites. Scope and verification limits are recorded in 
the PR description.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to