Skip to content

feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update)#12377

Draft
jopemachine wants to merge 2 commits into
feat/BA-6555-app-config-merge-enginefrom
feat/BA-6556-app-config-rest-v2
Draft

feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update)#12377
jopemachine wants to merge 2 commits into
feat/BA-6555-app-config-merge-enginefrom
feat/BA-6556-app-config-rest-v2

Conversation

@jopemachine

@jopemachine jopemachine commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

Adds the AppConfig REST v2 API (BA-6556, BEP-1052 / epic BA-5781), mirroring the layered app_config_allow_list / app_config_definition stacks. This is the API surface over the fragment write/search service (BA-6554) and the merged-AppConfig read service (BA-6555).

Endpoints

METHOD path auth operation
POST /v2/app-config-fragments/ superadmin create a fragment at any scope
GET /v2/app-config-fragments/{fragment_id} superadmin get by id
PATCH /v2/app-config-fragments/{fragment_id} superadmin update the config document
DELETE /v2/app-config-fragments/{fragment_id} superadmin purge by id
POST /v2/app-config-fragments/search superadmin paginated cross-scope search
POST /v2/app-config-fragments/scoped-search auth fragments visible to the calling (domain, user)
POST /v2/app-config/resolve auth merged AppConfig for a principal
GET /v2/app-config/public/{config_name} anonymous public-only merged read (no auth middleware)

Layers

  • DI wiring — register AppConfigFragmentRepositories + AppConfigService / AppConfigFragmentService + processors into Repositories / Services / Processors / factory.
  • scoped_search — now principal-visibility aware: VisibleConfigTarget + AppConfigVisibleScope resolve to public + the principal's domain + the principal's own user fragment (reusing the by_*_visibility conditions), unconditional like resolve.
  • public resolveAppConfigService.resolve_public + list_public_fragments merge only public-scope fragments for an anonymous (pre-login) caller.
  • API — shared AppConfigAdapter, v2 DTOs (app_config, app_config_fragment), route registries + tree wiring, AppConfigResolveNotAllowed (403).

Notes

  • app_config processors carry no RBAC validator (per the agreed phase plan) — auth is gated at the REST route. resolve / scoped-search additionally reject a request whose user_id is not the authenticated caller, a temporary stand-in until the validator lands. domain is not yet guarded.
  • GQL / SDK / CLI for AppConfig follow in subsequent PRs.

📚 Stacked PRs

Part of the AppConfigFragment / AppConfig stack under BEP-1052 (epic BA-5781). Merge in order:

  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-6886): register APP_CONFIG_FRAGMENT as an RBAC resource type #12856feat(BA-6886): register APP_CONFIG_FRAGMENT as an RBAC resource type + permission backfill
  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. fix(BA-6872): seed APP_CONFIG_FRAGMENT permissions into the RBAC role fixture #12837fix(BA-6872): seed APP_CONFIG_FRAGMENT permissions into the RBAC role fixture
  15. chore(BA-6873): drop the dead APP_CONFIG RBAC entity type #12839chore(BA-6873): drop the dead APP_CONFIG RBAC entity type
  16. feat(BA-6555): AppConfig merge engine + resolve service (service layer) #12359feat(BA-6555): AppConfig merge engine + resolve service (service layer)
  17. 👉 feat(BA-6556): AppConfig REST v2 API (raw fragments and merged read/update) #12377feat(BA-6556): AppConfig REST v2 API ← you are here
  18. feat(BA-6860): RBAC-gate app_config fragment writes at the processors #12759feat(BA-6860): fragment write API routes + bulk write authz

Access model: fragment create/update/purge are gated by RBAC (a user writes their own user-scope fragment, a domain admin their domain's, a superadmin any — public is superadmin-only); reads are gated by the allow list (existence = readable layer, rank = merge order) plus scope visibility, with no RBAC on the read path; app_config_definitions / app_config_allow_list themselves are superadmin-only (REST + GQL). Closed / superseded: #12794 · #12756 · #12764.


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/


📚 Documentation preview 📚: https://sorna--12377.org.readthedocs.build/en/12377/


📚 Documentation preview 📚: https://sorna-ko--12377.org.readthedocs.build/ko/12377/

@github-actions github-actions Bot added size:XL 500~ LoC comp:manager Related to Manager component comp:common Related to Common component labels Jun 23, 2026
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 8647d4b to 818444b Compare June 24, 2026 08:06
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 39bb559 to 7d4e0cc Compare June 24, 2026 08:10
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 818444b to 13b4d40 Compare June 24, 2026 08:19
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 7d4e0cc to 8168065 Compare June 24, 2026 08:21
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 13b4d40 to 67fe4c6 Compare June 24, 2026 08:34
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 8168065 to 304ddcd Compare June 24, 2026 08:36
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 67fe4c6 to de63b73 Compare June 24, 2026 09:42
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch 2 times, most recently from caf0913 to f208ae6 Compare June 24, 2026 10:11
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from bb05c39 to 547d235 Compare June 25, 2026 00:58
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from f208ae6 to e20123e Compare June 25, 2026 00:59
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 547d235 to 8c6c5a9 Compare June 25, 2026 01:03
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from e20123e to 2e6fdbe Compare June 25, 2026 01:03
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 8c6c5a9 to 74a7d2e Compare June 25, 2026 01:13
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 2e6fdbe to 39e5265 Compare June 25, 2026 01:13
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 74a7d2e to 15ce5fb Compare June 25, 2026 01:36
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 39e5265 to 98932dc Compare June 25, 2026 01:38
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 15ce5fb to 1d15924 Compare June 25, 2026 01:45
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 98932dc to fa7cabe Compare June 25, 2026 01:47
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch 2 times, most recently from 13e7c44 to 1e71fac Compare June 25, 2026 02:05
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from fa7cabe to b273700 Compare June 25, 2026 02:09
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 1e71fac to 27061c1 Compare June 25, 2026 02:47
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from b273700 to 56586f7 Compare June 25, 2026 02:49
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 6de2086 to ad197c4 Compare July 3, 2026 07:40
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 5b061dd to 71f85de Compare July 3, 2026 07:40
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 347990c to f603fa9 Compare July 6, 2026 01:30
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from d7bdad2 to 70928e9 Compare July 6, 2026 01:30
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from f603fa9 to 347990c Compare July 6, 2026 01:49
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 70928e9 to d7bdad2 Compare July 6, 2026 01:49
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 347990c to b447d79 Compare July 6, 2026 02:35
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from d7bdad2 to 2b676cc Compare July 6, 2026 02:35
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from b447d79 to 25dbbe5 Compare July 6, 2026 08:02
@jopemachine jopemachine force-pushed the feat/BA-6556-app-config-rest-v2 branch from 2b676cc to 9977c1d Compare July 6, 2026 08:02
@jopemachine jopemachine force-pushed the feat/BA-6555-app-config-merge-engine branch from 25dbbe5 to 9e7f3f9 Compare July 7, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:docs Documentations comp:common Related to Common component comp:manager Related to Manager component size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant