security/acme-client: add support for ACME profiles #5154
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.
Problem:
Currently, acme-client is unable to issue certificates under any profiles, which enable CAs to issue certificates with characteristics other than their defaults. In my case, this prevents IP address certificates from being issued, as Let's Encrypt only issues these certificates under the "shortlived" profile. Let's Encrypt has supported profiles since around January 2025 in Staging, and since some time between December 2025 and January 2026 in Production.
acme.sh has had support for using profiles for a few months, so the problem is that the acme-client plugin does not expose profile support yet.
Solution:
Add an additional (optional) field to the certificate form to allow the user to input the name of a profile. Note that different CAs may support different profiles, so a text input was chosen rather than a dropdown or similar.
If a profile is specified, add the
--cert-profileflag to the acme.sh command, with the chosen profile.Add logic to use the configured name as the display name for the certificate if it does not contain a common name. This is not strictly required for profile support to work, but avoids certificates appearing as
(ACME Client)in the UI if they have no Common Name (CN), such as for IP certs, or certs issued using the newtlsclientprofile from LE.