-
Notifications
You must be signed in to change notification settings - Fork 213
auth: Add HTTP-based authentication support to validate domain ownership #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@claude can you review this PR? |
Claude finished @domdomegg's task —— View job Code Review Complete ✅This PR adds HTTP-based authentication to validate domain ownership as an alternative to DNS authentication. Overall, this is a well-implemented feature with good security considerations and comprehensive testing. Detailed Code Review✅ StrengthsSecurity Considerations:
Code Quality:
Testing:
🔍 Areas for ImprovementSecurity & Validation:
Code Issues:
Documentation: 🚨 Critical IssuesMissing Dependencies: The HTTP auth handler references functions from the DNS auth file:
These functions need to be:
📋 Minor ObservationsBehavioral Differences from DNS:
Implementation Details:
🔧 Required FixesBefore merging, please address:
📊 SummaryThis is a solid implementation that properly addresses the SSRF concerns mentioned in the PR description. The security model is sound, the code follows existing patterns well, and the test coverage is comprehensive. The publisher tool integration is clean and maintains consistency with the DNS auth approach. The main issues are easily fixable function dependency problems rather than architectural concerns. |
Response to Claude review:
|
The base branch was changed.
73159cb
to
02203e0
Compare
// rebased on main, after squash merging #85 |
Add HTTP-based authentication to prove domain ownership, similar to #238 DNS authentication but using HTTPS well-known URIs instead of DNS TXT records.
Fixes #280
Motivation and Context
Some organizations don't have easy access to DNS records, but can easily deploy web assets. They would therefore prefer to be able to complete a HTTP challenge rather than a DNS one to authenticate to the registry.
This would in some way mirror ACME challenges: where you can do a DNS-01 or a HTTP-01 challenge.
How Has This Been Tested?
Breaking Changes
None
Types of changes
Checklist
Additional context
I concern I had when building this that it might expose us to SSRF attacks.
I think on reflection this is not a significant problem:
.well-known/mcp-registry-auth
(redirects disallowed) after sanitizing the domain, and then also don't expose the response to the user. This means the user shouldn't be able to hit anything very interesting.