certbotbot
Reference documentation for a modular Bash project
Loading...
Searching...
No Matches
Functions
reconcile.bash File Reference

Reconciles an existing selected lineage's validated DNS SAN set. More...

Functions

int certbotbot_provider_existing (String workspace, String selected, String arg)
 Dispatches a complete selected lineage to renewal or reconciliation.
 
int certbotbot_provider_reconcile (String workspace, String selected, String arg)
 Updates only the existing selected lineage's supported SAN policy.
 

Detailed Description

Reconciles an existing selected lineage's validated DNS SAN set.

Implements ADR-029's expansion of ADR-026 without public S3 publication. The dispatcher uses ordinary renewal when desired SANs already match. Valid but different SAN sets, including unrelated DNS zones, use selected certonly –cert-name –renew-with-new-domains. Malformed existing SANs must fail before launching Certbot. All work remains in the caller's disposable private workspace, using the previously restored account; failures must never authorize a remote archive write.

Function Documentation

◆ certbotbot_provider_existing()

int certbotbot_provider_existing ( String  workspace,
String  selected,
String  arg 
)

Dispatches a complete selected lineage to renewal or reconciliation.

An unchanged exact leaf DNS SAN set follows certbotbot_provider_renew and retains Certbot's ordinary renewal/no-op behavior. Any mismatch follows certbotbot_provider_reconcile only after the restored leaf's existing SAN extension is strictly parsed; invalid state is not SAN drift. The public lifecycle retains full certificate and archive publication gates.

Parameters
workspacePrivate restored mode-0700 workspace path.
selectedExplicit stable non-wildcard Certbot certificate name.
argOne to 100 distinct canonical desired DNS SANs.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
Fixed diagnostics only; provider output is suppressed.
Returns
Nothing is written to STDOUT.
Return values
0Verified selected-only renewal or SAN reconciliation.
64Invalid arguments or runtime workspace.
65Unsuitable local state, SAN policy or post-Certbot state.
69Missing/failed provider or ACME account recognition.
74External issuance or private staging failed.
Note
Success reports only local state, not S3 publication.

◆ certbotbot_provider_reconcile()

int certbotbot_provider_reconcile ( String  workspace,
String  selected,
String  arg 
)

Updates only the existing selected lineage's supported SAN policy.

This adapter requires a complete selected lineage and one existing ACME account. Both existing and desired sets must contain validated, distinct, DNS-only identities (one to 100 names); these may cross unrelated zones. A matching set uses ordinary renewal rather than explicit reissuance.

The installed Certbot and DNS-Route53 authenticator are probed before any certificate mutation. The selected renewal file is mapped into the private config root, then certbot certonly updates exactly the selected –cert-name with –renew-with-new-domains and the exact desired -d SANs. The restored account ID is required and verified again after Certbot. The resulting leaf must contain the exact requested DNS SANs and must differ from the prior leaf or its live symlink target. The renewal path mapper returns stored paths to /etc/letsencrypt before success.

Failures clear both result variables, and the caller must destroy the affected private workspace. No uploaded state is changed in this module.

Parameters
workspaceCanonical absolute owned 0700 invocation workspace.
selectedExplicit selected non-wildcard certificate lineage name.
argOne to 100 distinct canonical desired DNS SANs.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
Static non-secret diagnostics; Certbot output is not forwarded.
Returns
Nothing is written to STDOUT.
Return values
0The selected lineage was updated with the exact desired SANs.
64Invalid arguments or unsafe workspace.
65Unsafe account, lineage, SAN policy, or post-issuance state.
69Unavailable Certbot, authenticator, or account probe.
74Certbot reissue or local staging failed.
Examples
certbotbot_provider_existing "$workspace" "$name" "${sans[@]}" || exit $?
# Full lifecycle validation is still required before S3 publication.
int certbotbot_provider_existing(String workspace, String selected, String arg)
Dispatches a complete selected lineage to renewal or reconciliation.