Commit graph

9 commits

Author SHA1 Message Date
ecac359344 yavsc-org: OAuth2 client admin editor overhaul — per-collection pages + missing fields
The OAuth2 client editor at /Client/Edit/{id} previously exposed 8
fields out of ~30 scalars and 10 collections on the IdentityServer8
Client entity. Editing the collections (RedirectUris, Scopes, Grant
Types, Cors Origins, IdP Restrictions, Claims, Properties, Secrets)
was either impossible or jammed into a single broken text input that
bound against an IEnumerable<string> property.

Restructure into per-collection subpages, each with its own
list/add/remove flow:

- RedirectUris       /Client/EditRedirectUris/{id}
- PostLogoutRedirectUris /Client/EditPostLogoutRedirectUris/{id}
- Scopes             /Client/EditScopes/{id}
- GrantTypes         /Client/EditGrantTypes/{id}
- CorsOrigins        /Client/EditCorsOrigins/{id}
- IdPRestrictions    /Client/EditIdPRestrictions/{id}
- Claims             /Client/EditClaims/{id}
- Properties         /Client/EditProperties/{id}
- Secrets            /Client/EditSecrets/{id}

Implementation:

- New partial class ClientController.Collections.cs with one
  GET/Add/Remove trio per collection. Add/Remove dispatch through
  generic helpers that handle the EF row + ClientId check.
- Shared _EditableStringList.cshtml partial consumed by the six
  single-string-field collection pages. Uses reflection to pull
  the value field and the row Id off the entity — avoids six
  nearly-identical table+form copies.
- Claims / Properties / Secrets each have their own view because
  they carry 2+ fields (Type+Value, Key+Value, or
  Type+Value+Description+Expiration).
- Main Edit.cshtml enriched: ClientId/Id hidden, all scalar
  fields split into fieldsets (Core, Security, Logout, Tokens,
  Device flow, Tokens extra), nav links to the 9 subpages with
  current row counts as badges.
- ClientController.Edit(int) GET now loads the client with all
  navigations via LoadClientAsync so the Edit.cshtml nav badges
  render real counts.

Field-correctness notes (verified by disassembling HigginsSoft
IdentityServer8.EntityFramework.Entities.Client 8.0.5-preview-net9):

- The property is PairWiseSubjectSalt, not PairwiseSubjectSalt
  (capital W on 'Wise').
- CibaLifetime and PollingInterval do NOT exist on Client in this
  IdentityServer8 version — those properties were a guess. The
  Device flow fieldset contains DeviceCodeLifetime + UserCodeType
  instead.
- AllowedIdentityTokenSigningAlgorithms and AllowAccessTokensViaBrowser
  were missing from the original form and are now exposed.
- ConsentLifetime and UserSsoLifetime are int? (nullable); the form
  binds them as plain int fields which accept empty strings.

Security:

- All new actions stay under [Authorize('AdministratorOnly')].
- Each Add/Remove takes an explicit id (Client.Id) and the row's
  ClientId is checked on the server before any delete; a rowId
  from another client returns NotFound.

Docs:

- doc/dev-tracking/client-editor-overhaul.md — inventory, status,
  follow-up ideas (confirmation prompts, validation, MVC tests).
2026-06-21 16:53:34 +01:00
4192c7cbf9 doc cleanup 2026-06-20 19:00:10 +01:00
19cf073677 Regenerate the secret 2026-06-19 01:36:08 +01:00
2615b4e86b naming 2026-06-18 21:16:41 +01:00
94fb98eff6 doc, doc and doc. 2026-06-18 02:18:49 +01:00
f750cf75a2 docs: correct CA3 tool from Playwright to Selenium 2026-06-14 18:58:02 +01:00
26d36dee71 synchro w\ main 2026-06-14 18:26:40 +01:00
b18e60979a docs: add trunk-cleanup challenge brief
Énoncé du défi : aligner main sur l'intention trunk qui a
déjà opéré sur themeok, libérer le dépôt du code inutile,
bien nettoyer CSS/JS, sans casser le JS et le CSS de
_Layout.cshtml. Introduire immédiatement des tests d'UI
automatisés comme garde-fou.

Le document contient :
- Énoncé du défi
- État actuel des 3 branches (themeok, main, refac/js-bundle)
- Résultats du diagnostic de main (cause racine : contenu
  vide + erreur JS sur carousel vide, pas un problème de
  fichiers servis)
- 6 critères d'acceptation vérifiables
- Stratégie de tests UI automatisés (Playwright C#)
- Plan d'attaque en 6 étapes
- 5 risques identifiés (cache navigateur, double binding
  Kestrel, .env non versionné, ports utilisés, quiproquos
  de branches)
- Todo court/moyen/long terme
- Annexes : environnement d'exécution, procédure make reinstall

Le diagnostic a été reproduit en worktree diag/main sur
ports 5060/5061, en surchargeant la config Kestrel via
variables d'environnement pour ne pas écraser le service
systemd yavscOrg sur port 3002.
2026-06-14 17:22:50 +01:00
bba719c8c1 doc : Architecute 2026-06-12 12:34:30 +01:00