Document blocking SPNEGO hostname lookup#2278
Open
pavel-ptashyts wants to merge 1 commit into
Open
Conversation
Canonical-hostname resolution is opt-in but performs a synchronous JVM lookup while deriving the Kerberos service principal. Authentication retries can invoke that lookup on a Netty event-loop thread. Document the blocking behavior and direct users with a known principal to the existing explicit service-principal setting. Codex on behalf of Pavel Ptashyts Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
setServicePrincipalName(...), which avoids hostname canonicalizationMotivation
setUseCanonicalHostname(true)is opt-in, butSpnegoEnginederives the service principal withInetAddress.getByName(...).getCanonicalHostName(). This synchronous lookup can delay unrelated channel work when authentication is retried from an event-loop thread.Changing or bypassing canonicalization can select a different Kerberos service principal and break authentication. Adding an AsyncHttpClient-specific cache would also introduce hostname freshness semantics separate from the JVM DNS cache, while not eliminating the first blocking lookup. This PR therefore documents the risk and the existing behavior-preserving mitigation without changing runtime semantics.
Validation
./mvnw -B -ntp -pl client -DskipTests -Dgpg.skip=true verify(compilation, Javadocs, and Revapi)The required JDK 11
./mvnw clean verifywas not run because JDK 11 is not available in the local environment. This documentation-only change does not alter runtime behavior; CI will exercise the supported JDK matrix.Codex on behalf of Pavel Ptashyts