Skip to content

Commit 2c4295e

Browse files
committed
caddytls: Initial support for ACME profiles
Still very experimental; only deployed to LE staging so far.
1 parent 1f35a8a commit 2c4295e

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ require (
99
github.com/Masterminds/sprig/v3 v3.3.0
1010
github.com/alecthomas/chroma/v2 v2.14.0
1111
github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
12-
github.com/caddyserver/certmagic v0.21.6
12+
github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016
1313
github.com/caddyserver/zerossl v0.1.3
1414
github.com/dustin/go-humanize v1.0.1
1515
github.com/go-chi/chi/v5 v5.0.12
1616
github.com/google/cel-go v0.21.0
1717
github.com/google/uuid v1.6.0
1818
github.com/klauspost/compress v1.17.11
1919
github.com/klauspost/cpuid/v2 v2.2.9
20-
github.com/mholt/acmez/v3 v3.0.0
20+
github.com/mholt/acmez/v3 v3.0.1
2121
github.com/prometheus/client_golang v1.19.1
2222
github.com/quic-go/quic-go v0.48.2
2323
github.com/smallstep/certificates v0.26.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
8989
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
9090
github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
9191
github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
92-
github.com/caddyserver/certmagic v0.21.6 h1:1th6GfprVfsAtFNOu4StNMF5IxK5XiaI0yZhAHlZFPE=
93-
github.com/caddyserver/certmagic v0.21.6/go.mod h1:n1sCo7zV1Ez2j+89wrzDxo4N/T1Ws/Vx8u5NvuBFabw=
92+
github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016 h1:bwnFMkCXIgw3WO7vvMwpr7Zf8qfADmMzYe6mxSKC7zI=
93+
github.com/caddyserver/certmagic v0.21.7-0.20250109205135-32654015b016/go.mod h1:LCPG3WLxcnjVKl/xpjzM0gqh0knrKKKiO5WVttX2eEI=
9494
github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA=
9595
github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
9696
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
@@ -344,8 +344,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
344344
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
345345
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
346346
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
347-
github.com/mholt/acmez/v3 v3.0.0 h1:r1NcjuWR0VaKP2BTjDK9LRFBw/WvURx3jlaEUl9Ht8E=
348-
github.com/mholt/acmez/v3 v3.0.0/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
347+
github.com/mholt/acmez/v3 v3.0.1 h1:4PcjKjaySlgXK857aTfDuRbmnM5gb3Ruz3tvoSJAUp8=
348+
github.com/mholt/acmez/v3 v3.0.1/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
349349
github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
350350
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
351351
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=

modules/caddytls/acmeissuer.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ type ACMEIssuer struct {
6060
// other than ACME transactions.
6161
Email string `json:"email,omitempty"`
6262

63+
// Optionally select an ACME profile to use for certificate
64+
// orders. Must be a profile name offered by the ACME server,
65+
// which are listed at its directory endpoint.
66+
//
67+
// EXPERIMENTAL: Subject to change.
68+
// See https://datatracker.ietf.org/doc/draft-aaron-acme-profiles/
69+
Profile string `json:"profile,omitempty"`
70+
6371
// If you have an existing account with the ACME server, put
6472
// the private key here in PEM format. The ACME client will
6573
// look up your account information with this key first before
@@ -184,6 +192,7 @@ func (iss *ACMEIssuer) makeIssuerTemplate() (certmagic.ACMEIssuer, error) {
184192
CA: iss.CA,
185193
TestCA: iss.TestCA,
186194
Email: iss.Email,
195+
Profile: iss.Profile,
187196
AccountKeyPEM: iss.AccountKey,
188197
CertObtainTimeout: time.Duration(iss.ACMETimeout),
189198
TrustedRoots: iss.rootPool,
@@ -338,6 +347,7 @@ func (iss *ACMEIssuer) generateZeroSSLEABCredentials(ctx context.Context, acct a
338347
// dir <directory_url>
339348
// test_dir <test_directory_url>
340349
// email <email>
350+
// profile <profile_name>
341351
// timeout <duration>
342352
// disable_http_challenge
343353
// disable_tlsalpn_challenge
@@ -400,6 +410,11 @@ func (iss *ACMEIssuer) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
400410
return d.ArgErr()
401411
}
402412

413+
case "profile":
414+
if !d.AllArgs(&iss.Profile) {
415+
return d.ArgErr()
416+
}
417+
403418
case "timeout":
404419
var timeoutStr string
405420
if !d.AllArgs(&timeoutStr) {

0 commit comments

Comments
 (0)