[Feat]: Add a PermissionDenied server error with HTTP 403 and gRPC PERMISSION_DENIED mappings
メンテナーはふだん 2 日以内に返信
@Iwaniukooo11 がすでに取り組んでいます。
2026年11月2日 から。
評価
この issue はまだ評価されていません。
説明
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.
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 528
- 平均マージ
- 3日 17時間
- マージ済み PR(30日)
- 43
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
a2aproject/a2a-python のほかの issue
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameter対応中かも @rohityan が 69 日前に担当しました。 オープンcomponent: server status:awaiting response
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
a2aproject/a2a-python#1204 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: REST task/request id sanitization対応中かも @Linux2010 が 128 日前に担当しました。 オープンmaintainers-only
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
a2aproject/a2a-python#805 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: CancelTaskRequest.metadata never reaches AgentExecutor.cancel対応中かも @muscariello が今日担当しました。 オープンmaintainers-only
a2aproject/a2a-python#1415 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Feat]: Add a task-state-invariants agent skill for sibling-surface propagation対応中かも @Linux2010 が今日担当しました。 オープンcomponent: tooling status:awaiting response
a2aproject/a2a-python#1413 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
[Bug]: taskId-only continuation still fails required contextId inference in SDK 1.3.0 (follow-up to #1206)対応中かも @rohityan が 1 日前に担当しました。 オープンcomponent: server status:awaiting response
a2aproject/a2a-python#1411 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
a2aproject/a2a-python の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
yt-project/yt#5624 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NousResearch/hermes-agent#148376 ·
メンテナーはふだん 1 日以内に返信
-
Analysis
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
SACGF/variantgrid#2615 ·
メンテナーはふだん 1 日以内に返信