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

Aberta
#3,301 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
38/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
csharp

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
569
Forks
107
Merge médio
2h 49min
PRs com merge (30d)
397

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fluentcms/FluentCMS

Todas as issues de fluentcms/FluentCMS

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.