A2A Java SDK 1.2 closes task-authorization gaps and changes migration paths
The Quarkus-backed Java implementation adds fail-closed checks and stream controls, but adopters must account for three breaking changes.
The A2A Java SDK 1.2.0.Final release tightens authorization around referenced tasks, adds controls for long-lived task streams and changes several APIs that agent-platform teams may already depend on. The project describes the SDK as the official Java implementation of the A2A Protocol, with Quarkus as its reference runtime and Quarkus applications across its examples.
What changed
The most consequential change is an authorization check on tasks named through referenceTaskIds. The release post says earlier versions populated those tasks in RequestContext without first checking whether the caller could read them. That allowed an unauthorized caller to probe for a task through streaming-message or task-subscription operations.
Version 1.2 applies read checks across JSON-RPC, gRPC and REST transports. Its in-memory task store now also fails closed when authorization is configured but no call context is available, matching the behavior of the JPA-backed store. A new TaskAuthorizationProvider.checkReadAccess() helper exposes that policy for custom stores, while the authorization decorator can now be wired outside CDI runtimes such as Spring.
The release also introduces TaskStreamLifecycleHook. Applications can observe subscriptions, disconnections and processed events, then close all streams for a task. The project points to timeouts, subscriber limits and cleanup after clients disconnect as intended uses. The hook is wired through the in-memory, main event-bus and replicated queue-manager paths.
Who is affected
Teams upgrading from 1.1.0.Final need to treat this as more than a dependency refresh. The project flags three breaking changes. The request-handler authorization method is renamed and gains call-context and operation parameters; DefaultRequestHandler.create() gives way to a builder; and read authorization is enforced when referenced tasks are resolved.
Custom task stores, non-CDI integrations and applications that assumed referenced tasks would be readable without an explicit authorization decision deserve particular scrutiny. The release also changes default behavior by populating referenced tasks for CDI users unless a2a.request-context.populate-referred-tasks=false is set.
What to do
Before updating the BOM to 1.2.0.Final, review the migration section and test task lookup through every transport your agent exposes. Confirm that custom authorization providers receive a usable call context and that custom stores deny access when they cannot make a decision.
Applications with streaming clients should also test subscription teardown and task completion under load before adopting the lifecycle hook. The release includes fixes for streaming history length, task and context identifiers in emitted messages, and a Vert.x HTTP-client race, so regression tests should cover both access control and event delivery rather than authorization alone.
sources
- A2A Java SDK 1.2.0.Final releasedquarkus.io
comments · 0