Registry Mirror
Skip to content

Conversation

@xixi-box

Copy link
Copy Markdown

Fixes #3787

Summary

A2A returned permission errors for some inaccessible tasks and contexts, which let callers distinguish them from missing resources. The shared Session resolver now returns TASK_NOT_FOUND when a Session is unreadable or belongs to another Agent. A2A 1.0.1 error handling

When an operation is denied, the resolver checks whether the caller can read the Session on the selected Agent before returning a permission error. This preserves the permission response when a read-only share recipient tries to mutate a conversation they can read. A grant for the requested operation still authorizes that operation directly.

Fixes #3787

Testing

Tests: /bin/sh -c 'cd go && go test -race -count=1 -v ./core/internal/a2agateway ./core/internal/grpcserver -run '"'"'^(TestGatewayMissingConversationAcrossTransports|TestHTTPAgentURLIsAuthoritative|TestGatewayReadOnlySharesAcrossTransports|TestRuntimeTaskStoreThroughGRPC)$'"'"''.
Result: cd go && go test -race -count=1 ./core/internal/service/session ./core/internal/a2agateway: both packages passed with the original tests.
Result: Regression command on unchanged implementation with the regression assertions: exited 1 with the expected permission error in both transport tests and the PostgreSQL-backed cross-Agent GetTask case. See OSSCOUT_BASE.log.
Result: Regression command on patched implementation: exited 0 for both the A2A gateway and PostgreSQL-backed gRPC integration suite. See OSSCOUT_PATCHED.log.
Result: cd go && go test -race -count=1 -v ./core/internal/grpcserver -run '^(TestA2AShareAuthorizationIsDelegatedToGateway|TestActorAndUserPoliciesOnSharedEndpoint|TestAuthenticationUnaryInterceptor)$': passed.
Result: The first patched run of both affected packages passed Session but failed the stale permission-denied expectation in TestHTTPActorA2AUsesSessionAuthorization. The denied actor cannot read that Session, so its expected response now follows the not-found contract.
Result: cd go && go test -race -count=1 ./core/internal/service/session ./core/internal/a2agateway: final run passed both full packages (56.197s and 11.800s).
Result: GOFLAGS=-race make -C go lint LINT_ARGS='./core/internal/service/session ./core/internal/a2agateway ./core/internal/grpcserver': passed with 0 issues on the final diff.
Regression coverage: go/core/internal/grpcserver/task_store_test.go.

Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
@xixi-box
xixi-box requested a review from a team as a code owner November 24, 2026 13:57
@github-actions github-actions Bot added the bug Something isn't working label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] A2A lookups by task or context ID reveal whether another user's resource exists

1 participant