Gabriel39 commented on code in PR #71205:
URL: https://github.com/apache/doris/pull/71205#discussion_r4772273301
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergConnectorProvider.java:
##########
@@ -98,6 +99,97 @@ public ConnectorSecuritySurface securitySurface() {
// 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"))
- .withSsrfEndpoints("kms.endpoint");
+ .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.endpoint", "dlf.catalog.endpoint");
+ }
+
+ @Override
+ public ConnectorSecuritySurface securitySurface(Map<String, String>
properties) {
+ ConnectorSecuritySurface surface = securitySurface();
+ Map<String, String> endpointProperties = new HashMap<>(properties);
Review Comment:
Fixed in `4b83cc48ed19`.
Admission now derives literal Google token endpoints from both
`gcp.auth.credentials-json` and the active
`client.credentials-provider.gcp.auth.credentials-json` overlay. It reuses the
SDK GenericJson parser, preserving final duplicate fields and escaped names
while leaving the original credential JSON unchanged and sensitive. Private
keys, client secrets, certificate URLs and other inert fields are not
interpreted as peers; parse/URI failures retain no credential input or cause.
The pinned 1.46 source and shipped bytecode establish four simple models:
service_account/authorized_user/gdch_service_account use token_uri, and
external_account_authorized_user uses token_url. Missing token_uri defaults
only for the first two; empty authorized_user uses that default, whereas empty
service_account is rejected. GDCH/external authorized user require explicit
endpoints. Complex external_account/impersonated_service_account routing fails
closed under enforcement. The surface defers malformed/unmodeled routing to the
policy gate, preserving disabled-policy behavior and operator path/ADC fallback
without opening files or resolving credentials.
Regression sensitivity: the previous implementation ran 414 cases with 3
expected assertion failures; an intermediate two-type model ran 465 cases with
8 expected failures for the other simple types. Final local verification
passed: full FE Checkstyle; 120 classes / 1760 tests, including 465 endpoint
cases and all 40 SPI classes / 184 tests, with zero failures/errors/skips; both
API baselines; forced FE packaging with 37 API42 markers and nine
compiled/shipped class matches. Standard SQL passed 95 CREATE + 58 ALTER
rejections, eight positive CREATE admissions and two positive ALTERs. The
independent upstream Google suite passed 30 expected malformed-field errors and
one valid catalog. HTTP authentication stayed enabled before any HTTP and after
both suites, both credential JSON values stayed masked, and all owned runtime
processes/ports were cleaned up. Positive SQL includes a Google credential
type/endpoint change on ALTER; negative CREATE/ALTER covers direct/provider
destination
s and complex routing. No live OAuth or proprietary SDK validation is claimed.
--
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]