[Feat]: Add a PermissionDenied server error with HTTP 403 and gRPC PERMISSION_DENIED mappings
Maintainer thường phản hồi trong vòng 2 ngày
@Iwaniukooo11 đang làm issue này rồi.
Từ ngày 2/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Feature request
Please expose a server-side PermissionDeniedError (or equivalent generic authorization error) with consistent transport mappings. With a2a-sdk==1.3.0, a2a.utils.errors has no authorization-denial type and A2A_ERROR_MAPPING has no HTTP 403 / gRPC PERMISSION_DENIED mapping.
Why this is needed
An authenticated client can lack the action permission to list or cancel tasks even though the agent supports the operation and the task is still cancelable. Raising UnsupportedOperationError or TaskNotCancelableError misrepresents the failure and can cause a client to cache the wrong capability or lifecycle conclusion.
A2A v1.0.1 §3.3.2 requires authorization errors for insufficient permissions. It gives HTTP 403, gRPC PERMISSION_DENIED and a JSON-RPC custom error as examples. Resource hiding remains a separate concern: inaccessible or nonexistent task IDs should still be indistinguishable via TaskNotFound where appropriate.
Reproduction / API gap
import a2a.utils.errors as errors
assert not hasattr(errors, "PermissionDeniedError")
assert not any(mapping.http_code == 403 or mapping.grpc_status == "PERMISSION_DENIED"
for mapping in errors.A2A_ERROR_MAPPING.values())
This passes with 1.3.0. A handler wishing to deny an authenticated caller's ListTasks or CancelTask action cannot raise a built-in exception with the required authorization semantics.
Requested behavior
- A public server exception representing an action-policy denial.
- HTTP/REST 403 and gRPC PERMISSION_DENIED mappings.
- An SDK-owned JSON-RPC custom error mapping (rather than applications inventing conflicting numeric codes).
- Structured
google.rpc.ErrorInfowith a documented stable reason such as PERMISSION_DENIED, plus optional bounded missing-scope information. - Client-side reconstruction and transport regression tests.
- Documentation distinguishing action denial from resource existence hiding, unsupported operations, and noncancelable lifecycle states.
Our HTTP teaching lab now authorizes in identity middleware and returns HTTP 403 before dispatch, which works around the HTTP gap. A shared handler-level exception would make this practical across JSON-RPC, HTTP+JSON and gRPC without separate application mappings.
I searched for PermissionDenied, PERMISSION_DENIED, and authorization-error reports before filing; this request is scoped to the missing public server error/mappings in 1.3.0.
- Ngôn ngữ chính
- Python
- Star
- 2.2k
- Fork
- 528
- Merge trung bình
- 3 ngày 17 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 a2aproject/a2a-python
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameterCó thể đã có người làm @rohityan đã nhận 69 ngày trước. Đang mởcomponent: server status:awaiting response
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
a2aproject/a2a-python#1204 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: REST task/request id sanitizationCó thể đã có người làm @Linux2010 đã nhận 128 ngày trước. Đang mởmaintainers-only
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
a2aproject/a2a-python#805 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: CancelTaskRequest.metadata never reaches AgentExecutor.cancelCó thể đã có người làm @muscariello đã nhận hôm nay. Đang mởmaintainers-only
a2aproject/a2a-python#1415 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Feat]: Add a task-state-invariants agent skill for sibling-surface propagationCó thể đã có người làm @Linux2010 đã nhận hôm nay. Đang mởcomponent: tooling status:awaiting response
a2aproject/a2a-python#1413 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug]: taskId-only continuation still fails required contextId inference in SDK 1.3.0 (follow-up to #1206)Có thể đã có người làm @rohityan đã nhận 1 ngày trước. Đang mởcomponent: server status:awaiting response
a2aproject/a2a-python#1411 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của a2aproject/a2a-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/markitdown#2820 ·
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 66/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
yt-project/yt#5624 ·
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
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NousResearch/hermes-agent#148376 ·
Maintainer thường phản hồi trong vòng 1 ngày