Repository navigation
Conversation
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).
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
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. Comment |
Member
Author
|
Not needed: production now uses a full-access Spaces key, so SW-CloudFiles manages the bucket's lifecycle rules itself. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Production's Spaces key is a limited key (Read/Write/Delete on
bitweenprodonly). The first production deploy (10.0.91) exited at startup withAccess 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=trueto 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:AccessDeniedas "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 aretemp11 day,temp77,temp3030 andtemp365365. 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.