Repository navigation
fix(mongodb): surface per-user credentials to the tenant - #2860
Andrei Kvapil (kvaps) wants to merge 1 commit into
Conversation
The mongodb-rd cozyrd only included the cluster <release>-credentials secret (the databaseAdmin pair), so the lineage controller never stamped internal.cozystack.io/tenantresource=true on the per-user <release>-user-<user> secrets. They stayed invisible to the tenant and to any consumer reading the core.cozystack.io TenantSecret projection, so a provisioned user's password could not be surfaced. Label each per-user secret apps.cozystack.io/user-secret=true and add a matching include rule to the cozyrd, mirroring the bucket chart. Also add username to the secret so the credential is self-describing rather than relying on the secret-name suffix. Co-Authored-By: Claude <[email protected]> Signed-off-by: Andrei Kvapil <[email protected]>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
This PR has had no activity for 60 days and was marked |
|
Closed because no activity followed the |
What this PR does
MongoDB exposes each managed user's password as a separate
<release>-user-<user>secret, but themongodb-rdcozyrd only includedthe cluster
<release>-credentialssecret (thedatabaseAdminpair) inits
secrets.includerules. As a result the lineage controller neverstamped
internal.cozystack.io/tenantresource=trueon the per-usersecrets, so a provisioned user's password was invisible to the tenant and
to anything reading the
core.cozystack.ioTenantSecret projection.This labels each per-user secret
apps.cozystack.io/user-secret=trueandadds a matching
matchLabelsinclude rule to the cozyrd — the samepattern the bucket chart already uses for its per-user S3 credentials. A
usernamefield is also added so the forwarded secret is self-describinginstead of relying on the secret-name suffix.
helm-unittest for the mongodb chart is green (94 tests).
Release note
Related
Found while building the cozyportal managed-services integration, where per-user credentials are surfaced to the portal user: