tuantran0910 commented on code in PR #62988:
URL: https://github.com/apache/doris/pull/62988#discussion_r4665267167
##########
fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergCatalogFactory.java:
##########
@@ -570,10 +595,20 @@ public static void appendRestProperties(Map<String,
String> opts, IcebergRestMet
// Timeouts: legacy fields default non-blank, so they are effectively
always emitted.
opts.put(REST_CONNECTION_TIMEOUT_MS_KEY,
rest.getConnectionTimeoutMs());
opts.put(REST_SOCKET_TIMEOUT_MS_KEY, rest.getSocketTimeoutMs());
+ putIfNotBlank(opts, CatalogProperties.FILE_IO_IMPL, rest.getIoImpl());
+ putIfNotBlank(opts, REST_GOOGLE_USER_PROJECT_HEADER,
rest.getGoogleUserProject());
appendRestOAuth2Properties(opts, rest);
+ appendRestGoogleProperties(opts, rest);
appendRestSigningProperties(opts, rest, props, chosenS3);
}
+ private static void appendRestGoogleProperties(Map<String, String> opts,
IcebergRestMetaStoreProperties rest) {
+ if (!SECURITY_TYPE_GOOGLE.equalsIgnoreCase(rest.getSecurityType())) {
+ return;
+ }
+ opts.put(AuthProperties.AUTH_TYPE,
AuthProperties.AUTH_MANAGER_IMPL_GOOGLE);
Review Comment:
Thanks, agreed: once `iceberg-gcp` is bundled, `gcs.service.host` and
`gcs.oauth2.refresh-credentials-endpoint` reach `GCSFileIO` through the raw
catalog properties, and the gate does not probe them.
I'd like to handle this in a follow-up PR rather than here:
- The gate is a no-op unless an SSRF checker is configured
(`security_checker_class_name`).
- On master, the Iceberg connector already declares only `kms.endpoint`, so
the REST `uri`, `iceberg.rest.oauth2.server-uri` and `s3.endpoint` are not
probed either.
The follow-up will declare `gcs.service.host` and
`gcs.oauth2.refresh-credentials-endpoint` in
`IcebergConnectorProvider.securitySurface()`, with a provider test.
`gcp.auth.credentials-json` and `gcp.auth.credentials-path` are not
supported options in this PR, which documents only Application Default
Credentials. The gate cannot probe them as endpoints, since their hosts sit
inside a credentials JSON (`token_uri`, `credential_source.url`). I'll add
proper support for them later, with validation of the credential type and token
endpoints.
Declaring the REST `uri` and the other existing Iceberg endpoints changes
every Iceberg catalog, so I'd keep that separate. Happy to fold the GCS part
into this PR instead if you prefer.
--
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]