AcmeProvider
AcmeProvider
Section titled “AcmeProvider”Defines an ACME provider for automatic TLS certificate management.
This object can be configured from the WebUI under Settings › TLS › ACME Providers
Fields
Section titled “Fields”challengeType
Section titled “challengeType”Type:
AcmeChallengeType· default:"TlsAlpn01"The ACME challenge type used to validate domain ownership
contact
Section titled “contact”Type:
EmailAddress[]· min items: 1Contact email address, which is used for important communications regarding your ACME account and certificates
directory
Section titled “directory”Type:
Uri· read-only · default:"https://acme-v02.api.letsencrypt.org/directory"The URL of the ACME directory endpoint
eabHmacKey
Section titled “eabHmacKey”Type:
String?· read-only · secretThe External Account Binding (EAB) HMAC key
eabKeyId
Section titled “eabKeyId”Type:
String?· read-onlyThe External Account Binding (EAB) key ID
accountKey
Section titled “accountKey”Type:
String· server-set · secretThe account key used to authenticate with the ACME provider.
accountUri
Section titled “accountUri”Type:
Uri· server-setThe account URI returned by the ACME server after registration. Used for CAA record accounturi binding.
renewBefore
Section titled “renewBefore”Type:
AcmeRenewBefore· default:"R23"How long before expiration the certificate should be renewed
maxRetries
Section titled “maxRetries”Type:
Integer· default:10Maximum number of retry attempts for failed challenges
memberTenantId
Section titled “memberTenantId”Type:
Id<Tenant>?· enterpriseIdentifier for the tenant this ACME provider belongs to
JMAP API
Section titled “JMAP API”The AcmeProvider object is available via the urn:stalwart:jmap capability.
x:AcmeProvider/get
Section titled “x:AcmeProvider/get”This is a standard Foo/get method as defined in RFC 8620, Section 5.1.
This method requires the sysAcmeProviderGet permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:AcmeProvider/get", { "ids": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:AcmeProvider/set
Section titled “x:AcmeProvider/set”This is a standard Foo/set method as defined in RFC 8620, Section 5.3.
Supports create, update, and destroy operations in a single call.
Create
Section titled “Create”This operation requires the sysAcmeProviderCreate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:AcmeProvider/set", { "create": { "new1": { "contact": {} } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Update
Section titled “Update”This operation requires the sysAcmeProviderUpdate permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:AcmeProvider/set", { "update": { "id1": { "challengeType": "TlsAlpn01" } } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'Destroy
Section titled “Destroy”This operation requires the sysAcmeProviderDestroy permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:AcmeProvider/set", { "destroy": [ "id1" ] }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'x:AcmeProvider/query
Section titled “x:AcmeProvider/query”This is a standard Foo/query method as defined in RFC 8620, Section 5.5.
This method requires the sysAcmeProviderQuery permission.
curl -X POST https://mail.example.com/api \ -H 'Authorization: Bearer $TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "methodCalls": [ [ "x:AcmeProvider/query", { "filter": { "text": "example" } }, "c1" ] ], "using": [ "urn:ietf:params:jmap:core", "urn:stalwart:jmap" ] }'The x:AcmeProvider/query filter argument accepts the following conditions (combinable with AnyOf / AllOf / Not per RFC 8620):
| Condition | Kind |
|---|---|
text | text |
memberTenantId | id of Tenant |
stalwart-cli wraps the same JMAP calls. See the CLI reference for installation, authentication, and general usage.
stalwart-cli get AcmeProvider id1Create
Section titled “Create”stalwart-cli create AcmeProvider \ --field 'contact={}'stalwart-cli query AcmeProviderstalwart-cli query AcmeProvider --where text=exampleUpdate
Section titled “Update”stalwart-cli update AcmeProvider id1 --field challengeType=TlsAlpn01Delete
Section titled “Delete”stalwart-cli delete AcmeProvider --ids id1AcmeChallengeType
Section titled “AcmeChallengeType”| Value | Label |
|---|---|
TlsAlpn01 | TLS-ALPN-01 |
DnsPersist01 | DNS-PERSIST-01 |
Dns01 | DNS-01 |
Http01 | HTTP-01 |
AcmeRenewBefore
Section titled “AcmeRenewBefore”| Value | Label |
|---|---|
R12 | 1/2 of the remaining time until expiration |
R23 | 2/3 of the remaining time until expiration |
R34 | 3/4 of the remaining time until expiration |
R45 | 4/5 of the remaining time until expiration |