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

未关闭
#3,301 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
569
派生
107
平均合并
2 小时 49 分钟
30 天内合并 PR
397

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。