Skip to content

ci: production runs on a limited Spaces key (r10.0) - #377

Closed
MusaMisto wants to merge 1 commit into
releases/r10.0from
musa/ci/prod-limited-spaces-key-r10.0
Closed

MusaMisto wants to merge 1 commit into
releases/r10.0from
musa/ci/prod-limited-spaces-key-r10.0

Conversation

@MusaMisto

Copy link
Copy Markdown
Member

Production's Spaces key is a limited key (Read/Write/Delete on bitweenprod only). The first production deploy (10.0.91) exited at startup with Access Denied: SW-CloudFiles reads the bucket's lifecycle rules on every start, and Spaces doesn't let limited keys touch bucket settings at all. According to DigitalOcean's key docs, limited keys get only Read or Read/Write/Delete per bucket, and lifecycle, CORS, policies and versioning need a full-access key for every bucket.

Change: add environmentVariables.CloudFiles__DisableAutoLifecycle=true to the production job, so startup skips the lifecycle step. The same one-line change goes to both branches (this PR and its twin), so the later release merges cleanly.

Checked with the deployed key against bitweenprod:

  • These succeed: PUT object 200, GET object 200, HEAD bucket 200, DELETE object 204, and GET after delete 404. That is everything the app does with files at runtime.
  • These are refused: GET lifecycle 403, GET ACL 403, list buckets 403. The bucket-exists check treats AccessDenied as "exists", so the 403 on ACL is harmless.

Must happen once, by hand: temp30/ is where Bitween writes exchange files (DocumentPrefix = temp30/Bitweendocs). Without the bucket's expiry rules they are never deleted. The four rules are temp1 1 day, temp7 7, temp30 30 and temp365 365. They go on with a full-access key used once and then deleted.

Trade-off: the settings page and the retention preview can't read the bucket's rules with this key, so they say so instead of showing them. If the rules ever need changing, that's done by hand.

Spaces gives limited (per-bucket Read/Write/Delete) keys no bucket settings,
so SW-CloudFiles' startup read of the bucket's lifecycle rules was refused and
the first production deploy exited with Access Denied. Production skips that
step (CloudFiles__DisableAutoLifecycle=true); the temp expiry rules go on
bitweenprod once by hand. Every object operation the app makes works with the
limited key (put, get, head bucket, delete: checked against bitweenprod).
@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: simplify9/coderabbit/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d178b802-2c5a-4527-98ca-6ab4c8c3785b
📥 Commits

Reviewing files that changed from the base of the PR and between 344988a and 7285a46.

📒 Files selected for processing (1)
  • .github/workflows/bitween-api-cicd-gateway.yml
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MusaMisto

Copy link
Copy Markdown
Member Author

Not needed: production now uses a full-access Spaces key, so SW-CloudFiles manages the bucket's lifecycle rules itself.

@MusaMisto MusaMisto closed this Oct 13, 2026
@MusaMisto
MusaMisto deleted the musa/ci/prod-limited-spaces-key-r10.0 branch October 13, 2026 07:09
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