Repository navigation
httpchallenge: optionally verify client IP against hostname DNS - #7240
Merged
amartinezfayo merged 3 commits intoSep 7, 2026
Merged
Conversation
samuraixwandering
marked this pull request as ready for review
August 24, 2026 03:24
samuraixwandering
requested review from
MarcosDY,
amartinezfayo,
evan2645,
rturner3 and
sorindumitru
as code owners
August 24, 2026 03:24
amartinezfayo
left a comment
Member
There was a problem hiding this comment.
Thank you @samuraixwandering!
When verify_client_ip is set, the peer IP from X-Forwarded-Client-IP must match a DNS address for the attested hostname. Default is off. Signed-off-by: samuraiXwandering <[email protected]>
The new config row was one space short of the header pipes, which failed MD060 in lint-md. Signed-off-by: samuraiXwandering <[email protected]>
New() installs the default resolver, so the extra constructor and defaultLookupIPs are gone. BuiltInTesting takes the lookup hook. Test hooks use t.Error instead of t.Fatal. Signed-off-by: samuraiXwandering <[email protected]>
samuraixwandering
force-pushed
the
httpchallenge-verify-client-ip
branch
from
September 2, 2026 03:57
88674cd to
c79873b
Compare
amartinezfayo
approved these changes
Sep 7, 2026
amartinezfayo
left a comment
Member
There was a problem hiding this comment.
Thank you @samuraixwandering!
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.
Pull Request check list
Affected functionality
Server-side
http_challengenode attestor. Optional config only; default behavior is unchanged.Description of change
Adds
verify_client_ipto the http_challenge server plugin (defaultfalse), following the x509pop option introduced in #6911 and the sshpop work in #7191.When enabled, the connecting peer IP (from
X-Forwarded-Client-IPon the node attestor facade) is checked against the DNS addresses for the attested hostname. Lookup failure or no matching address fails attestation. The check runs after hostname validation and before the HTTP challenge.This is the second of the two remaining plugins from #6769 (sshpop merged as #7191). Split per maintainer guidance.
The IP comes from
ClientIPFromContext, the helper added in #7191, so sshpop and this plugin read the metadata the same way. The DNS lookup gets a 10s timeout on the stream context. That's the same budget as the challenge fetch, but derived from the stream so an agent hanging up cancels the lookup.Test plan
go test ./pkg/server/plugin/nodeattestor/httpchallenge/Part of #6769