mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 22:53:43 +09:00
Tenant passwords move to the Cozystack credentials API: the chart renders one CredentialTemplate per user and each user of the PerconaServerMongoDB reads its password from the account Secret the controller keeps, so a password is shown once, at mint, instead of being generated at render time. MongoDB computes SCRAM from the plaintext, so the account Secret stores the password itself. The operator re-reads that Secret on every reconcile and runs updateUser when its digest changes, so a mint applies without a restart and the Secret needs no label. The per-user Secrets and users.<name>.password are gone; a password left in values is ignored and draws an admission warning that points at a mint on the user's Credential. <release>-credentials keeps the databaseAdmin system user, a platform account: it is rendered not tenant-visible and the ApplicationDefinition excludes it instead of including it. Users named like a system user, or mapping to one account name or to one longer than 63 characters, are refused. The Percona operator creates and updates the users in spec.users but never drops one that leaves it, so a removed user would lose its CredentialTemplate and account Secret yet keep its last password in MongoDB, with no Credential left to revoke it through. Every declared user therefore also holds a marker role that grants nothing, and only the operator grants it. A post-upgrade hook logs in as the userAdmin platform account and drops the users in admin that hold the marker, are no longer declared, and are not system users. A user without the marker, created by hand or before the marker existed, is never touched. The hook is skipped while restoring from a backup. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd