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

Open
#3,301 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C#
Stars
569
Forks
107
Avg merge
2h 49m
Merged PRs (30d)
397

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fluentcms/FluentCMS

All issues in fluentcms/FluentCMS

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.