token-exchange-aiac: put the refusal reason in the rejection, not only the message
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Bắt đầu tại core/plugins/tokenexchangeaiac/plugin.go, ở deny(), sau đó đọc docs/token-exchange-aiac-plugin.md và kiểm tra các dạng phản hồi từ chối. Thêm lý do ổn định vào details cho mỗi trường hợp từ chối và ghi lại hợp đồng đó. Hoàn thành khi các đích bị vô hiệu hóa và chưa được cấp quyền hiển thị lý do bắt buộc trong cả phần thân 403 thông thường lẫn error.data.details của JSON-RPC.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
token-exchange-aiac answers two different refusals with the same 403 policy.forbidden:
audience_not_granted: Keycloak has a client for the destination, but the caller is not granted it.target_disabled: the destination's client is disabled, for example a quarantined service.
The reason is recorded in the session event (pctx.Record(... Reason: reason ...)), but the rejection the caller sees carries no Details: deny() in core/plugins/tokenexchangeaiac/plugin.go returns pipeline.DenyStatus(status, code, msg). Only the human-readable message tells them apart ("the destination's client is disabled" vs "this workload is not granted the destination's audience").
rossoctl/aiac's system harness must tell them apart: its quarantine test (test_failed_tool_outbound_call_denied) counts a refusal as "blocked by the quarantine" only for target_disabled. It matches the message text, a copy of the cortex string, which breaks if the message is reworded. Raised in the review of rossoctl/aiac#242.
Task
- Put the machine-stable reason in the rejection, for example
Details: {"reason": "target_disabled"}(andaudience_not_granted,exchange_failed,no_token,foreign_namespace), so it reaches the caller in the plain 403 body (details) and inerror.data.detailsof the JSON-RPC frame. - Document the field in
docs/token-exchange-aiac-plugin.mdas part of the contract.
Acceptance criteria
- A refusal of a disabled target carries
details.reason == "target_disabled"; a refusal of an ungranted target carriesdetails.reason == "audience_not_granted", in both rejection shapes. - The message text is no longer the only way to tell them apart.
Follow-up on the AIAC side: key target_disabled_refusal (k8s/authbridge-rejection.py) on the reason instead of the message.
- Ngôn ngữ chính
- Go
- Star
- 21
- Fork
- 43
- Merge trung bình
- 13 giờ 8 phút
- Pull request đã merge (30 ngày)
- 267
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 rossoctl/cortex
-
UI shows costs for all sessions even when drilled into a sessionCó thể đã có người làm @esnible đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
rossoctl/cortex#1116 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Maintainer thường phản hồi trong vòng 1 ngày
-
Maintainer thường phản hồi trong vòng 1 ngày
-
Cost/session layering: ledger snapshot logic in the HTTP layer; import edges point both waysĐang mở
Maintainer thường phản hồi trong vòng 1 ngày
-
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rossoctl/cortex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
schema-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
stefanhoth/paperless-ngx-cli#61 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: CodeAFĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
slavakurilyak/awesome-ai-agents#888 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement nav-pilot
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày