danielcweeks commented on code in PR #17457:
URL: https://github.com/apache/iceberg/pull/17457#discussion_r3917062663


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java:
##########
@@ -229,6 +231,21 @@ public class S3FileIOProperties implements Serializable {
    */
   public static final String ENDPOINT = "s3.endpoint";
 
+  /**
+   * Comma-separated list of host suffixes that catalog-vended pre-signed 
HTTP(S) reads are allowed
+   * to target (for example {@code amazonaws.com}). A URL's host must equal, 
or be a dotted
+   * subdomain of, a listed suffix; reads to any other host, or over plain 
HTTP, are rejected. The
+   * configured {@link #ENDPOINT} host, when set, is always allowed.
+   *
+   * <p>When unset, this defaults to AWS S3 domains ({@code amazonaws.com}, 
{@code
+   * amazonaws.com.cn}). Because a REST catalog can vend {@code s3.*} 
properties, operators that do
+   * not fully trust their catalog should set this client-side.
+   */
+  public static final String PRESIGNED_READ_ALLOWED_HOSTS = 
"s3.presigned-read.allowed-hosts";
+
+  static final Set<String> PRESIGNED_READ_ALLOWED_HOSTS_DEFAULT =
+      Collections.unmodifiableSet(Sets.newHashSet("amazonaws.com", 
"amazonaws.com.cn"));

Review Comment:
   Why is this necessary? We shouldn't be prescribing the hosts or managing 
them from the client.  The host is a catalog concern, the client should only 
process the request.



-- 
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]

Reply via email to