Skip to content

fix: add CA certificates so pgBackRest verifies TLS to R2 - #3

Merged
judyio-daedalus[bot] merged 1 commit into
mainfrom
judy-2045-pg-ca
Nov 21, 2026
Merged

judyio-daedalus[bot] merged 1 commit into
mainfrom
judy-2045-pg-ca

Conversation

@judyio-daedalus

Copy link
Copy Markdown
Contributor

Why

The published image cannot send backups to Cloudflare R2. It has no CA trust bundle, so pgBackRest stops with [095] unable to get local issuer certificate. Until now, the only way to make it work was to mount the host's certificates into the container.

What

  • The image installs Debian's ca-certificates package (pinned, the same as pgBackRest).
  • The smoke test connects pgBackRest to a public R2 host (pub-…r2.dev) with TLS verification on. It passes when R2 sends back an HTTP error, because that error can only come after a verified handshake. It fails on [095].
  • The README says what the bundle is for, and that the smoke test now needs internet access.

Verification

  • Before the fix (local AMD64 build): the new check fails with [095] … unable to get local issuer certificate.
  • After the fix: the full ./test-image passes, with pgBackRest reached R2 over verified TLS.
  • ARM64: only CI checks it.
  • Not done here: a check against the real R2 S3 API endpoint (<account>.r2.cloudflarestorage.com) with real credentials. A made-up account ID gives no certificate, and the real ID should not go into a public repo. That check is part of JUDY-1966.

Operator steps

After merge, push a new postgres-v* tag (for example postgres-v1.0.1). Then update the pin in Kormos config/deploy.yml.


Ticket: JUDY-2045. Pipeline: direct run, Work stage. The PR stays a draft until review.

🤖 Generated with Claude Code

The image had no CA trust bundle. pgBackRest failed against R2 with
"[095] unable to get local issuer certificate". Install the pinned
Debian ca-certificates package. The smoke test now connects
pgBackRest to a public R2 host with TLS verification on.

Refs JUDY-2045

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@judyio-daedalus
judyio-daedalus Bot marked this pull request as ready for review November 20, 2026 23:11
@judyio-daedalus
judyio-daedalus Bot requested a review from judy November 20, 2026 23:11
@judyio-daedalus
judyio-daedalus Bot merged commit eff3f8c into main Nov 21, 2026
1 check passed
@judyio-daedalus
judyio-daedalus Bot deleted the judy-2045-pg-ca branch November 21, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant