RussellSpitzer commented on code in PR #17457: URL: https://github.com/apache/iceberg/pull/17457#discussion_r3919009328
########## aws/src/main/java/org/apache/iceberg/aws/s3/S3PresignedReadValidation.java: ########## @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.iceberg.aws.s3; + +import java.net.URI; +import java.util.Locale; +import java.util.Set; +import org.apache.iceberg.exceptions.ValidationException; + +/** + * Restricts catalog-vended pre-signed reads to HTTPS URLs on operator-trusted hosts, before {@link + * S3FileIO} fetches them over HTTP with no S3 credentials. This bounds a compromised or malicious + * catalog to naming files on the expected storage hosts rather than turning the reader into a + * general-purpose fetcher of arbitrary URLs. + */ +class S3PresignedReadValidation { Review Comment: I was worried about this before because I'm terrified of driving a client to a uri that somehow gives access to the client. But I now think we can't actually do anything intelligent here because we don't really now what the endpoints should be. -- 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]
