hello-stephen commented on code in PR #71089:
URL: https://github.com/apache/doris/pull/71089#discussion_r4740353539
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/plugin/PluginDrivenExternalCatalog.java:
##########
@@ -423,7 +424,9 @@ private void checkEndpointsAgainstSsrf(Map<String, String>
candidate, Map<String
}
// A value may list several comma-separated endpoints (e.g. HA
hive.metastore.uris).
for (String endpoint : rawValue.split(",")) {
- HostAndPort hostAndPort = parseEndpoint(endpoint.trim());
+ // A bare host can still name a concrete destination when the
client supplies its port.
+ HostAndPort hostAndPort = parseEndpoint(endpoint.trim(),
Review Comment:
[P1] Match the SDK's authority parsing for scheme-less DLF endpoints
With an SSRF checker configured, a user with `CREATE CATALOG` can supply
`[email protected]:443/.aliyuncs.com`, valid DLF
credentials/region, explicit OSS endpoint/region and `test_connection=false`.
The scheme-less parser probes `[email protected]:443`;
`SecurityChecker.checkEndpointForSsrf` ignores the resulting
hostname-resolution failure. The SDK instead treats the prefix before `@` as
URL userinfo and connects to `127.0.0.1:443`. The added
`ThriftHmsClientDlfTest.sdkParsesAuthorityDelimitersInAnInterpolatedRegion`
already encodes this exact endpoint shape against the production SDK. Explicit
endpoints bypass the region-delimiter validation and reach that client
unchanged, so CREATE and ALTER accept a destination the configured policy never
checked. Both DLF endpoint aliases and native Iceberg use this path. Parse
scheme-less values with the SDK's URL semantics, or reject authority
delimiters, and cover both aliases through the actual CREATE/ALTER gate.
--
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]