Skip to content

feat(BA-6868): RBAC-gate AppConfig fragment single writes at the processors#12827

Closed
jopemachine wants to merge 4 commits into
feat/BA-6859-fragment-rbac-scope-bindingfrom
feat/BA-6868-fragment-write-authz
Closed

feat(BA-6868): RBAC-gate AppConfig fragment single writes at the processors#12827
jopemachine wants to merge 4 commits into
feat/BA-6859-fragment-rbac-scope-bindingfrom
feat/BA-6868-fragment-write-authz

Conversation

@jopemachine

@jopemachine jopemachine commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Attach the RBAC validators to the fragment write processors so create / update / purge are authorized at the fragment scope, and register the service/processors in the DI containers. A user may write their own user-scope fragment; a cross-user write is denied; public fragments are superadmin-only. Enforced only when RBAC enforcement is enabled.

Bulk-write authorization (bulk scope targets + bulk-scope validator wiring) ships with the API PR (#12759).

📚 Stacked PRs

Part of the AppConfigFragment / AppConfig stack under BEP-1052 (epic BA-5781). Merge in order (#12801 was split into #12825 / #12826 / #12827):

  1. feat(BA-6552): add app_config_fragments DB model and Alembic migration #12306feat(BA-6552): app_config_fragments DB model and Alembic migration
  2. feat(BA-6553): add app_config_fragments repository layer #12307feat(BA-6553): repository layer
  3. refactor(BA-6619): consolidate AppConfigScopeType into common.data (single definition) #12403refactor(BA-6619): consolidate AppConfigScopeType into common.data
  4. refactor(BA-6620): ExistsQuerier ops primitive + AppConfigAllowList.exists #12405refactor(BA-6620): ExistsQuerier + AppConfigAllowList.exists
  5. feat(BA-6554): add app_config_fragment service layer #12358feat(BA-6554): AppConfigFragment service layer
  6. feat(BA-6702): move fragment rank to the allow list with scope defaults #12516feat(BA-6702): move fragment rank to the allow list with scope defaults
  7. feat(BA-6701): expose allow-list rank on the v2 API surface #12517feat(BA-6701): expose allow-list rank on the v2 API surface
  8. feat(BA-6704): cascade app config subtree deletion from the definition #12518feat(BA-6704): cascade app config subtree deletion from the definition
  9. feat(BA-6626): app_config_fragment bulk repository layer #12426feat(BA-6626): app_config_fragment bulk repository layer
  10. feat(BA-6618): app_config_fragment bulk CRUD service layer #12401feat(BA-6618): app_config_fragment bulk CRUD service layer
  11. feat(BA-6810): AppConfigFragment visible-fragments query (repository layer) #12706feat(BA-6810): AppConfigFragment visible-fragments query (repository layer)
  12. feat(BA-6867): add generic RBAC scoped-ops primitives #12825feat(BA-6867): RBAC scoped-ops primitives (closed — folded into feat(BA-6859): bind AppConfig fragments to their RBAC scope on write (repository layer) #12826)
  13. feat(BA-6859): bind AppConfig fragments to their RBAC scope on write (repository layer) #12826feat(BA-6859): bind fragments to their RBAC scope on write (repository layer)
  14. 👉 feat(BA-6868): RBAC-gate AppConfig fragment single writes at the processors #12827feat(BA-6868): RBAC-gate fragment single writes at the processors ← you are here
  15. feat(BA-6555): AppConfig merge engine + resolve service (service layer) #12359feat(BA-6555): AppConfig merge engine + resolve service (service layer)
  16. feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update) #12377feat(BA-6556): AppConfig REST v2 API
  17. feat(BA-6860): RBAC-gate app_config fragment writes at the processors #12759feat(BA-6860): fragment write API routes + bulk write authz

Jira: https://lablup.atlassian.net/browse/BA-6868

🤖 Generated with Claude Code

jopemachine and others added 2 commits July 14, 2026 15:48
Entity-agnostic RBAC write primitives extracted so any entity can reuse them:

- RBACWriteOps.create_scoped / purge_scoped: single scoped create/purge that also
  writes/clears the entity's scope association in the same transaction.
- entity_creator: a None primary scope_ref marks a global-scoped entity (no association).
- scope_unbinder: scope_ref is Optional to support global-scoped entities.
- BulkScopeActionRBACValidator: per-scope RBAC validation for bulk scope actions.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…(repository layer)

A user/domain fragment is associated to its RBAC scope on create and unbound on purge;
public fragments are global-scoped and carry no association, so fragment writes can be
authorized by RBAC (BEP-1052). Registers APP_CONFIG_FRAGMENT as a ScopeType so the
fragment is a full entity-as-scope, and backfills its permissions onto existing roles.

Stacks on BA-6867 (RBAC scoped-ops primitives).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@jopemachine jopemachine force-pushed the feat/BA-6859-fragment-rbac-scope-binding branch from a7b0d89 to 8663ee7 Compare July 14, 2026 06:48
jopemachine and others added 2 commits July 14, 2026 15:49
…(repository layer)

A user/domain fragment is associated to its RBAC scope on create and unbound on purge;
public fragments are global-scoped and carry no association, so fragment writes can be
authorized by RBAC (BEP-1052). Registers APP_CONFIG_FRAGMENT as a ScopeType so the
fragment is a full entity-as-scope, and backfills its permissions onto existing roles.

Stacks on BA-6867 (RBAC scoped-ops primitives).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…essors

Attach the RBAC validators to the fragment write processors so create / update / purge
are authorized at the fragment scope, and register the service/processors in the DI
containers. A user may write their own user-scope fragment; a cross-user write is denied;
public fragments are superadmin-only. Enforced only when RBAC enforcement is enabled.

Bulk-write authorization ships with the API PR. Stacks on BA-6859.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@jopemachine

Copy link
Copy Markdown
Member Author

Superseded — the write-authorization design changed (public is determined by the app-config service, not RBAC; RBAC scoped-ops stay concrete). Folding the authz into #12826. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:manager Related to Manager component size:L 100~500 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant