UI: a role denied one non-essential bootstrap API (e.g. listLdapConfigurations) fails to load the entire console
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 85/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu trong ui/src/store/modules/user.js tại GetInfo, đặc biệt là listLdapConfigurations và các handler dung sai listNetworkServiceProviders/listGuiThemes. Kiểm tra ui/src/permission.js để hiểu đường dẫn lỗi của route guard. Được xem là hoàn tất khi một lần đọc bootstrap không thiết yếu bị từ chối đặt flag của nó về giá trị mặc định mà không reject GetInfo, để console được tải thay vì chuyển hướng đến /user/login.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
problem
The web console fails to load entirely for any role denied one non-essential bootstrap read. GetInfo runs several independent calls under a single shared Promise and wires several to the same reject, including listLdapConfigurations, which only sets a flag. When a role denies it the 432 rejects the shared promise before listApis can resolve it (a race the small query usually wins), so GetInfo rejects and the router guard logs the user out instead of building routes. The tolerant pattern sits right beside it: listNetworkServiceProviders swallows its own error and the console still loads (listGuiThemes likewise).
Expected: a denied non-essential read degrades like listNetworkServiceProviders/listGuiThemes. Actual: blank console, redirect to /user/login.
versions
4.22 and current main. Client-side UI only; hypervisor/storage/network irrelevant.
The steps to reproduce the bug
- Create a custom role (e.g. from the DomainAdmin base type) that denies
listLdapConfigurations. - Assign an account to it.
- Log in to the web UI — the console never renders and you are redirected to login.
What to do about it?
Give listLdapConfigurations (and any non-essential bootstrap read) its own .catch that defaults the flag, as listNetworkServiceProviders already does. The underlying hazard is the shared resolve/reject across independent calls in GetInfo; reserve reject for genuinely essential calls such as listApis.
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.4k
- Merge trung bình
- 7 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 28
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 apache/cloudstack
-
create-kubernetes-binaries-iso.sh builds the ISO without setting a volume ID on EL8 based os's Đang mởbug component:kubernetes
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/cloudstack#14180 ·
-
bug component:projects component:UI
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
apache/cloudstack#14070 · 5 bình luận ·
-
component:backup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/cloudstack#14013 ·
-
KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4 Đang mởbug component:ceph
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/cloudstack#13989 · 3 bình luận ·
-
component:UI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/cloudstack#13944 · 3 bình luận ·
Tất cả issue của apache/cloudstack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
opensearch-project/k-NN#3597 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100