mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
fix(seaweedfs): bump the COSI driver to v0.4.0 for the lost-grant fix (#5284)
## What this PR does This PR bumps seaweedfs COSI driver to v0.4.0, because v0.3.1 can lose a grant for good: BucketAccess reports `accessGranted` and its Secret is written, but S3 gateways keep rejecting the key with `InvalidAccessKeyId`. Fixes #4912. Driver v0.3.1 grants access by rewriting legacy `/etc/iam/identity.json`, and every S3 gateway migrates this file to per-identity files and renames it away on each change, so grant written during migration is dropped. v0.4.0 also writes `/etc/iam/identities/<user>.json` on grant (seaweedfs/seaweedfs-cosi-driver#15). First version of this PR built the driver from that upstream commit, now upstream released v0.4.0 so it's just a tag bump. Rest of v0.4.0 doesn't reach the platform: - `readwrite-governance-bypass` access policy (seaweedfs/seaweedfs-cosi-driver#16) is opt-in, none of our BucketAccessClasses use it. - Bucket deletion is refused while objects hold an active lock (seaweedfs/seaweedfs-cosi-driver#18), only for object-lock buckets. All `-lock` BucketClasses are `Retain`, and sidecar calls DriverDeleteBucket only for `Delete`. - Filer errors (seaweedfs/seaweedfs-cosi-driver#20) are now matched by exact not-found message, I checked it against seaweedfs 4.45 filer and formats match. One behavior change: bucket deletion doesn't ignore errors of the recursive delete anymore, so sidecar retries instead of reporting success. How I tested (seaweedfs 4.45, two S3 gateways): Bucket with one user, then three more users added in one change, after a minute ListObjects with each user key, rejected key retried once more after 30s. Five runs for each driver, the fixed one is a build of `5efd120`, the commit v0.4.0 takes the grant fix from: | driver | keys rejected for good | | --- | --- | | v0.3.1 | 5 of 20 (4 runs out of 5 lost at least one) | | `5efd120` | 0 of 20 | Same failure broke v1.7.1-rc.1 e2e, RabbitMQ backup round-trip got `403 InvalidAccessKeyId` for freshly granted key: https://github.com/cozystack/cozystack/actions/runs/42980741995 Keys already lost on running clusters stay broken after upgrade. Workaround from #4912 still works: remove user from Bucket, wait until its BucketAccess is gone, add it back. ### Screenshots Not a UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(seaweedfs): bucket users granted together could get S3 keys that never work (403 InvalidAccessKeyId). COSI driver is bumped to v0.4.0, which writes each grant to per-identity IAM file. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Updates** * Updated the SeaweedFS COSI driver to version `v0.4.0`. * The updated driver writes IAM files per identity, helping preserve grants when identity files are updated. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
3 files changed
+8
-5
No files matched your search
@@ -1 +1 @@
|
||||
ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.3.1
|
||||
ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.4.0
|
||||
@@ -7,7 +7,7 @@ suite: seaweedfs COSI driver image pin
|
||||
# BucketAccess and ignores the accessPolicy parameter. The chart ships a
|
||||
# -readonly BucketAccessClass with parameters.accessPolicy: readonly, so on
|
||||
# v0.1.2 a credential meant to be read-only is silently granted read-write.
|
||||
# The package values.yaml overrides cosi.image to v0.3.1, which honours
|
||||
# The package values.yaml overrides cosi.image to v0.4.0, which honours
|
||||
# accessPolicy: readonly.
|
||||
#
|
||||
# This test does not set the image itself; it relies on the package values.yaml
|
||||
@@ -25,7 +25,7 @@ release:
|
||||
namespace: cozy-seaweedfs
|
||||
|
||||
tests:
|
||||
- it: pins the cosi-driver container to v0.3.1 (read-only access enforcement)
|
||||
- it: pins the cosi-driver container to v0.4.0 (read-only access enforcement)
|
||||
template: charts/seaweedfs/templates/cosi/cosi-deployment.yaml
|
||||
set:
|
||||
seaweedfs.cosi.enabled: true
|
||||
@@ -35,4 +35,4 @@ tests:
|
||||
value: seaweedfs-cosi-driver
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].image
|
||||
value: ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.3.1
|
||||
value: ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.4.0
|
||||
@@ -303,7 +303,10 @@ seaweedfs:
|
||||
# S3 actions for every BucketAccess and ignores the accessPolicy parameter.
|
||||
# v0.3.x honours accessPolicy: readonly, so a -readonly BucketAccessClass
|
||||
# actually issues read-only (Read,List) credentials instead of read-write.
|
||||
image: "ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.3.1"
|
||||
# v0.4.0 also writes each grant to the per-identity IAM file: v0.3.1
|
||||
# rewrites only the legacy identity.json, which the S3 gateways migrate
|
||||
# concurrently, so a grant could be lost for good.
|
||||
image: "ghcr.io/seaweedfs/seaweedfs-cosi-driver:v0.4.0"
|
||||
podLabels:
|
||||
policy.cozystack.io/allow-to-apiserver: "true"
|
||||
driverName: "seaweedfs.objectstorage.k8s.io"
|
||||
|
||||
Reference in new issue
Block a user