RADIUS authentication is retried at secondary server even if first server returned Auth Failure
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
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- php
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Bắt đầu với src/Auth/Source/Radius.php quanh dòng 167 và kiểm tra các đường dẫn return được tham chiếu trong src/Radius.php của dapphp/radius quanh dòng 1752. Xác nhận cách các lỗi xác thực và lỗi giao thức được biểu diễn, sau đó thêm coverage cho thấy một từ chối primary đã được xác nhận sẽ không được thử lại, trong khi một lỗi vẫn có thể fail over.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PHP
- Star
- 2
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
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 tương tự
-
priority: p3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nextcloud/fulltextsearch#1011 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
phpstan/phpstan-doctrine#794 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Automattic/static-site-importer#1767 ·