-
Notifications
You must be signed in to change notification settings - Fork 15
ACME: tls-alpn-01 challenge implementation #27
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
base: main
Are you sure you want to change the base?
Conversation
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
I have hereby read the F5 CLA and agree to its terms |
fbc053f
to
e6f66cf
Compare
be0c668
to
285d4f3
Compare
8658e26
to
0dfab5e
Compare
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.
Pull Request Overview
This PR implements the tls-alpn-01
challenge for ACME certificate validation as defined in RFC8737. The TLS ALPN challenge requires serving a special certificate with key authorization extension on port 443 when the client advertises the acme-tls/1
ALPN protocol.
Key changes implemented:
- Added complete TLS ALPN challenge solver with SSL context switching and certificate generation
- Extended configuration to support challenge type selection (http-01 or tls-alpn-01)
- Added identifier parsing for both DNS names and IP addresses (including reverse DNS lookups)
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/acme/solvers/tls_alpn.rs |
Core TLS ALPN challenge implementation with SSL callbacks and certificate generation |
src/state.rs |
Added TLS ALPN solver state to shared data structure |
src/lib.rs |
Integrated TLS ALPN solver into main module with configuration merging |
src/conf/issuer.rs |
Added challenge type field to issuer configuration |
src/conf/identifier.rs |
Added Display trait implementation for identifiers |
src/conf.rs |
Added challenge configuration command and SSL context to main config |
src/acme.rs |
Extended authorization context with private key reference |
t/acme_tls_alpn.t |
Test suite for TLS ALPN challenge functionality |
build.rs |
Added nginx version detection for SSL client hello callback support |
README.md |
Updated documentation to reflect TLS ALPN support |
.github/workflows/ci.yaml |
Updated nginx reference for CI compatibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
1b5f595
to
b3e1dc6
Compare
Ready for review, but cannot be merged until the nginx PR lands. |
02e8957
to
38f5b58
Compare
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.
Otherwise looks good.
38f5b58
to
77d77a1
Compare
tls-alpn-01
challenge is supposed to be processed by a TLS-enabled listener on port 443.There are two important details to consider:
acme-tls/1
ALPN protocol and sending a certificate with key authorization extension in response. Either requires bypassing the regular NGINX SSL callbacks. In addition, we'd want to avoid handling the challenge on a server with client authentication enabled.And that's how we arrived to the implementation in this PR: create a new server
SSL_CTX
, filter the connections in the ClientHello callback and switch to the new context if necessary.Remaining items:
SSL_CTX_set_select_certificate_cb
in-addr.arpa
/ip6.arpa
as specified in RFC8738 § 6