simplesamlphp / simplesamlphp/simplesamlphp-module-radius
RADIUS authentication is retried at secondary server even if first server returned Auth Failure
还没有人认领这个 Issue。
- 主要语言
- PHP
- 星标
- 2
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
描述
We have configured two RADIUS servers for failover. Recently, I noticed that failed authentications from the primary are immediately re-asked at the secondary server (which still generates and Auth failure, so the end result is consistent and no harm done).
But there's really no point in asking the failover server if the primary is sure that the auth failed.
Looking at the code, I found a logic error here:
The code considers the RADIUS query successful only if it returns not-false.
The underlying library returns sth not-false only in case the authentication succeeded. Notably, a failed authentication is as "false" as a protocol error. See the return paths of its function: they are either outright "false" or compare whether the authentication was a success:
https://github.com/dapphp/radius/blob/master/src/Radius.php#L1752
I.e. error conditions and a negative outcome both have the same result; and the calling module in SSP will loop over all configured servers in both cases. Only a positive result breaks out of the loop.
Ideally, a confirmed negative result from the primary authentication server should be taken as-is.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 src/Auth/Source/Radius.php 第 167 行附近开始,检查 dapphp/radius 的 src/Radius.php 第 1752 行附近所引用的返回路径。确认身份验证失败和协议错误是如何表示的,然后添加覆盖测试,证明已确认的主节点拒绝不会重试,而错误仍然可以触发故障转移。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- php
- 领域
- authentication, backend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100