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


##########
fe/fe-connector/fe-connector-trino/src/main/java/org/apache/doris/connector/trino/TrinoConnectorProvider.java:
##########
@@ -66,6 +66,11 @@ public void validateProperties(Map<String, String> 
properties) {
     @Override
     public ConnectorSecuritySurface securitySurface() {
         return 
ConnectorSecuritySurface.ofSensitiveKeyPrefix(TrinoCatalogProperties.TRINO_PROPERTIES_PREFIX,
-                "key", "secret", "password", "token", "credential");
+                "key", "secret", "password", "token", "credential")
+                .withSsrfEndpoints("trino.hive.metastore.uri", 
"trino.iceberg.rest-catalog.uri",
+                        "trino.iceberg.rest-catalog.oauth2.server-uri")
+                .withSsrfEndpoints("trino.s3.endpoint", 
"trino.hive.s3.endpoint",
+                        "trino.hive.metastore.glue.endpoint-url", 
"trino.hive.metastore.glue.sts.endpoint")
+                
.withSsrfEndpointPrefixes(TrinoCatalogProperties.TRINO_PROPERTIES_PREFIX);

Review Comment:
   Fixed in db6c8acbdf56e57981594ee7b5d85604bc394804. The fix derives the stock 
Trino 435 Hive S3 proxy peer from the explicit host/port tuple before generic 
inference. A positive literal port is checked independently of proxy protocol 
and S3 SSL; explicit zero remains disabled. Missing, negative or invalid ports 
fail closed only with enforcement enabled because AWS can inherit process 
configuration. Proxy authentication and bypass patterns remain opaque. 
Regressions cover CREATE with an allowed metastore, the real ALTER gate with 
allowed service endpoints, stored-host activation, protocol-only updates, IPv6, 
port boundaries and disabled policy. Validation on the identical committed 
tree: 127 classes / 1,898 unit tests passed, FE Checkstyle and packaging 
passed, and the standard SQL suite passed 169 expected rejections plus 9 
positive CREATE and 3 positive ALTER statements. The proprietary checker and 
live external service behavior are outside these local checks.



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