rjgoyln opened a new pull request, #11124: URL: https://github.com/apache/ozone/pull/11124
## What changes were proposed in this pull request? A client that reaches the S3 Gateway over an IPv6 address has to use path style access, because virtual host style is not available on an address literal. `VirtualHostStyleFilter` still matched such a Host header the way it matches a DNS name: by suffix, and as text. Neither holds for an address. With `ozone.s3g.domain.name` set to `[::1]`, a request from `Host: [2001:db8::1]:9878` was answered with "Host is in invalid format", the filter having read `2001:db8` as a bucket name; and a client writing the gateway's own address as `[0:0:0:0:0:0:0:1]` did not match the domain at all. An IPv6 literal host is now compared as an address, against the whole host. DNS and IPv4 matching is unchanged. The tests cover what this JIRA asks for that does not need an IPv6 listener: path style Host headers with and without a port, either spelling of the same address, an address outside the configured domain, and a SigV4 string to sign that carries the bracketed Host through unchanged. HTTPS endpoint verification, proxy forwarding, and virtual host style through a DNS name with an AAAA record all need a gateway that actually listens on an IPv6 address, so they stay behind HDDS-15778 and this JIRA stays open. That blocker is concrete: `BaseHttpServer.getBindAddress` joins host and port as `host + ":" + port`, so `ozone.s3g.http-address=[::1]:9878` becomes `::1:9878`, which `NetUtils.createSocketAddr` rejects. Rejecting unbracketed IPv6 Host values outright is also left out, since such a value is already rejected unless it names the gateway and requiring brackets would change the contract of the `checkHostWithoutPort` helper added by HDDS-15776. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16140 ## How was this patch tested? `mvn -pl :ozone-s3gateway test checkstyle:check`: 768 tests pass, checkstyle clean. The new filter cases fail without the change. --- Generated-by: Claude Code (Opus 5) -- 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]
