apache / apache/cloudstack

[Hardening] F-04: Insecure Default 2FA Provider Configuration (Opt-In Instead of Opt-Out).

未關閉
#13,336 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
hardening
主要語言
Java
星號
3.1k
分支
1.4k
平均合併
6 天 19 小時
30 天內合併 PR
32

描述

### The required feature described as a wish

Image

**Description:** A Static PIN is no more secure than a password. Arguably, it is not even a second factor at all, but merely a second step in the authentication process (more on this in the following findings). There may be cases where TOTP is not a viable option, and a Static PIN serves as an alternative. However, Static PIN should not be offered out-of-the-box or listed as an option, as users will naturally follow the path of least resistance toward the weaker method.

**Affected Components:** Management UI

**Impact:** The Static PIN makes the second factor as static and reusable as the password, defeating the purpose of 2FA. An attacker who obtains the PIN once retains persistent access. Replay attacks will succeed indefinitely, and the PIN is vulnerable to the same attacks as a password.

**Steps to Reproduce:**
- Log in to the CloudStack Management UI as a Root Admin.
- Navigate to Configuration > Global Settings.
- Search for `user.2fa.default.provider`, `user.2fa.providers.order`, and `user.2fa.providers.exclude`.
- Observe that Static PIN is not excluded and may be presented as a selectable option.

**Recommended Remediation:** Adopt a secure-by-default, opt-out model: set `user.2fa.default.provider` to TOTP, set `user.2fa.providers.order` to TOTP only by default, and add the Static PIN provider to `user.2fa.providers.exclude` unless explicitly re-enabled by an administrator.

貢獻指南

開啟貢獻指南

研究方向

從 Management UI 中 Configuration > Global Settings 的流程開始,追蹤 user.2fa.default.provider、user.2fa.providers.order 和 user.2fa.providers.exclude 的定義與呈現方式。完成的標準是 TOTP 為預設 provider,也是預設排序中的唯一 provider,而 Static PIN 會被排除,除非管理員明確重新啟用它;在 UI 中驗證這三個設定。

由索引模型根據 Issue 內容生成。

評估

領域
authentication, security
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。