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

Performs an explicitly opted-in, verified pass over archived lineages. More...

Functions

int certbotbot_bulk_verify_inventory (String config, String probe, String arg)
 Confirms exact expected lineage membership after a provider action.
 
int certbotbot_lifecycle_renew_all ()
 Checks every previously archived lineage once and publishes as a unit.
 

Detailed Description

Performs an explicitly opted-in, verified pass over archived lineages.

Implements only the opt-in ADR-058 exception to ADR-030. A sorted snapshot of complete restored lineages is immutable for this invocation. Every archived identity is checked at most once through an exact named Certbot renewal, using the existing validated DNS SANs rather than runtime SAN expansion. The optional ordinary selected operation is distinct, and an explicitly new selected lineage is never enumerated a second time.

The private workspace and all ACME/provider actions belong to the public lifecycle. This module never trusts an arbitrary host Certbot directory. Non-target fingerprints, exact membership checks, cryptographic verification, and the existing publisher gate suppress partial archive publication after local failure. Remote S3 write uncertainty and external writer serialization remain outside the module's guarantees.

Function Documentation

◆ certbotbot_bulk_verify_inventory()

int certbotbot_bulk_verify_inventory ( String  config,
String  probe,
String  arg 
)

Confirms exact expected lineage membership after a provider action.

Runs whole-archive preflight and canonical metadata verification after each selected or bulk mutation. Compares valid discovered names to the original immutable set plus at most one explicitly issued selected lineage. Rejects unexpected creation, disappearance, duplicate, or rename even when the remaining lineages are individually well-formed.

Parameters
configOwned, canonical Certbot configuration root.
probeExisting lineage used for read-only state preflight.
argOne or more expected lineage identities.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
Fixed, nonsecret diagnostic on failure.
Returns
Nothing is written to STDOUT.
Return values
0Complete membership and canonical metadata are intact.
65Unexpected, missing, or unsafe lineage inventory.
Note
Underlying preflight failures may propagate their status.
Examples
certbotbot_bulk_verify_inventory "$config" "$probe" "example.com"
int certbotbot_bulk_verify_inventory(String config, String probe, String arg)
Confirms exact expected lineage membership after a provider action.

◆ certbotbot_lifecycle_renew_all()

int certbotbot_lifecycle_renew_all ( )

Checks every previously archived lineage once and publishes as a unit.

This is the alternative public lifecycle for explicit RENEW_ALL=true only. An owned mode-0700 workspace restores the one selected authoritative S3 object, then fully validates all original account/lineage triplets and canonical metadata. The original sorted inventory is frozen before ANY provider operation. An optional selected certificate follows ordinary issuance, selected renewal, or selected SAN reconciliation, and is not renewed again in the original archived inventory.

Every remaining existing lineage uses only its own restored DNS SANs with certbot renew –cert-name NAME, never an unscoped renew or implicit issuance. State outside the currently authorized lineage is fingerprinted before and after EACH operation, with the complete inventory and account revalidated. Final certificate/key/chain verification covers every member, not only the selected target. Aggregate state is published once, after full success. Failed provider, integrity, validation, or S3 work never returns a successful partial result. Provider stdout/stderr and archive secrets are never echoed.

A domainless invocation obtains a real archived lineage only as a read-only preflight and S3-publisher reference. It cannot issue certificates or alter any SAN set. This function owns an EXIT trap like the selected-only lifecycle.

STDIN
Nothing is read from STDIN.
STDOUT
Nonsecret aggregate renewal counts and publication status on success.
STDERR
Fixed stage diagnostics without certificate DNS identities or key material.
Returns
Complete bulk renewal/no-op and publication outcome.
Return values
0Every authorized action completed, or all were verified no-ops.
65Invalid, incomplete, or unexpectedly changed account/lineage.
Note
External provider, archive, workspace, and S3 statuses propagate.
Examples
[[ "$CERTBOTBOT_RENEW_ALL" == true ]] &&
int certbotbot_lifecycle_renew_all()
Checks every previously archived lineage once and publishes as a unit.