backup: clearer 403 hint + document R2 EU-jurisdiction endpoint #17

Merged
ronnyandre merged 1 commit from chore/backup-r2-hint into main 2026-06-03 11:07:28 +02:00
Owner

Follow-up after wiring R2 in prod hit a 403 AccessDenied that turned out to be an EU-jurisdiction bucket needing the .eu.r2.cloudflarestorage.com endpoint.

  • scripts/backup.mjs: on a 403/AccessDenied upload error, augment the message with the actual causes to check — token Read & Write, bucket scope matches BACKUP_S3_BUCKET, and endpoint jurisdiction (EU R2 buckets need the .eu host). A bare "Access Denied" was unhelpful.
  • README Backups: document the R2 token permission + the EU-jurisdiction endpoint requirement, and the 403 AccessDenied (authorized?) vs SignatureDoesNotMatch (wrong keys) distinction.

No behavior change to the happy path. Verified: node --check, skipped path, pnpm typecheck/lint/test (40/40).

Follow-up after wiring R2 in prod hit a `403 AccessDenied` that turned out to be an **EU-jurisdiction bucket** needing the `.eu.r2.cloudflarestorage.com` endpoint. - **scripts/backup.mjs:** on a 403/AccessDenied upload error, augment the message with the actual causes to check — token Read & Write, bucket scope matches `BACKUP_S3_BUCKET`, and endpoint jurisdiction (EU R2 buckets need the `.eu` host). A bare "Access Denied" was unhelpful. - **README Backups:** document the R2 token permission + the EU-jurisdiction endpoint requirement, and the `403 AccessDenied` (authorized?) vs `SignatureDoesNotMatch` (wrong keys) distinction. No behavior change to the happy path. Verified: `node --check`, skipped path, `pnpm typecheck`/`lint`/`test` (40/40).
A 403 AccessDenied on upload means the signature was accepted (keys/endpoint
host valid) but the request isn't authorized. The upload now augments that error
with the actual causes to check (token Read & Write, bucket scope, and — the one
that bit us — EU-jurisdiction R2 buckets needing the .eu.r2.cloudflarestorage.com
host). README 'Backups' documents the R2 token + jurisdiction requirement.
ronnyandre deleted branch chore/backup-r2-hint 2026-06-03 11:07:29 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ronnyandre/fliary!17
No description provided.