fix(rustfs): give each identity its own SecretStore, and catch the gap statically #453
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/rustfs-identity-reader"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The tempo identity deployed and its convergence Job succeeded in 6 seconds — bucket, policy, user, attach, and both halves of the isolation check all passed — but the credential never reached a Secret:
The round-trip ExternalSecret — the one that reads the frozen generator output back out and shapes it into
minio_access_key/minio_secret_key— used the sharedkubernetesSecretStore from therustfscomponent. That store's reader Role is scoped byresourceNamesto[rustfs-access-key, rustfs-secret-key]: the two root secrets. It could not see this identity's key at all.ESO's message names neither the Secret nor the Role, which is what made this worth closing statically rather than just fixing.
The fix
Each identity now carries its own namespaced SecretStore, and its reader Role covers both read paths:
rustfs-tempo-secret-keyollyrustfs-tempo-s3-credentialsAdding a consumer now touches one file and never has to widen a Role belonging to the store component.
The guard, and why its first version was useless
tests/rustfs-identities.shgains the check that would have caught this: for every ExternalSecret, the remote key it reads must be inside its store's readerresourceNames.The first version did not catch the shipped bug. It skipped any store not declared in the identity file — "not checkable here" — and the bug's whole shape was a store from another component. I verified this by reproducing the shipped manifest and watching the check pass:
So the rule is now that an identity must be self-contained: an ExternalSecret referencing a store this file does not declare is a failure, because its reader scope cannot be verified. Re-run against the same reproduction:
Two negative controls cover it: a key moved outside the reader scope, and the exact shipped shape.
bash tests/check.shexits 0. Server-side dry run applies all 9 objects clean.https://claude.ai/code/session_01KZoQin34jeyt6nDGqvJA76