Grant default-shared objects read access, not full ownership - #1343
Merged
Conversation
set_acls() granted every group in [rbac] default_acls Role.OWNER on each new object -- almost certainly copy-pasted from the creator's own grant just above it, since the config comment describes this setting as "sharing" and explicitly frames it as revocable, not as handing every registered user delete rights over every object platform-wide. Grant Role.READER instead; the creator's own grant is unaffected and stays Role.OWNER.
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.
Summary
set_acls()granted every group listed in[rbac] default_acls(e.g. "All users")Role.OWNERon every new object -- full read/write/delete rights, not merely visibility. This looks like a copy-paste from the line right above it (the creator's own grant, which should stay Owner), since the config comment describes the setting as "sharing... this can be revoked later on," not as handing delete rights to the whole org by default.Role.READER. The creator's own grant is untouched.yeti.conf.sample's comment to say "grant read access" explicitly.Behavior change, not retroactive: existing objects already created keep whatever ACLs they have; this only changes what new objects get going forward. Deployments relying on the old (accidental) Owner-by-default behavior for the configured default group would need to grant it explicitly now, the same way any other role is granted.
Test plan
ruff check/format --checkandty checkcleantest_default_aclsto assert on the actual role values (All users-> Reader, creator -> Owner), not just ACL membershiptests/schemas,tests/apiv2,tests/core_testssuite run clean -- 3 pre-existing failures confirmed present on a cleanmainbaseline too, unrelated to this change