Repository navigation
HADOOP-19958. Support IPv6 delegation token service addresses - #8669
Conversation
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Pull request overview
This PR addresses ambiguity in delegation token service identifiers when the host is an IPv6 literal by introducing a consistent bracketed "[host]:port" representation and ensuring socket address creation accepts bracketed IPv6 authorities.
Changes:
- Add
NetUtils.getHostPortString(host, port)to formathost:portwhile bracketing IPv6 literals. - Update delegation token service string construction to use the shared host/port formatter.
- Add tests covering IPv6 host/port formatting, bracketed IPv6 socket address parsing, and delegation token service round-trips.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java | Updates token-service string expectations and adds an IPv6 token service round-trip test. |
| hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java | Adds tests for IPv6 host/port formatting, bracketed parsing, and rejection of ambiguous unbracketed IPv6 authorities. |
| hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java | Uses the shared host/port formatter when building token service identifiers. |
| hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/net/NetUtils.java | Adds IPv6-aware host/port formatting and strips brackets from parsed URI hosts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This comment was marked as outdated.
This comment was marked as outdated.
ed1d90c to
52966be
Compare
jojochuang
left a comment
There was a problem hiding this comment.
Review of the rebased branch — inline comments on specific areas.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
Generated-by: Codex (GPT-5.6 Sol)
Description of PR
Jira: HADOOP-19958
Parent Jira: HADOOP-11890
Delegation token services use
host:port. This representation is ambiguous when the host is an IPv6 literal.This change:
NetUtilshelper that formats IPv6 addresses as[host]:port;hadoop.security.token.service.use_ipistrueorfalse;How was this patch tested?
JAVA_HOME=<JDK17> mvn -B -pl :hadoop-common -Dtest=TestNetUtils,TestSecurityUtil test --no-transfer-progressgit diff --check asf/trunk...HEADFor code changes:
(e.g. 'HADOOP-17799. Your PR title ...')?
declared according to the connector-specific documentation? Note: Automated CI
testing doesn't cover all cases so manual testing with cloud storage is still
required. Not applicable to this change.
under ASF 2.0? No new dependencies are added.
LICENSE,LICENSE-binary,NOTICE-binaryfiles?No license or notice changes are required.
AI Tooling
Contains content generated by Codex.
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html