-
Notifications
You must be signed in to change notification settings - Fork 23
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
Deprecate SNI endpoints and figure out a replacement #129
Comments
I guess you could buffer incoming data long enough to see whether it looks like |
Wouldn't actually work because we're listening on the wrong port (we're listening on something that gets port 443 traffic, but we need port 80 traffic). I suppose we could just open up a new port, but the syntax to specify it would be awful. |
It looks like tls-sni will live on in tls-sni-03, so we don't necessarily need to kill it, but we should document prominently that it won't work for new users at the moment. |
The syntax can be an exercise for the reader here, but endpoints aren't necessarily the wrong way to do this. We just need an endpoint that listens on 2 underlying ports; one HTTP + redirect + .well-known, and one HTTPS. |
According to https://tools.ietf.org/html/draft-ietf-acme-acme-01#page-37 (but I don’t know if Let’s Encrypt actually does it), https can also be used for validation, in which case the certificate is ignored. |
I just stumbled into this, spent an hour debugging until I remembered that I wound up building the 80+443 site that Glyph mentioned (except without the redirect). I'll polish it up and see if it might work as a different form of endpoint descriptor. The At the very least it'd be nice to have a single function/constructor to build these endpoints. The code I wrote had to import a lot of details from |
+1 to both. |
@warner anything ever come of this? |
Not yet.. lemme see what I can get done this weekend. |
Ok, here's what I'm thinking: We'll want an Endpoint class, and a parseable The Endpoint will own the http-01 responder (which must be reachable by the target domain name, on port 80, speaking plain HTTP, and serving a The most common use case is for HTTP, so by default the Endpoint should also redirect everything that isn't The Endpoint needs a place to hold its certs, as usual. The Endpoint also owns the However it'd be nice to allow some future kwargs for the ACME process (personally I'm eager to see #112, maybe as The Endpoint doesn't need to run the HTTPS server, that's up to the caller. But it does need to run the HTTP server. So how about: def MumbleAcmeHTTP01Endpoint(reactor, certPath, tlsEndpoint=None,
responderEndpoint=None, forwardHTTP=True):
assert IFilePath.providedBy(certPath)
if tlsEndpoint is None:
tlsEndpoint = serverFromString("tcp:443")
if responderEndpoint is None:
responderEndpoint = serverFromString("tcp:80")
txsniEndpoint = txsni.tlsendpoint.TLSEndpoint(tlsEndpoint, SNIMap(..))
...
return acmeEndpoint
# non-redirecting usage:
ep = MumbleAcmeHTTP01Endpoint(reactor, certPath, forwardHTTP=False)
ep.httpSite # not sure what this is good for, but available
ep.httpRoot.putChild(b"", static.File(root_document))
ep.httpRoot.getStaticEntity(".well-known").putChild(b"other-thing", thing) and an endpoint syntax of:
Where the optional arguments (with examples) are:
My primary uncertainties:
Is there some clever way to allow the |
This all sounds encouraging as a spec, very much in line with my own thinking. If you’ve got the energy for a PR, I think that is the next step:) |
yep, I'll take it |
That all sounds good, but I have one concern:
A lot of useful endpoints to listen on will take weird arguments, I think; for example, systemd, or tor. By saying "the ones that we know are useful" what you're really saying is "only tcp can be used" which seems unfortunate. A suggestion made elsewhere is that we name our own arguments like |
Good point, I agree we should do whatever we can to enable generality of the string form, and I'm happy to have the txacme-specific arguments take a prefix to avoid collisions. The problem I don't know how to solve is that we've got two separate endpoints that could both be receiving arbitrary future-extension arguments. The "responder endpoint" (which must be visible at port 80 from the LetsEncrypt challenge servers, but of course this could be routed through systemd or Huh, what if we said that every |
99% of the time I think you'll want to use the defaults, so a wordy escaping strategy is totally fine with me. As long as |
The major place I could see actually wanting something sophisticated would be in combination with the |
I don't know if anyone is actually using txacme with systemd port activation or txtorcon, but those seem like obvious use cases that I'd really like to support easily if it's not going to make the whole thing awful. OTOH it's not worth it if the "easy" endpoint ends up being hard. |
https://github.com/warner/txacme/blob/129-http01-endpoint/src/txacme/endpoint_http01.py is my first cut. Not ready for a PR yet (no tests, no parser, and I haven't even tried to run it), but feedback still welcome. |
LGTM. I have some potential comments on some minor issues, but I'll save those for when the branch is actually complete, since no doubt the code will change some in that process anyway; the overall design seems good though. I notice you would benefit from #108 being resolved. |
I've started getting NoSupportedChallenge errors for TLS-SNI. When is ALPN or HTTP-01 expected to be supported? |
Unfortunately nobody seems to be actively working on these, but see #136 . |
The endpoints rely on the
tls-sni-01
challenge to operate, which is dead. We shoulddeprecate them ASAP to avoid confusing peopleswitch them to usetls-alpn
(#136), and figure out some replacement (probably usinghttp-01
) that is as easy to use. (Unfortunately I'm not sure this is possible 😿 )The text was updated successfully, but these errors were encountered: