Feature request: PKCE (S256) support for OIDC SSO login
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 54/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- api, authentication
Hướng nghiên cứu
Start by tracing the API's existing OIDC authorization and callback flow, especially where it stores state and exchanges the authorization code; the issue does not name specific files or tests. Check the bundled openid-client PKCE helpers. Done means authorization requests send an S256 challenge and the matching server-side verifier is included in the token exchange, while the existing login flow still works for providers that do not require PKCE.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem?
The built-in OIDC SSO login works well, but the Unraid API does not send a PKCE code_challenge in the authorization request. Identity providers that require PKCE for a client therefore reject the login, and PKCE has to be disabled for the Unraid client.
Steps to reproduce
- Add an OIDC provider under Settings → Management Access → API → OIDC (issuer, client ID, client secret, scopes, an authorization rule).
- In the identity provider, enable "PKCE required" for the Unraid client (tested with Pocket ID v2.19.1: "PKCE" toggle on the OIDC client).
- Click the SSO button on the Unraid login page.
Actual result
The authorization request contains response_type, client_id, redirect_uri, scope and state, but no code_challenge / code_challenge_method. The provider returns invalid_request, and /var/log/graphql-api.log shows:
OIDC callback error: Error: Missing required parameters
The user only sees "Authentication failed".
Describe the solution you'd like
The Unraid API generates a code verifier, sends code_challenge with code_challenge_method=S256, and includes the code_verifier in the token request.
- The OIDC library already bundled with the API (
openid-client6.6.4) has built-in helpers:randomPKCECodeVerifier()andcalculatePKCECodeChallenge(). - Store the verifier server-side together with the existing
state, and pass it in the token exchange. - Always send PKCE (S256). This is harmless for providers that do not require it. Alternatively, add a per-provider option "Use PKCE (S256)", enabled by default.
Describe alternatives you've considered
- Disabling "PKCE required" for the Unraid client in the identity provider (works, but weakens the flow).
- Putting a PKCE-capable reverse-proxy authentication in front of the WebGUI (adds a second login layer and does not fix the native flow).
Additional context
- OAuth 2.0 Security Best Current Practice (RFC 9700) and the OAuth 2.1 draft recommend PKCE for all clients, including confidential clients, as protection against authorization code injection.
- More identity providers make PKCE mandatory or recommended by default (Pocket ID, Authentik, Keycloak, Zitadel and others).
- The Unraid WebGUI gives full control of the server, so it deserves the strongest login flow available.
Thank you for adding OIDC SSO. It is a great feature, and PKCE support would make it complete.
Environment (if relevant)
Unraid OS Version: 7.3.2 (Unraid API 4.37.4+ad268301)
Pre-submission Checklist
- I have searched existing issues to ensure this feature hasn't already been requested
- This is not an Unraid Connect related feature (if it is, please submit via the support form instead)
- I have provided clear examples or use cases for the feature
- Ngôn ngữ chính
- TypeScript
- Star
- 123
- Fork
- 25
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của unraid/api
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullableĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
parityHistory query fails with NaN when a parity-checks.log record has an empty errors fieldĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mckinsey/agents-at-scale-ark#4091 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 94/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
NUS-Project-SaBai/project-sabai#386 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
android needs clarification
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
super-productivity/super-productivity#12105 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày