hello-stephen commented on code in PR #71205:
URL: https://github.com/apache/doris/pull/71205#discussion_r4772470547
##########
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:
[P2] Check the stock Trino S3 proxy tuple during admission
With the stock Hive plugin installed, an allowed metastore/S3 endpoint can
be combined with `trino.hive.s3.proxy.host=127.0.0.1` and
`trino.hive.s3.proxy.port=9000`. These keys match neither the endpoint suffixes
nor HTTP(S) value inference, and shared storage parsing does not recognize the
`trino.` namespace. `TrinoCatalogProperties` strips that prefix and forwards
the tuple unchanged; [Trino 435 documents it as the S3 network
proxy](https://trino.io/docs/435/connector/hive-s3.html#s3-configuration-properties).
Consequently CREATE with `test_connection=false` and ALTER admit a configured
peer that the policy never probes. This concerns statement admission
independently of runtime interception. Derive and check the effective proxy
destination, or reject active unmodeled proxy settings under enforcement, and
add rejecting CREATE/ALTER coverage with allowed service endpoints.
--
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]