[RBAC PR 5.1] Auto-assign owners for approved namespaces - #2428
Merged
Conversation
philipfweiss
force-pushed
the
rbac-auto-ownership-clean
branch
from
August 18, 2026 20:29
d383991 to
e89ed8b
Compare
philipfweiss
force-pushed
the
rbac-creator-auto-ownership
branch
from
August 18, 2026 20:46
a92a340 to
ab0c9b0
Compare
philipfweiss
force-pushed
the
rbac-creator-auto-ownership
branch
from
August 18, 2026 22:41
ab0c9b0 to
f38206b
Compare
✅ Deploy Preview for thriving-cassata-78ae72 canceled.
|
philipfweiss
marked this pull request as ready for review
August 18, 2026 22:46
shangyian
reviewed
Aug 21, 2026
added 4 commits
August 24, 2026 13:13
Assign personal and ad hoc namespace creators a scoped owner role only within configured patterns, with atomic and serialized boundary creation.
Keep the ownership path focused on configuration, atomic role assignment, and overlap safety while removing parser relocation and repetitive tests.
Use the base boundary marker and RBAC history so role renames and audit behavior stay consistent across both provisioning paths.
Exercise pattern matching through namespace behavior and remove incidental code churn after the base PR merged.
philipfweiss
force-pushed
the
rbac-creator-auto-ownership
branch
from
August 24, 2026 20:19
e56e91a to
769c30d
Compare
Show that root and subtree patterns must both be configured so operators do not assume the wildcard includes the root.
ruizhang0519
approved these changes
Aug 25, 2026
Merged
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.
Tracking: #2234 (step 5.1).
Today, if Alice creates
personal.alicewhile DJ is permissive, DJ records the namespace without giving Alice an RBAC grant. When write restrictions are later enabled for that namespace, Alice cannot manage what she created, so an administrator has to repair ownership.This PR adds opt-in first-creator ownership for configured personal and ad hoc namespaces:
CREATOR_OWNED_NAMESPACE_PATTERNSaccepts exact names and trailing.*subtrees. It is empty by default.namespace:<name>:owners, withMANAGEon the namespace, descendant namespaces, and contained nodes.Patterns are first-claim pools. With
personal.*, any user already authorized to create a namespace can claim an unusedpersonal.<name>, so operators should only configure prefixes intended for self-service.CREATOR_OWNED_NAMESPACE_PATTERNS='["personal.*", "scratch"]'Nonmatching and existing namespaces keep their current behavior. This adds no migration or backfill. #2408 is merged, and this draft is rebased on
main.Verification:
Started a local FastAPI harness on
:18082with a fresh SQLite database, the production namespace router and models, permissive RBAC, two principals (aliceasUSER,deploy-botasSERVICE_ACCOUNT), and:CREATOR_OWNED_NAMESPACE_PATTERNS='["personal.*"]'