hello-stephen commented on code in PR #71205:
URL: https://github.com/apache/doris/pull/71205#discussion_r4790276985


##########
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());
+                if (!proxy.isEmpty()) {
+                    surface = surface.withSsrfEndpointValues(key, 
proxy.toArray(new String[0]));
+                }
+            }
+        }
+        List<String> jdbcEndpoints = new ArrayList<>();
+        for (String endpoint : 
JdbcProxyPropertySecurity.mysqlPortEndpointValues(jdbcUri, suppliedPorts)) {
+            
jdbcEndpoints.add(JdbcProxyPropertySecurity.postgresqlPropertyEndpointValue(endpoint,
 suppliedProperties));
+        }
+        surface = surface.withSsrfEndpointValues(jdbcUriKey, 
jdbcEndpoints.toArray(new String[0]))
+                .withSsrfEndpointValues(jdbcUriKey.equals("uri") ? 
"iceberg.jdbc.uri" : "uri");
+        if (IcebergCatalogProperties.TYPE_DLF.equalsIgnoreCase(flavor)) {
+            // Region-only DLF catalogs still contact a metastore, 
independently of their OSS storage peer.
+            for (Map.Entry<String, String> entry
+                    : 
AbstractDlfMetaStoreProperties.serviceEndpointValues(properties).entrySet()) {
+                surface = surface.withSsrfEndpoints(443, entry.getKey())
+                        .withSsrfEndpointValues(entry.getKey(), 
entry.getValue());
+            }
+            for (Map.Entry<String, List<String>> entry
+                    : 
OssEndpointProperties.s3CompatibleEndpointValues(properties).entrySet()) {
+                List<String> values = new ArrayList<>();
+                if 
(surface.ssrfEndpointKeys(properties).contains(entry.getKey())) {
+                    values.addAll(surface.ssrfEndpointValues(entry.getKey(), 
properties.get(entry.getKey())));
+                }
+                // DLF's S3FileIO and CREATE HEAD use a separate S3-compatible 
socket host.
+                values.addAll(entry.getValue());
+                surface = surface.withSsrfEndpointValues(entry.getKey(), 
values.toArray(new String[0]));
+            }
+        }
+        String restUri = properties.get("iceberg.rest.uri");
+        if (IcebergCatalogProperties.TYPE_REST.equalsIgnoreCase(flavor)
+                && restUri != null && !restUri.isBlank()) {
+            // REST binds its dedicated URI before the generic fallback; 
storage retains its independent raw URI.
+            surface = surface.withSsrfEndpointValues("uri");
+        }
+        String metastore = properties.get("hive.metastore.uris");
+        boolean dlf = "dlf".equalsIgnoreCase(flavor);
+        if ("hadoop".equalsIgnoreCase(flavor) || (dlf && 
!AbstractDlfMetaStoreProperties.usesHmsClient(properties))
+                || (("hms".equalsIgnoreCase(flavor) || dlf)
+                && metastore != null && !metastore.isBlank())) {
+            // Hadoop and DLF-only have no HMS URI; an active HMS client 
prefers its dedicated alias.
+            surface = surface.withSsrfEndpointValues("uri");

Review Comment:
   [P2] Preserve the DLF FileIO endpoint when retiring `uri`
   
   When DLF binds native OSS from the legacy `uri`, 
`s3CompatibleEndpointValues` attributes the derived FileIO destination to that 
same key. This empty override discards the derived destination in DLF-only mode 
and when DLF uses a dedicated HMS URI. The shared storage check still sees the 
native OSS peer, while `DLFCatalog.initializeFileIO` uses the separate 
S3-compatible peer. Retire the metadata interpretation before adding derived 
peers, and cover both destinations in a legacy-URI admission test.



##########
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);
+        String endpointKey = firstNonblankKey(properties, S3_ENDPOINT_ALIASES);
+        String sourceKey = endpointKey;
+        String endpoint = endpointKey == null ? null : 
properties.get(endpointKey).trim();
+        if (regionKey == null && endpointKey == null) {
+            // The binder's legacy URI fallback runs on its HashMap snapshot, 
including URI key aliases.
+            Map<String, String> raw = new HashMap<>(properties);
+            sourceKey = raw.keySet().stream().filter(key -> 
key.equalsIgnoreCase("uri")).findFirst().orElse(null);
+            if (sourceKey == null) {
+                return Map.of();
+            }
+            String pathKey = firstNonblankKey(properties, 
List.of("use_path_style", "s3.path-style-access"));
+            String forceKey = firstNonblankKey(properties, 
List.of("force_parsing_by_standard_uri"));
+            endpoint = LegacyS3Uri.deriveEndpointQuietly(raw,
+                    pathKey == null ? "false" : properties.get(pathKey).trim(),
+                    forceKey == null ? "false" : 
properties.get(forceKey).trim());
+        }
+        if (endpointKey == null && regionKey == null && endpoint != null
+                && !endpoint.toLowerCase(Locale.ROOT).contains("glue")) {
+            // Ordinary legacy resource URIs also bind an endpoint; 
S3ObjStorage supplies HTTPS to bare authorities.
+            return s3RegionFromEndpoint(endpoint).isPresent()
+                    ? Map.of(sourceKey, List.of("https://"; + endpoint)) : 
Map.of();
+        }
+        if (endpoint != null && 
!endpoint.toLowerCase(Locale.ROOT).contains("glue")) {
+            return Map.of();
+        }
+        // Glue normalization infers a missing region before rewriting the S3 
endpoint. Reuse the
+        // storage binder's inference and retain the original peer for callers 
that also contact Glue.
+        String region = regionKey == null
+                ? (endpoint == null ? "" : 
s3RegionFromEndpoint(endpoint).orElse(""))
+                : properties.get(regionKey).trim();
+        if (region.isEmpty()) {
+            return Map.of();
+        }
+        if (!region.matches("[A-Za-z0-9-]+")) {
+            throw new IllegalArgumentException("S3 region must be a literal 
hostname component");
+        }
+        String serviceEndpoint = s3EndpointForRegion(region);
+        if (regionKey != null) {
+            return Map.of(regionKey, List.of(serviceEndpoint));
+        }
+        String source = properties.get(sourceKey);
+        String normalized = source.trim().toLowerCase(Locale.ROOT);
+        // An S3 URI is a resource locator; its rewritten endpoint is the 
socket peer. An HTTP URI
+        // can also name the catalog service, so retain that independently 
checked original peer.
+        boolean originalPeer = endpointKey != null || 
normalized.startsWith("http://";)
+                || normalized.startsWith("https://";);
+        return Map.of(sourceKey, originalPeer ? List.of(source, 
serviceEndpoint) : List.of(serviceEndpoint));
+    }
+
+    public static String s3EndpointForRegion(String region) {
+        return "https://s3."; + region + ".amazonaws.com";
+    }
+
+    public static Optional<String> s3RegionFromEndpoint(String endpoint) {
+        String lowerEndpoint = endpoint.toLowerCase(Locale.ROOT);
+        for (Pattern pattern : S3_ENDPOINT_PATTERNS) {
+            Matcher matcher = pattern.matcher(lowerEndpoint);
+            if (matcher.matches()) {
+                for (int i = 1; i <= matcher.groupCount(); i++) {
+                    String group = matcher.group(i);
+                    if (group != null && !group.isBlank()) {
+                        return Optional.of(group);
+                    }
+                }
+            }
+        }
+        return Optional.empty();
+    }
+
+    private static String firstNonblankKey(Map<String, String> properties, 
List<String> aliases) {
+        for (String key : aliases) {
+            String value = properties.get(key);
+            if (value != null && !value.isBlank()) {
+                return key;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Shared aliases can reach different SDKs; require an explicit scheme or 
port instead of guessing it.
+     * @throws IllegalArgumentException if a proxy route cannot be established 
from independent endpoint values
+     */
+    public static Map<String, Integer> endpoints(Map<String, String> 
properties, Predicate<String> opaqueCredential) {
+        Map<String, Integer> endpoints = new LinkedHashMap<>();
+        // OSS-HDFS prefers its specific alias over oss.endpoint before 
emitting fs.oss.endpoint.
+        for (String key : new String[] {"s3.endpoint", "AWS_ENDPOINT", 
"endpoint", "ENDPOINT", "aws.endpoint",
+                "glue.endpoint", "aws.glue.endpoint", "oss.endpoint", 
"oss.hdfs.endpoint", "OSS_ENDPOINT",
+                "fs.oss.endpoint", "cos.endpoint", "COS_ENDPOINT",
+                "obs.endpoint", "OBS_ENDPOINT", "azure.endpoint", 
"AZURE_ENDPOINT", "azure.oauth2_server_uri",
+                "azure.oauth2_account_host", "gs.endpoint", "minio.endpoint", 
"ozone.endpoint", "fs.s3a.endpoint",

Review Comment:
   [P2] Preserve bare native GCS endpoints
   
   `GcsFileSystemPropertiesTest.nativeHadoopUsesConfiguredEndpoint` covers 
`gs.endpoint=storage.googleapis.com`, which the native GCS binder normalizes to 
HTTPS. Registering `gs.endpoint` with default port `-1` rejects that supported 
form before the checker can evaluate it. Use the native binder’s HTTPS default 
for this form and test both acceptance and denial at port 443.



##########
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:
   [P2] Project JDBC-only options from the active metastore flavor
   
   This loop and its counterpart in `PaimonConnectorProvider` register JDBC 
driver routes for every flavor. The factories consume those options only in the 
JDBC branch. A dormant JDBC discovery or proxy option can therefore block an 
unrelated ALTER or lazy initialization of a Hadoop Iceberg or filesystem Paimon 
catalog. Gate the JDBC projections on the bound flavor and cover both dormant 
settings and their later activation through ALTER.



##########
fe/fe-core/src/main/java/org/apache/doris/connector/CatalogEndpointSecurity.java:
##########
@@ -0,0 +1,421 @@
+// 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.connector;
+
+import org.apache.doris.cloud.security.SecurityChecker;
+import org.apache.doris.common.DdlException;
+import org.apache.doris.common.util.DatasourcePrintableMap;
+import org.apache.doris.common.util.DebugPointUtil;
+import org.apache.doris.common.util.DebugPointUtil.DebugPoint;
+import org.apache.doris.connector.spi.ConnectorSecuritySurface;
+import org.apache.doris.filesystem.properties.HdfsEndpointProperties;
+import org.apache.doris.filesystem.properties.StorageEndpointProperties;
+
+import com.google.common.net.HostAndPort;
+import com.google.common.net.InetAddresses;
+import okhttp3.HttpUrl;
+
+import java.net.IDN;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+/** Shared endpoint admission for root and indirectly created catalog 
connectors. */
+public final class CatalogEndpointSecurity {
+    private static final String REJECT_HOST_POINT = 
"CatalogEndpointSecurity.reject_host";
+
+    private CatalogEndpointSecurity() {
+    }
+
+    public static boolean isEnabled() {
+        // The admission decision consumes the point; callers may ask about 
availability more than once.
+        return SecurityChecker.getInstance().isEnabled() || 
DebugPointUtil.isEnableWithoutCounting(REJECT_HOST_POINT);
+    }
+
+    public static void validate(String catalogName, ConnectorSecuritySurface 
surface, Map<String, String> properties)
+            throws DdlException {
+        validateAndRemember(catalogName, surface, properties, null);
+    }
+
+    /** A receipt is valid only within one CREATE statement and for the same 
checker instance. */
+    static final class Admission {
+        private final SecurityChecker checker;
+        private final boolean enabled;
+        private final Set<HostAndPort> destinations;
+
+        private Admission(SecurityChecker checker, Set<HostAndPort> 
destinations) {
+            this.checker = checker;
+            this.enabled = checker.isEnabled();
+            this.destinations = Set.copyOf(destinations);
+        }
+    }
+
+    static Admission validateAndRemember(String catalogName, 
ConnectorSecuritySurface surface,
+            Map<String, String> properties, Admission previous) throws 
DdlException {
+        SecurityChecker checker = SecurityChecker.getInstance();
+        DebugPoint rejection = DebugPointUtil.getDebugPoint(REJECT_HOST_POINT);
+        if (!checker.isEnabled() && rejection == null) {
+            return null;
+        }
+        Map<String, Integer> storageEndpoints;
+        Map<String, List<String>> derivedStorageEndpoints;
+        try {
+            storageEndpoints = StorageEndpointProperties.endpoints(properties, 
DatasourcePrintableMap::isSensitiveKey);
+            derivedStorageEndpoints = 
StorageEndpointProperties.derivedEndpointValues(properties);
+        } catch (IllegalArgumentException e) {
+            // Storage routing can fail before URI parsing; never expose 
credential-bearing option values.
+            throw new DdlException("Cannot validate shared storage routing 
against the SSRF policy");
+        }
+        Map<String, List<HostAndPort>> parsedEndpoints = new LinkedHashMap<>();
+        Map<String, Integer> storageKeys = new 
LinkedHashMap<>(storageEndpoints);
+        derivedStorageEndpoints.keySet().forEach(key -> 
storageKeys.putIfAbsent(key, -1));
+        for (Map.Entry<String, Integer> entry : storageKeys.entrySet()) {
+            String key = entry.getKey();
+            int port = entry.getValue() < 0 ? 
surface.ssrfEndpointDefaultPort(key) : entry.getValue();
+            List<String> values = derivedStorageEndpoints.getOrDefault(key,
+                    properties.get(key) == null ? List.of() : 
List.of(properties.get(key)));
+            appendEndpoints(catalogName, key, values, port, entry.getValue() 
== 8020, properties, parsedEndpoints);
+        }
+        Map<String, Integer> serviceKeys = new LinkedHashMap<>();
+        for (String key : surface.ssrfEndpointKeys(properties)) {
+            serviceKeys.put(key, surface.ssrfEndpointDefaultPort(key));
+        }
+        // Driver downloads can connect during pre-validation, before a 
connector's connectivity test.
+        String flavor = surface.jdbcDriverUrlFlavorKey();
+        String flavorValue = flavor == null ? "jdbc" : 
properties.getOrDefault(flavor, "").trim();
+        if ("jdbc".equalsIgnoreCase(flavorValue)) {
+            for (String key : surface.jdbcDriverUrlKeys()) {
+                String value = properties.getOrDefault(key, 
"").trim().toLowerCase(Locale.ROOT);
+                if (value.startsWith("http://";) || 
value.startsWith("https://";)) {
+                    serviceKeys.put(key, -1);
+                }
+            }
+        }
+        // One property can feed metadata and storage clients with different 
normalization and ports.
+        // Keep both interpretations; a provider's inactive metadata alias 
cannot erase a storage route.
+        for (Map.Entry<String, Integer> entry : serviceKeys.entrySet()) {
+            String key = entry.getKey();
+            appendEndpoints(catalogName, key, surface.ssrfEndpointValues(key, 
properties.get(key)),
+                    entry.getValue(), false, properties, parsedEndpoints);
+        }
+        Set<HostAndPort> admitted = new LinkedHashSet<>();
+        if (previous != null && previous.checker == checker && 
previous.enabled == checker.isEnabled()) {
+            admitted.addAll(previous.destinations);
+        }
+        int rejectedPort = rejection == null ? -1 : rejection.param("port", 
-1);
+        for (Map.Entry<String, List<HostAndPort>> entry : 
parsedEndpoints.entrySet()) {
+            String key = entry.getKey();
+            for (HostAndPort destination : entry.getValue()) {
+                // A fail-only seam cannot bypass real policy or allow a 
connection, including receipt reuse.
+                if (rejection != null && 
destination.getHost().equals(rejection.param("host", "127.0.0.1"))
+                        && (rejectedPort < 0 || destination.getPort() == 
rejectedPort)) {
+                    throw new DdlException("Endpoint property '" + key + "' is 
rejected by the SSRF policy");
+                }
+                if (admitted.add(destination)) {
+                    checker.checkEndpointForSsrf(destination.getHost(), 
destination.getPort());
+                }
+            }
+        }
+        return new Admission(checker, admitted);
+    }
+
+    private static void appendEndpoints(String catalogName, String key, 
List<String> values, int defaultPort,
+            boolean hdfs, Map<String, String> properties, Map<String, 
List<HostAndPort>> parsed) throws DdlException {
+        try {
+            List<HostAndPort> destinations = parsed.computeIfAbsent(key, 
ignored -> new ArrayList<>());
+            for (String endpoint : values) {
+                if (endpoint == null || endpoint.trim().isEmpty()) {
+                    continue;
+                }
+                if (endpoint.contains("${")) {
+                    throw new DdlException("Endpoint property '" + key + "' 
must be literal under the SSRF policy; "
+                            + "a placeholder can change its destination after 
validation");
+                }
+                if (hdfs) {
+                    for (String authority : 
HdfsEndpointProperties.authorities(endpoint.trim(), properties)) {
+                        destinations.add(parseAuthority(authority, 8020));
+                    }
+                } else {
+                    destinations.addAll(parseEndpoints(endpoint.trim(), 
defaultPort));
+                }
+            }
+        } catch (IllegalArgumentException e) {
+            // Do not echo URLs: their authority or query can carry 
credentials.
+            throw new DdlException("Cannot validate endpoint property '" + key 
+ "' of catalog '"
+                    + catalogName + "' against the SSRF policy: use an 
explicit network URI or host:port");
+        }
+    }
+
+    /** Parses URI lists, multi-host authorities and scheme-less endpoints 
without splitting URL path commas. */
+    public static List<HostAndPort> parseEndpoints(String value, int 
defaultPort) {
+        String normalized = value.trim();
+        List<HostAndPort> result = parseUnnormalizedEndpoints(normalized, 
defaultPort);
+        if (normalized.regionMatches(true, 0, "jdbc:", 0, 5) && 
normalized.contains(" ")) {
+            // Standalone JDBC strips spaces; Paimon and Iceberg pass the raw 
URL to their drivers.
+            // Checking both interpretations prevents normalization from 
hiding an active host override.
+            LinkedHashSet<HostAndPort> destinations = new 
LinkedHashSet<>(result);
+            
destinations.addAll(parseUnnormalizedEndpoints(normalized.replace(" ", ""), 
defaultPort));
+            return new ArrayList<>(destinations);
+        }
+        return result;
+    }
+
+    private static List<HostAndPort> parseUnnormalizedEndpoints(String 
normalized, int defaultPort) {
+        List<HostAndPort> result = new ArrayList<>();
+        // An SRV seed is a discovery name, not a server at MongoDB's ordinary 
default port.
+        // Until discovery peers are modeled, require literal mongodb:// 
authorities under enforcement.
+        if (normalized.startsWith("mongodb+srv://")) {
+            throw new IllegalArgumentException("Unsupported MongoDB SRV 
discovery routing");
+        }
+        if (normalized.startsWith("mongodb://")) {
+            int authorityEnd = normalized.indexOf('/', "mongodb://".length());
+            authorityEnd = authorityEnd < 0 ? normalized.length() : 
authorityEnd;
+            int query = normalized.indexOf('?');
+            if (query >= 0) {
+                authorityEnd = Math.min(authorityEnd, query);
+            }
+            // MongoDB treats '#' in userinfo as ordinary bytes; Java URI ends 
its authority there.
+            // Reject that disagreement before either the database or proxy 
endpoint is probed.
+            int fragment = normalized.indexOf('#');
+            if (fragment >= 0 && fragment < authorityEnd) {
+                throw new IllegalArgumentException("Ambiguous MongoDB URI 
authority");
+            }
+            parseSingle(normalized, defaultPort, result);
+            addMongoProxy(normalized, result);
+            return result;
+        }
+        // JDBC-specific parameters and Oracle descriptors are not ordinary 
URI authorities.
+        if (normalized.regionMatches(true, 0, "jdbc:mysql:", 0, 11)
+                || normalized.regionMatches(true, 0, "jdbc:mysql+srv:", 0, 
15)) {
+            return JdbcEndpointParser.mysql(normalized);
+        }
+        if (normalized.startsWith("jdbc:mariadb:")) {
+            return JdbcEndpointParser.mariaDb(normalized);
+        }
+        if (normalized.startsWith("jdbc:oceanbase:")) {
+            return JdbcEndpointParser.oceanbase(normalized);
+        }
+        if (normalized.startsWith("jdbc:postgresql:")) {
+            return JdbcEndpointParser.postgresql(normalized);
+        }
+        if (normalized.startsWith("jdbc:sqlserver://")) {
+            return JdbcEndpointParser.sqlServer(normalized);
+        }
+        if (normalized.startsWith("jdbc:oracle:thin:")) {
+            return JdbcEndpointParser.oracle(normalized);
+        }
+        if (normalized.startsWith("jdbc:clickhouse:") || 
normalized.startsWith("jdbc:ch:")) {
+            return JdbcEndpointParser.clickhouse(normalized);
+        }
+        if (normalized.startsWith("jdbc:trino:") || 
normalized.startsWith("jdbc:presto:")) {
+            return JdbcEndpointParser.trinoOrPresto(normalized);
+        }
+        if (normalized.startsWith("jdbc:sap:")) {
+            return JdbcEndpointParser.sap(normalized);
+        }
+        if (normalized.startsWith("jdbc:db2:") || 
normalized.startsWith("jdbc:ibmdb:")
+                || normalized.startsWith("jdbc:ids:") || 
normalized.startsWith("jdbc:informix-sqli:")
+                || normalized.startsWith("jdbc:db2os390:") || 
normalized.startsWith("jdbc:db2os390sqlj:")) {
+            return JdbcEndpointParser.db2(normalized);
+        }
+        if (normalized.startsWith("postgresql://") || 
normalized.startsWith("postgres://")) {
+            validateNativePostgresql(normalized);
+            parseSingle(normalized, defaultPort, result);
+            return result;
+        }
+        if (normalized.startsWith("jdbc:")) {
+            normalized = normalized.substring(5);
+        }
+        for (String endpoint : 
normalized.split(",(?=\\s*[A-Za-z][A-Za-z0-9+.-]*://)", -1)) {

Review Comment:
   [P2] Preserve commas within a single HTTP endpoint
   
   A comma followed by URL-shaped text is valid inside a single HTTP path or 
query. This split treats that text as a second destination, so an enabled 
checker can reject an otherwise allowed REST endpoint based on a host the 
client never contacts. Declare list semantics on the properties that consume 
endpoint lists and assert that a single web URI produces exactly one probe.



##########
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:
   [P3] Qualify which Java calls enter the runtime scope
   
   `HiveConnector.createClient` gives `ThriftHmsClient` a direct action for 
DLF-only calls and a plugin `doAs` action when it owns authentication. Those 
branches have endpoint admission but do not enter `executeNetworkChecked` for 
client setup or later RPCs. Scope the documented guarantee to the covered call 
paths, or apply the independent check at the Hive action boundary.



##########
fe/fe-foundation/src/main/java/org/apache/doris/foundation/security/JdbcProxyPropertySecurity.java:
##########
@@ -0,0 +1,146 @@
+// 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.foundation.security;
+
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/** Projects independent JDBC property routes without initializing the 
operator-selected driver. */
+public final class JdbcProxyPropertySecurity {
+    private static final List<String> UNMODELED_JDBC_ROUTE = 
List.of("http://unmodeled-jdbc-route:0";);
+
+    private JdbcProxyPropertySecurity() {
+    }
+
+    /** The metastore holders bind the first nonblank URI alias, independently 
of driver options. */
+    public static String metastoreUriKey(Map<String, String> properties, 
String connectorAlias) {
+        String uri = properties.get("uri");
+        return uri != null && !uri.isBlank() ? "uri" : connectorAlias;

Review Comment:
   [P2] Use the metastore binder’s URI alias selection
   
   The Iceberg and Paimon JDBC holders decide whether `uri` is present after 
trimming with `ConnectorPropertiesUtils`. This helper uses `String.isBlank()`, 
so the binder and admission can select different aliases. The gate can then 
discard the trim-empty value and suppress the fallback that the JDBC client 
actually uses. Share the binder’s alias selection rule and test that admission 
and binding agree on the selected URI.



##########
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:
   [P2] Derive a regional S3 endpoint only when S3 is selected
   
   An inferred OSS catalog can use `AWS_REGION` with a valid native 
`oss.endpoint`. The OSS holder recognizes that legacy region key, while 
`S3FileSystemProvider.supportsGuess` selects no S3 provider on that input. This 
regional derivation still adds an AWS destination, so a policy denial for an 
unused service can block the catalog. Share the S3 selection predicate and 
cover inferred OSS alongside explicit S3 selection.



##########
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:
   [P2] Check the Iceberg OAuth endpoint selected by the client
   
   For client-credentials OAuth, 
`IcebergCatalogFactory.appendRestOAuth2Properties` writes the nonblank bound 
`iceberg.rest.oauth2.server-uri` over the raw `oauth2-server-uri` SDK option. 
Registering both absolute URLs can cause CREATE, ALTER, or lazy initialization 
to fail because of the retired raw endpoint. Share the effective OAuth option 
selection and cover the raw fallback when the typed option is cleared.



-- 
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