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