FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(provisioning): full realm-manifest coverage — clients, app settings, login providers, positions by windischb · Pull Request #210 · cocoar-dev/modgud · GitHub

feat(provisioning): full realm-manifest coverage — clients, app settings, login providers, positions - #210

Merged
windischb merged 2 commits into
developfrom
claude/nifty-galileo-428ea6
Aug 25, 2026
Merged

feat(provisioning): full realm-manifest coverage — clients, app settings, login providers, positions#210
windischb merged 2 commits into
developfrom
claude/nifty-galileo-428ea6

Conversation

Copy link
Copy Markdown
Contributor

What

Brings the declarative realm manifest to feature parity with the admin surface, and fixes the export/prune bugs of the same silently-dropped-field family.

Clients — full field coverage

  • AccessTokenType (the trigger bug: a manifest client with "Jwt" silently got reference tokens), applied at create and merge, exported, invalid values error contextually.
  • PAR/DPoP requirement flags, all six token/session lifetimes (seconds, canonically validated), static client claims + ClientClaimsPrefix, CORS origins, ConsentType, RequireClientSecret / EnableLocalLogin / AllowRememberConsent / AllowAccessTokensViaBrowser.
  • Manifest→DTO mapping deduplicated into BuildClientCreateDto / BuildClientUpdateDto; the parity drift test now compares every one of these fields between the admin path and the manifest path.

Apps — per-App settings override (ADR-0011)

  • RealmManifestApp.Settings passes ApplicationSettingsDto through the canonical AppAdminService path — including the Origin subdomain that drives the global host→app routing map.
  • Export emits Settings only for apps that actually have an override doc (no needless override materialization on re-apply).

Login providers — new section

  • Slug-keyed upsert through the canonical handlers; Type/Flavor immutable (Manifest.ImmutableField); the seeded Internal provider is reserved (Manifest.InternalProviderReserved) and prune-protected.
  • Secret: stored at create, rotated when set on an existing provider (mirrors user Password semantics), never exported.

Positions (MG-FT) — new section

  • AccountName-keyed upsert: purpose, active state, terminal policy (patch semantics via the existing PositionTerminalPolicyUpdateDto), grants as user keys with desired-set reconciliation (revoking ends running shifts via the MG-FT-07 cascade).
  • Feature-flag gated (Manifest.FeatureDisabled); terminal slots deliberately not modelled (device-bound credential material, like SA credentials).
  • Position endpoint validators extracted onto a shared PositionOpError (exact wire bodies preserved — verified by the full 89-test position suite) so the applier reuses the endpoint rules instead of forking them.

Export/prune bug fixes

  • BrowserSessions, ClientSessions, PositionSecurity realm-settings sections were missing from export (apply supported them; export→re-apply silently lost them).
  • Terminal-managed clients were exported into manifests that failed the position-link invariant on re-apply — now excluded.
  • Prune would have deleted terminal-managed clients (they are never in a manifest) — now protected like SA-linked clients.

Docs (docs/admin/realm-provisioning.md) and the served manifest-schema example updated.

Testing

  • New RealmManifestSectionsTests (ColdStart): import/apply/export/prune per new section, incl. Internal-provider protection, host-routing assertion, grant reconciliation, and the feature gate.
  • RealmManifestParityTests ClientShape extended to all new client fields; applier/export tests extended (AccessTokenType flow incl. omit-no-change and invalid-value error).
  • Full Modgud.Api.Tests: 728/728, Modgud.Tests.Unit: 1542/1542.

🤖 Generated with Claude Code

…tings, login providers, positions

The manifest applier silently dropped declared fields and whole feature
areas the admin surface already supports. This brings the manifest to
feature parity and fixes the export/prune bugs of the same family:

- Clients: apply + export ALL admin-API fields — AccessTokenType (the
  original bug: 'Jwt' imports yielded reference tokens), PAR/DPoP
  requirement flags, token/session lifetimes, static client claims +
  prefix, CORS origins, consent type, secret/local-login toggles.
  Manifest→DTO mapping is deduplicated into shared builders and guarded
  by the parity drift test.
- Apps: optional per-App settings override (ADR-0011) incl. the Origin
  subdomain that drives the global host→app routing map. Export emits
  Settings only for apps that actually have an override.
- Login providers: new manifest section (slug-keyed upsert, immutable
  Type/Flavor, Internal provider reserved + prune-protected, secret
  stored at create / rotated on apply, never exported).
- Positions (MG-FT): new manifest section — policy + grants as user
  keys with desired-set reconciliation and the canonical revocation
  cascades; feature-flag gated; terminal SLOTS deliberately excluded
  (device-bound credential material). Position endpoint validators are
  extracted onto a shared PositionOpError so the applier reuses the
  exact endpoint rules with unchanged wire contracts.
- Export bugs: BrowserSessions/ClientSessions/PositionSecurity realm
  settings were missing from export; terminal-managed clients were
  exported into un-applyable manifests. Prune would have deleted
  terminal-managed clients — now protected like SA-linked ones.

Docs and the served manifest-schema example updated; new ColdStart
section tests cover import/apply/export/prune for each new area.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…state

Mirror the PUT endpoint exactly: after the save, re-load the position and
run the deactivation revocations only when the PERSISTED document flipped
active -> inactive, instead of deciding off the manifest-derived in-memory
value (CodeQL cs/user-controlled-bypass).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
windischb merged commit 8bb2bd3 into develop Aug 25, 2026
8 checks passed
windischb deleted the claude/nifty-galileo-428ea6 branch August 25, 2026 10:47
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL