GTS offers 100 new orders per hour (~16,800/week) vs Let's Encrypt's
50/week/registered-domain, removing the cert-issuance bottleneck that
capped e2e testing and new-device onboarding. GTS roots are already in
every major browser/OS trust store, so clients see no change.
The only new protocol requirement is External Account Binding (RFC 8555
§7.3.4): on newAccount, GTS requires an HMAC-SHA256 JWS over the outer
account JWK, signed with a provider-issued key. Added build_eab_jws()
and an optional ExternalAccountBinding field on RealAcmeClient, wired
from AcmeConfig::resolve_eab() which reads GTS_EAB_KID / GTS_EAB_HMAC
env vars by default. LE-style no-EAB registration still works when the
env vars are unset.
Account-key path default moved to /etc/rouse-relay/gts_acme_account_key.pem
so provider switches can't accidentally reuse an account bound to a
different directory -- ACME accounts aren't portable across directories.
LE's directory URL is kept as a named constant so operators can switch
back with a single config edit.
Tests: unit test verifying RFC 8555 §7.3.4 EAB JWS structure (alg=HS256,
kid + url in protected header, outer JWK as payload, HMAC-SHA256 over
signing input), plus an integration test that drives RealAcmeClient
through a full issue_certificate() flow against a mock ACME server that
requires + validates EAB. A companion integration test asserts the
no-EAB path is unchanged when env vars are unset.
Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Escalate the "Generated new ACME account key" log to warn! with an
acme_account_created=true tag so alerts can fire on unintended account
rotation. Add acme.require_existing_account config flag (default false)
that panics at startup when the key file is missing, catching deploy
misconfigurations that would silently burn Let's Encrypt rate-limit
headroom. Ship a standalone relay/scripts/backup-acme-key.sh for
timestamped host-local snapshots and a relay README section covering
what the key is, why it must persist, and how to back up / restore.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>