|
certbotbot
Reference documentation for a modular Bash project
|
Retrieves one mandatory S3 archive without trusting its contents. More...
Functions | |
| int | certbotbot_s3_report (String message, String status) |
| Reports a static, non-sensitive failure with a defined status. | |
| int | certbotbot_s3_fetch (String workspace, String bucket, String key) |
| Stages the selected existing S3 archive inside an owned workspace. | |
Retrieves one mandatory S3 archive without trusting its contents.
This first-party AWS CLI boundary follows ADR-020 and ADR-021. A successful read makes unvalidated bytes available only within a private workspace. It never extracts the archive, reads local Certbot state, issues a certificate, or publishes anything. All external output is withheld from CLI diagnostics. The archive validator, not this module, determines whether those bytes may become active certificate state.
| int certbotbot_s3_fetch | ( | String | workspace, |
| String | bucket, | ||
| String | key | ||
| ) |
Stages the selected existing S3 archive inside an owned workspace.
The caller must provide a newly created absolute workspace with mode 0700 and ensure it is cleaned after use. This function refuses to overwrite a pre-existing downloaded.tar.gz file. It uses a successful HeadObject call to permit a GetObject download. A HeadObject 404 is confirmed through a successful HeadBucket request before declaring the seeded key absent. Inability to read the remote object is never an invitation to bootstrap.
A nonempty GetObject result is promoted only after AWS reports success. Neither completeness of the tar stream nor trust in archive members is established here. The caller must separately verify both before extraction. AWS stderr and metadata are captured in private files and never repeated.
| workspace | Private absolute directory owned by the invocation. |
| bucket | Exact existing S3 bucket name. |
| key | Exact selected S3 object key. |
| 0 | Unvalidated nonempty bytes staged at downloaded.tar.gz. |
| 64 | Invalid workspace or configuration. |
| 66 | A confirmed missing seeded S3 object. |
| 69 | AWS client unavailable or remote state uncertain. |
| 74 | Transfer, local staging, or zero-length download failed. |
| int certbotbot_s3_report | ( | String | message, |
| String | status | ||
| ) |
Reports a static, non-sensitive failure with a defined status.
| message | Literal error message containing no cloud output. |
| status | Defined nonzero status for this adapter. |
| 64 | Invalid arguments. |
| 66 | Seeded object positively absent. |
| 69 | AWS state unavailable or uncertain. |
| 74 | Download or local staging failure. |