[Feat]: Add a PermissionDenied server error with HTTP 403 and gRPC PERMISSION_DENIED mappings
Les mainteneurs répondent en général sous 2 jours
@Iwaniukooo11 y travaille déjà.
Depuis le 2/11/2026.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
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.
- Langage dominant
- Python
- Étoiles
- 2.2k
- Forks
- 528
- Merge moyen
- 3 j 17 h
- PR mergées (30 j)
- 43
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de a2aproject/a2a-python
-
[Bug]: `A2A-Version` validation ignores minor versions and the query parameterPeut-être pris @rohityan l’a pris il y a 69 jours. Ouvertecomponent: server status:awaiting response
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
a2aproject/a2a-python#1204 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug]: REST task/request id sanitizationPeut-être pris @Linux2010 l’a pris il y a 128 jours. Ouvertemaintainers-only
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
a2aproject/a2a-python#805 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug]: CancelTaskRequest.metadata never reaches AgentExecutor.cancelPeut-être pris @muscariello l’a pris aujourd’hui. Ouvertemaintainers-only
a2aproject/a2a-python#1415 · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Feat]: Add a task-state-invariants agent skill for sibling-surface propagationPeut-être pris @Linux2010 l’a pris aujourd’hui. Ouvertecomponent: tooling status:awaiting response
a2aproject/a2a-python#1413 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
[Bug]: taskId-only continuation still fails required contextId inference in SDK 1.3.0 (follow-up to #1206)Peut-être pris @rohityan l’a pris il y a 1 jour. Ouvertecomponent: server status:awaiting response
a2aproject/a2a-python#1411 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de a2aproject/a2a-python
Issues similaires
-
cost:cheap practicality:seen-in-the-wild severity:medium
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
Les mainteneurs répondent en général sous 1 jour
-
area:security effort:S priority:P2 provider:local-libvirt status:ready type:docs
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
randomparity/kdive#3495 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
microsoft/markitdown#2820 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours