Trap requests to the OIDC callback endpoint that are missing the cookie that identifies the session
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
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- api, authentication, documentation
Hướng nghiên cứu
Bắt đầu bằng cách xác định handler GET /api/authn/oidc/callback và cấu hình OIDC sử dụng AUTHN_OIDC_REDIRECT_ORIGIN. Theo dõi cách cookie phiên bị thiếu đến được thư viện OIDC, sau đó kiểm tra tài liệu về cấu hình OIDC. Công việc được xem là hoàn tất khi các callback bị thiếu cookie nhận được phản hồi phù hợp không phải 500 và tài liệu nhấn mạnh việc sử dụng cùng domain với ứng dụng Workbench.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Issue
Requests sent to the GET /api/authn/oidc/callback endpoint must include the cookie which identifies the server-side session for the user. Currently, requests that are missing this cookie result in a 500 Internal Error response. The server log shows the message:
[ERROR] catch all: Error: did not find expected authorization request details in session, req.session["oidc:localhost"] is undefined
This error occurs because the OIDC library expects to find the server-side session data that had been created during the initial call to start the OIDC log in process (GET /api/authn/oidc/login). The server-side session is identified by a cookie sent with the request and when the cookie is absent in the call the the callback endpoint, the REST API creates a new session, instead of accessing the one from the initial request.
The missing cookie can occur if the server can be accessed using two different domain names, and the client accesses the Workbench app using the first domain name, but the OIDC configuration includes the second domain name in the OIDC configuration (configured using the AUTHN_OIDC_REDIRECT_ORIGIN environment variable). This would result in the browser storing the cookie using the first domain name and sending it with any requests to a host with that domain name. But not sending it in requests to hosts with the second domain name.
The Fix
- The REST API should identify requests to the OIDC callback endpoint that do not include the session identifier and send a suitable response, instead of a 500 Internal Error response
- The documentation for configuring OIDC should be updated to emphasize the importance of using the same domain name as when accessing the Workbench app
- Ngôn ngữ chính
- JavaScript
- Star
- 56
- Fork
- 18
- Merge trung bình
- 21 giờ 14 phút
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 mitre-attack/attack-workbench-rest-api
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
mitre-attack/attack-workbench-rest-api#513 ·
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 86/100
mitre-attack/attack-workbench-rest-api#505 ·
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 86/100
mitre-attack/attack-workbench-rest-api#499 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add ADM validation bypass for server-controlled fields on non-compliant objectsCó thể đã có người làm @seansica đã nhận 14 ngày trước. Đang mở
mitre-attack/attack-workbench-rest-api#517 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
mitre-attack/attack-workbench-rest-api#512 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mitre-attack/attack-workbench-rest-api
Issue tương tự
-
enhancement javascript python
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
jlab-sensing/ENTS-backend#851 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
guilhermerodz/input-otp#157 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
davidjerleke/embla-carousel#1414 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/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 72/100
Maintainer thường phản hồi trong vòng 1 ngày