github-actions[bot] commented on code in PR #70965:
URL: https://github.com/apache/doris/pull/70965#discussion_r4694793124
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/AbstractIcebergProperties.java:
##########
@@ -234,6 +280,46 @@ public void toFileIOProperties(List<StorageProperties>
storagePropertiesList,
fileIOProperties.put(AwsClientProperties.CLIENT_REGION,
region);
}
}
+ preserveHadoopGcsFileIO(storagePropertiesList, fileIOProperties, conf);
+ }
+
+ protected void preserveHadoopGcsFileIO(List<StorageProperties>
storagePropertiesList,
+ Map<String, String> fileIOProperties, Configuration conf) {
+ boolean rest =
IcebergExternalCatalog.ICEBERG_REST.equals(getIcebergCatalogType());
+ String ioImpl = fileIOProperties.get(CatalogProperties.FILE_IO_IMPL);
+ if (!ResolvingFileIO.class.getName().equals(ioImpl) && !(rest &&
ioImpl == null)) {
+ return;
+ }
+ if (rest && ((IcebergRestProperties)
this).isIcebergRestVendedCredentialsEnabled()) {
+ return;
+ }
+ // SDK storage options (including encryption and billing) must retain
their native semantics.
+ // REST-only gcp.auth.* options do not select a storage identity.
+ if (NativeGcsResolvingFileIO.hasSdkGcsProperties(fileIOProperties)) {
Review Comment:
[P1] Restrict native GCS hosts before using operator ADC
A catalog creator can leave REST security as `none`, set `gcs.project-id=p`
and `gcs.service.host=https://attacker.example`, omit storage credentials, and
return a table with a `gs://` manifest-list from a controlled REST catalog.
Planning a SELECT then sends the FE's reusable storage bearer token to that
host before a successful storage response is needed. The newly available native
[PrefixedStorage](https://github.com/apache/iceberg/blob/apache-iceberg-1.11.0/gcp/src/main/java/org/apache/iceberg/gcp/gcs/PrefixedStorage.java#L73-L93)
applies this host while leaving credentials unset; Google Storage consequently
uses operator ADC. Its universe-domain check does not validate the endpoint
hostname. The new `readsCsekMetadataWithBillingProjectAndOperatorAdc` test
itself models ADC reaching a custom storage host.
This is a distinct instance from thread 4692986775: no Google REST auth or
REST-origin bearer is involved, so restricting REST catalog destinations leaves
this storage path exposed. Apply an operator-controlled destination policy
before native GCS uses default/impersonated identity, including late table and
matching storage-credential options, or require explicit caller credentials for
untrusted hosts.
--
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]