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

Provides first-party selected-only Certbot DNS-01 issuance via Route53. More...

Functions

int certbotbot_provider_sans (String arg)
 Verifies one selected certificate's exact canonical DNS SAN list.
 
int certbotbot_provider_issue (String workspace, String selected, String arg)
 Issues one absent selected lineage using an existing ACME account.
 

Detailed Description

Provides first-party selected-only Certbot DNS-01 issuance via Route53.

Implements ADR-024 as a bounded execution adapter. Callers must first download and safely restore an existing archive into a private workspace. The provider checks selected identity and existing-account state before trusting an external Certbot process with ACME and AWS credentials. It does not register ACME accounts, renew existing lineages, execute restored hooks, validate issued PEMs, or publish a new S3 archive.

Only installed Certbot and certbot-dns-route53 are supported. The explicitly selected CA inherits the operator's AWS credentials and selected region. MVP tests use a deterministic executable mock instead of live cloud/ACME accounts.

Function Documentation

◆ certbotbot_provider_issue()

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

Issues one absent selected lineage using an existing ACME account.

Verifies one 0700 caller-owned workspace with canonical paths, a valid non-wildcard selected lineage name, a bounded canonical SAN set, and account-only or multi-lineage restored state. Rejects a present or partial selected lineage, or any unsafe unselected renewal state, before spawning Certbot. The provider refuses archived cli.ini and hook scripts through the preflight, and sets no implicit fallback account.

Creates private work and logs directories when absent. Certbot's plugin listing and show_account probe must succeed before certonly is attempted. The exact account ID is passed explicitly; all Certbot calls use –config-dir, –work-dir, –logs-dir, –server, –non-interactive, and –no-directory-hooks. Certbot output is suppressed; fixed diagnostics replace untrusted external text. The process may contact AWS and ACME.

A zero return means that Certbot's certonly command exited successfully. The lifecycle must still validate the resulting PEMs, desired SANs, account continuity, renewal metadata, and portable archive before any publication. The caller owns workspace cleanup and failure rollback.

Parameters
workspaceCanonical absolute 0700 runner workspace.
selectedStable validated non-wildcard Certbot lineage name.
argOne to 100 validated SANs chosen by the identity resolver.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
A fixed safe diagnostic on failure only, without Certbot output.
Returns
Nothing is written to STDOUT.
Return values
0Installed Certbot reported successful selected issuance.
64Invalid arguments or private workspace.
65Missing ACME account or existing/conflicting lineage state.
69Missing provider, missing Route53, or unreadable Certbot account.
74Failed issuance or local private staging.
Note
A success code is not certificate or persistence verification.
Examples
certbotbot_provider_issue "$workspace" "$CERTBOTBOT_CERT_NAME" \
"${CERTBOTBOT_SANS[@]}" || exit $?
# Verify and canonicalize complete issued state before packaging.
int certbotbot_provider_issue(String workspace, String selected, String arg)
Issues one absent selected lineage using an existing ACME account.

◆ certbotbot_provider_sans()

int certbotbot_provider_sans ( String  arg)

Verifies one selected certificate's exact canonical DNS SAN list.

Accepts 1 to 100 validated, distinct DNS identities, which may belong to unrelated zones. This helper does not infer a shared apex or independently select another certificate. Names are accepted as separate quoted arguments and are never interpreted as shell source. Duplicate or malformed values are invalid; upstream identity resolution owns intentional deduplication.

Parameters
argOne to 100 distinct canonical DNS SAN strings.
STDIN
Nothing is read from STDIN.
STDOUT
Nothing is written to STDOUT.
STDERR
Nothing is written to STDERR.
Returns
Nothing is written to STDOUT.
Return values
0Every name is valid and unique.
1Invalid count, syntax, case or repeated identity.