|
certbotbot
Reference documentation for a modular Bash project
|
Accepted
The five canonical certificate and archive path fields governed by ADR-022 remain the only reversible persisted path mappings. Certbot 5.8 may additionally write config_dir, work_dir, and logs_dir in the [renewalparams] section when an invocation explicitly specifies its private directories. These fields describe one invocation's scratch execution environment rather than a certificate's durable state. They are not portable between fresh runners.
The certbotbot_renewal_map finalize operation alone may recognize those three additional fields. It must verify the exact values correspond to the currently selected private workspace: config_dir must equal the provided canonical config root, work_dir must equal its sibling work directory, and logs_dir must equal its sibling logs directory. The caller's validated config root must be an absolute mode-0700 owned, physical (non-symlinked) directory, and must be the child named config of the workspace for the exception to apply. Each ephemeral field is optional because Certbot may not persist every explicit argument. Any duplicate, differently located, empty, relative, foreign, alternative-looking, or malformed field fails closed before a mutation.
When values match exactly, finalize omits those lines from the candidate persisted renewal file and performs the normal five-field path canonicalization as a single same-directory validated replacement. It does not persist or rewrite the ephemeral settings. The read-only verify and reverse prepare operations continue to reject any occurrence of those three keys in archived input. Neither operation interprets a remembered runtime path or tries to relocate it. A clean canonical archive therefore contains no private invocation path and can be restored on an independent runner. Existing supported renewal metadata without those fields retains byte-for-byte prepare/finalize compatibility.
The exception does not authorize any other Certbot renewal key, section, hook, plugin, ACME URL, account, filename, or path. All existing unsupported content, embedded control characters, hook text, extra sections, and unexpected private paths remain hard failures without partial rewrite or S3 publication. Values must not be logged or written to CI reports.
Issue #264 is an approved compatibility bug uncovered by the local milestone-16 E2E harness. PR #260 reaches genuine Certbot/Pebble issuance, successful sealed Route53 update and change-status polling, but reports certbotbot: unsupported renewal configuration from the post-issuance renewal-path adapter, so the candidate archive cannot be published. This outcome does not independently identify a rejected key. Inspecting Certbot v5.8's storage.relevant_values() and renewal.CONFIG_ITEMS shows that its renewal data may include explicitly supplied config_dir, work_dir and logs_dir. The current certbotbot provider explicitly sets all three arguments, and its parser rejects them. Tests must verify this format assumption against the real integrated Certbot, not merely mocks.
ADR-022 requires that durable archives be directly installable under conventional /etc/letsencrypt, that five lineage paths be reversibly mapped for a private runner, and that unknown path-bearing metadata be refused. Its statement that the independent work/log directories are ephemeral and unarchived takes precedence over keeping these three command-line echoes in renewal files. This ADR narrows and clarifies only the metadata parser's handling of known transient options produced by the selected, trusted Certbot call. It does not supersede ADR-022's five-field reversible mapping.
config, work and logs directories for selected issuance and renewal. This directory topology is already used by the producer; no caller-chosen alternative root is authorized./etc/letsencrypt: Rejected because those directories are not part of the canonical certificate archive and would overwrite Certbot's explicit private work/log isolation on restoration.config_, work_, or logs_: Rejected; prefixes are not a bounded schema and could conceal execution-relevant values.A legitimate Certbot-generated renewal file containing verified invocation-only directory options can be finalized and published as a conventional portable archive. The original five path fields remain canonical, the account and server continue to be verified, and the existing clean archive format is not migrated. A later change in Certbot's renewal format can cause a safe failure; compatibility with arbitrary versions is not promised. No new public CLI flag or archive format version is introduced.
The code must keep parse/validate and mutation separate, retain atomic same-directory replacement, and avoid printing private path values. A successful finalize may deliberately remove at most these verified transient lines, so byte identity is promised only for files without these options.
verify and prepare refuse each ephemeral field before mutation; finalize accepts exact individual and combined fields, removes only those lines, and retains the canonical five mapped path fields.ADR-022 remains authoritative for archive portability, five canonical mappings and untrusted renewal metadata. ADR-023 controls restored account and lineage safety; ADR-024 and ADR-025 control selected issuance and renewal; ADR-042 controls immutable selected CA; ADR-047 controls the challenge-validation-bypassed local protocol harness. This ADR adds only a precise finalization exception for three verified invocation-private directory settings. A later change to the storage contract requires another explicit ADR.