|
certbotbot
Reference documentation for a modular Bash project
|
Accepted
Implementation convention: The Accepted status is the repository's convention for ADRs submitted with intended-for-merge work. This decision becomes operative only after the associated technical-task PR is reviewed and merged.
The isolated local lifecycle E2E harness shall exercise one additional real Pebble ACME order after first issuance, clean-runner restoration, and verified normal non-due no-op. The public certbotbot producer remains byte-for-byte unchanged and retains ADR-025's ordinary selected-only certbot renew --cert-name behavior without a public force-renewal option.
Because the existing local certificate is deliberately not due, task #248 may use a single-use, private-runner-only Certbot argv adapter to pass --force-renewal to the installed real Certbot binary when and only when certbotbot executes exactly its selected staging renewal invocation. This is a test mechanism, not a public product behavior or fake Certbot. Its first-party wrapper lives solely under tests/e2e-local/; it is included only in the separate test-runner image, never in any producer distribution, released OCI image, standalone client, or host installation.
The wrapper normally delegates unchanged to the real installed Certbot. In the designated renew runner only, a mode-0600 marker owned by the unprivileged test process authorizes exactly one matching invocation. The wrapper must validate the exact renew subcommand, selected --cert-name test.e2e.test, canonical HTTPS staging --server, explicit --account, private --config-dir, and --non-interactive and --no-directory-hooks options before consuming the marker. It rejects any attempted force on another command, another CA or lineage, absent or malformed arguments, or replay. The wrapper calls /usr/bin/certbot using an argv array and exec, adding --force-renewal and --no-random-sleep-on-renew together. The latter suppresses Certbot's randomized noninteractive renewal delay (up to eight minutes), which can exceed the seven-minute sealed runner timeout. It is permitted only for this one authorized test renewal; all other Certbot invocations retain their original argv. It must not synthesize responses, bypass Certbot's certificate checks, inject a foreign CA endpoint, or create external network routes. Only the original program owns account, lineage, and archive processing; the test wrapper has no AWS or ACME authority of its own beyond what the sandboxed Certbot already receives.
The test must demonstrate all of the following before reporting success:
This local test still uses Pebble with PEBBLE_VA_ALWAYS_VALID=1, the bounded synthetic Route53 API stub, and real SeaweedFS. It does not test DNS-01 challenge validation, AWS, Let's Encrypt, or the passage of real time until a certificate legitimately becomes due.
ADR-025 explicitly rejects forced renewal in certbotbot's public runtime because ordinary non-due checks must not create new orders or exhaust public ACME rate limits. ADR-042 bounds the CA choice to production or staging. ADR-046 as superseded by ADR-047 requires a real second ACME transaction in the isolated local test suite. Task #245 already verifies the normal non-due no-op across three public flavors, using a deterministic 90-day Pebble certificate profile. Merely changing the Pebble validity profile after issuance would not make that existing 90-day certificate due. Waiting weeks is incompatible with deterministic CI.
Certbot itself supports the explicit CLI option renew --force-renewal. That option belongs to the installed third-party client, not the certbotbot public CLI. The single-use argument adapter is authorized as a test-only mechanism after the normal no-op is independently verified. The exact installed Certbot and its CLI compatibility still require container-backed verification. The test need not claim that the ordinary renewal scheduling threshold was reached; it is testing the product's post-renewal detection, validation, serialization and publication path with a real second ACME exchange.
The existing sealed-test boundaries remain mandatory: private internal Docker network, no published ports, test-only CA root, canonical staging hostname, no default public route or public DNS, synthetic AWS credentials, no host AWS/Certbot/GnuPG mounts, no Docker socket in the runner, no production or cloud endpoints, and no modifications to the shipped public artifacts.
/usr/bin/certbot; wrapper dispatch is limited by a private marker, fixed command contract and read-only image. Replacing that real binary would invalidate the test.Task #248 shall extend the existing one-PR-per-task local E2E harness without changing src/, lib/, dist/, release Dockerfile, or other operator-facing certificate commands. The positive scenario and negative markers/tests remain under tests/e2e-local/. Only test-only Dockerfile, runner orchestration, focused Bats assertions, documentation and this ADR are within scope. A separate #246 task will provide broader fault injection; #247 owns the dedicated CI runtime gate.
Review the exact new Certbot argument vector (including the narrowly scoped jitter-suppression option), marker ownership, failure/cleanup semantics, archive/account comparisons, and the observed second Pebble order in a real isolated engine run. Static tests and GitHub PR checks are not sufficient to claim real protocol-level success.
ADR-025's public prohibition on force renewal remains fully operative. ADR-046/047's unchanged public producer, genuine certificate replacement and no-live-provider boundaries remain operative. No migration or new public configuration is introduced.
ADR-015/016, ADR-020/022/023/024/025/027/028, ADR-041/042/043, ADR-046/047 and ADR-048.