-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
Initial implementation of ZeroSSL API issuer #279
Merged
Conversation
This file contains 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
Still needs CA support for CommonName-less certs
DennisRasey
pushed a commit
to DennisRasey/forgejo
that referenced
this pull request
May 12, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/caddyserver/certmagic](https://github.com/caddyserver/certmagic) | require | minor | `v0.20.0` -> `v0.21.0` | --- ### Release Notes <details> <summary>caddyserver/certmagic (github.com/caddyserver/certmagic)</summary> ### [`v0.21.0`](https://github.com/caddyserver/certmagic/releases/tag/v0.21.0) [Compare Source](caddyserver/certmagic@v0.20.0...v0.21.0) CertMagic v0.21 introduces some big changes: - Draft support for draft-03 of [ACME Renewal Information (ARI)](https://datatracker.ietf.org/doc/draft-ietf-acme-ari/) which assists with deciding when to renew certificates. This augments CertMagic's already-advanced logic using cert lifetime and OCSP/revocation status. - New [`ZeroSSLIssuer`](https://pkg.go.dev/github.com/caddyserver/certmagic@v0.21.0#ZeroSSLIssuer) uses the [ZeroSSL API](https://zerossl.com/documentation/api/) to get certificates. ZeroSSL also has an ACME endpoint, which can still be accesed using the existing ACMEIssuer, as always. Their proprietary API is paid, but has extra features like IP certificates, better reliability, and support. - DNS challenges should be smoother in some cases as we've improved propagation checking. - In the odd case your ACME account disappears from the ACME server, CertMagic will automatically retry with a new account. (This happens in some test/dev environments.) - ACME accounts are identified only by their public keys, but CertMagic maps accounts by CA+email for practical/storage reasons. So now you can "pin" an account key to use by specifying your email and the account public key in your config, which is useful if you need to absolutely be sure to use a specific account (like if you get rate limit exemptions from a CA). Please try it out and report any issues! Thanks to [@​Framer](https://github.com/Framer) for their contributions to this release! #### What's Changed - Bump golang.org/x/crypto from 0.14.0 to 0.17.0 by [@​dependabot](https://github.com/dependabot) in caddyserver/certmagic#264 - Demote "storage cleaning happened too recently" from WARN to INFO by [@​francislavoie](https://github.com/francislavoie) in caddyserver/certmagic#270 - Check DNS propagation at authoritative nameservers only with default resolvers by [@​pgeh](https://github.com/pgeh) in caddyserver/certmagic#274 - Retry with new account if account disappeared remotely by [@​mholt](https://github.com/mholt) in caddyserver/certmagic#269 - Update readme examples to use TLS-ALPN const from ACMEz by [@​goksan](https://github.com/goksan) in caddyserver/certmagic#277 - Initial implementation of ZeroSSL API issuer by [@​mholt](https://github.com/mholt) in caddyserver/certmagic#279 - Allow deleting directories via FileStorage by [@​goksan](https://github.com/goksan) in caddyserver/certmagic#282 - Use the `email` configuration in the ACME issuer to "pin" an account to a key by [@​ankon](https://github.com/ankon) in caddyserver/certmagic#283 - Initial implementation of ARI by [@​mholt](https://github.com/mholt) in caddyserver/certmagic#286 #### New Contributors - [@​pgeh](https://github.com/pgeh) made their first contribution in caddyserver/certmagic#274 - [@​goksan](https://github.com/goksan) made their first contribution in caddyserver/certmagic#277 **Full Changelog**: caddyserver/certmagic@v0.20.0...v0.21.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am" (UTC), Automerge - "before 4am" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjM1MS4yIiwidGFyZ2V0QnJhbmNoIjoiZm9yZ2VqbyIsImxhYmVscyI6W119--> Co-authored-by: Earl Warren <contact@earl-warren.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3724 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
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.
This change brings ZeroSSL API support to CertMagic.
The ZeroSSL API is a paid CA service that can issue IP certs and does not have rate limits like Let's Encrypt and has stronger availability guarantees than their free ACME endpoint. The
ZeroSSLIssuer
requires a ZeroSSL API key from your account and may be subject to payment terms.Currently, ZeroSSL requires a CommonName on the CSR (deprecated for 25+ years), which is a bit hacky to work around so I hope to remove that code in the future. At first I thought their service was not compliant with the BRs, but the BRs talk about the final issued certificates, not the CSRs... so the restrictions are just added friction that are asymmetric with the issued cert. I wonder if we can get that cleaned up.
Otherwise, this works nicely with a slight breaking change. I refactored the
DNS01Solver
into aDNSManager
type. TheDNSManager
is a more general type that manipulates DNS records, waits for them to propagate, then cleans them up. TheDNS01Solver
uses theDNSManager
specifically for ACME's TXT records. ZeroSSL has its own DNS verification method that uses CNAME, hence the refactor; I also had to adjust dnsutil.go to accommodate that. This is good though because it allows us to do more with DNS across different issuers generally.This implementation supports HTTP and CNAME verification methods through ZeroSSL's API.
Closes #262