Self-registered clients have no global cap, and an explicit shared-tenant authority passes the SSO check

Aperta
#3,301 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp

Direzione di ricerca

Start with src/FluentCMS.Core/Identity/Oidc/McpClients.cs, DynamicClientRegistration.cs, ClientRegistrationService.cs, and Identity/SsoOptions.cs; read the existing registration limits, cleanup, counting, and authority validation paths. Coordinate with the changes in #3272 and #3225, which touch the same code. Done means all acceptance checks pass, including tests for each behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:identity security type:bug

Problem

  1. Self-registered clients have no global cap. Pending clients are capped (Identity/Oidc/McpClients.cs:284), but in Open mode with a default role the cap is skipped (:281-287), and approved or rejected clients are never pruned. The only bound is an in-memory, per-address, per-instance hourly limiter (Identity/Oidc/DynamicClientRegistration.cs:65,327-370). CountPendingAsync (McpClients.cs:357-369) and the startup RemoveUnlistedAsync (Identity/Oidc/ClientRegistrationService.cs:59-69) read every application, so growth also costs time.
  2. The shared-tenant check is skipped when Authority is set. It sits inside if (string.IsNullOrWhiteSpace(Authority)) (Identity/SsoOptions.cs:145-152), so an explicit …/common/v2.0 authority passes validation.

Paths are under src/FluentCMS.Core/.

Proposal

  • A configurable cap on all self-registered clients, a job that prunes ones never used, and a count done in SQL.
  • Run the shared-tenant check on the resolved authority.

Done together with #3272 and #3225, which change the same client and SSO code.

Acceptance

  • Registration is refused at the cap in every registration mode
  • A self-registered client never used within the configured period is removed
  • Counting clients does not load them
  • An explicit shared-tenant authority is refused at startup unless the tenant list is set
  • Tests for each

Found in the code review of 17 Nov 2026.

Lingua principale
C#
Stelle
569
Fork
107
Merge medio
2h 49m
PR unite (30g)
397

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fluentcms/FluentCMS

Tutte le issue di fluentcms/FluentCMS

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.