REST transport ignores interceptor changes to URL-bound request fields
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
Start in RestTransport.getTask, where the protobuf builder is intercepted but the URL is built from taskQueryParams instead of the intercepted payload. Run the JUnit HTTP-server regression, which expects GET /tasks/changed and currently gets /tasks/original. Then check the other operations that put IDs or filters into the URL. Done means the URL follows the post-interceptor payload for GetTask and the other affected operations, with the regression passing.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What happened?
The ClientCallInterceptor.intercept contract permits returning a modified payload, but the HTTP+JSON RestTransport builds resource paths and query strings from the original method arguments rather than the post-interceptor payload. An interceptor can therefore change the task ID in the payload and still send the request to the original task.
On main 897835ef664fb5c9fc4e1f5388e88a49c93e743c, a GetTask interceptor like the following receives the protobuf request builder:
@Override
public PayloadAndHeaders intercept(String method, Object payload,
Map<String, String> headers, AgentCard card, ClientCallContext context) {
((org.a2aproject.sdk.grpc.GetTaskRequest.Builder) payload).setId("changed");
return new PayloadAndHeaders(payload, headers);
}
Call getTask(new TaskQueryParams("original"), null) with this interceptor and capture the request using a local HTTP server. Expected: GET /tasks/changed. Actual: GET /tasks/original, despite the interceptor returning the modified builder. A JUnit HTTP-server regression reproduces this as expected: </tasks/changed> but was: </tasks/original>.
RestTransport.getTask creates and intercepts a protobuf builder, but constructs the URL using taskQueryParams. Other operations that encode IDs or filters into their URL also appear to construct those from the original arguments; each should be checked rather than assuming only GetTask is affected. This can matter for interceptors that rewrite a target or apply a filter, not just logging.
For context, #1327 adds fields to the GetTask payload visible to interceptors but does not make modified fields drive the URL. I have not checked every operation's replacement-payload semantics; this report's demonstrated case is a mutation of the supplied builder.
Code of Conduct
- I agree to follow this project's Code of Conduct
- Langage dominant
- Java
- Étoiles
- 514
- Forks
- 200
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 53
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-java
-
Document 1.x is the actively supported stream, and not 0.3.xPeut-être pris @Linux2010 l’a pris il y a 2 jours. Ouverte
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
a2aproject/a2a-java#1321 ·
Les mainteneurs répondent en général sous 1 jour
-
HTTP+JSON CancelTask returns 409 Conflict instead of 400 Bad Request for TaskNotCancelableErrorPeut-être à nouveau libre @ravismash l’a pris il y a 9 jours, et aucune pull request n’est ouverte. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
a2aproject/a2a-java#1298 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
fix: handle blank push notification config id consistently across transportsPeut-être pris @prachisinghal-1 l’a pris il y a 23 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
a2aproject/a2a-java#1012 · 2 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
a2aproject/a2a-java#464 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Create a sample that demonstrates how to use a shared contextId across multiple tasksPeut-être à nouveau libre @tanish111 l’a pris il y a 390 jours, et aucune pull request n’est ouverte. Ouvertesample
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
a2aproject/a2a-java#375 · 5 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de a2aproject/a2a-java
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/skywalking#14239 ·
Les mainteneurs répondent en général sous 1 jour
-
Re-executed query with IN condition on an index column returns deleted rows (stale IndexCursor)Peut-être pris @dbusche l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
h2database/h2database#4580 ·
Les mainteneurs répondent en général sous 1 jour
-
vips-drift
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Stirling-Tools/JPDFium#300 ·
Les mainteneurs répondent en général sous 1 jour
-
hermes-queue
Difficulté 1/5 1-3 heures Accessibilité débutants 85/100
chrisalunlloyd2-sudo/mindpalace#403 ·
Les mainteneurs répondent en général sous 1 jour
-
Guidelines: document how to build a use case against a local, unpublished Flow/browserless-test changePeut-être pris @totally-not-ai l’a pris aujourd’hui. Ouverte
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
vaadin/use-cases#452 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour