-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
va: Support IP address identifiers #8020
base: main
Are you sure you want to change the base?
Conversation
…nstead; remove invalid bad port test
…Pv6 in URL construction; add test cases
I've done an initial review of the Let's Encrypt CP/CPS, the Baseline Requirements, and RFC 8738. I didn't find anything that would prevent validating IP addresses using these same functions, or that would prevent accepting HTTP redirects to bare IP addresses. |
@@ -838,51 +915,33 @@ func TestFetchHTTP(t *testing.T) { | |||
}, | |||
}, | |||
{ | |||
Name: "Connecting to bad port", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this test. What it really tested was a doubled port: example.com:80:80
. This is no longer structurally possible now that we more fully separate the port from the hostname inside the VA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love adding a ipv6
bool to the http and tlsalpn test srvs, but I don't see a better solution right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great, just a few comments to be addressed. Please let me know if you have any questions.
va/va.go
Outdated
ident, err := identifier.FromProtoOrName(req.Identifier, req.DnsName) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
if core.IsAnyNilOrZero(req, ident, req.Challenge, req.Authz, req.ExpectedKeyAuthorization) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here an elsewhere, I would expect these two to be swapped. First we want to check that the request we received contained all of the required fields, then we want to validate those fields and perform the necessary conversions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd gotten some feedback about this structure that I think is mildly conflicting: #7961 (comment)
But I've reworked FromProtoOrName
to be simpler (and also more closely track the other PR's approach) and added TODOs to these call sites that will let us restore this order pretty shortly. Did this end up looking OK, or would you still prefer a re-order here?
Add an
identifier
field to theva.PerformValidationRequest
proto, which will soon replace itsdnsName
field.Accept and prefer the
identifier
field in every VA function that uses this struct. Don't (yet) assume it will be present.Throughout the VA, accept and handle the IP address identifier type. Handling is similar to DNS names, except that
getAddrs
is not called, and consider that:x509.Certificate
struct..arpa
) names in SNI for TLS-ALPN-01 challenge requests.For HTTP-01 challenges, accept redirects to bare IP addresses, which were previously rejected.
Fixes #2706
Part of #7311