Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion boms/extras/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion boms/reference/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion boms/sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion boms/test-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion client/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/transport/grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-client-transport-grpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/transport/jsonrpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-client-transport-jsonrpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/transport/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-client-transport-rest</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion client/transport/spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-client-transport-spi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
</parent>
<artifactId>a2a-java-sdk-common</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/client/base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/client/transport/grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-client-transport-grpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/client/transport/jsonrpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-client-transport-jsonrpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/client/transport/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-client-transport-rest</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/client/transport/spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-client-transport-spi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
</parent>

<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/reference/grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/reference/jsonrpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-reference-jsonrpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/reference/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-reference-rest</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/server-conversion/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-server-conversion</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/spec-grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-spec-grpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/spec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-spec</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/tests/server-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/transport/grpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-transport-grpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/transport/jsonrpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-transport-jsonrpc</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion compat-0.3/transport/rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.a2aproject.sdk</groupId>
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
<version>1.3.0.Final</version>
<version>1.3.1.Final-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>a2a-java-sdk-compat-0.3-transport-rest</artifactId>
Expand Down
65 changes: 65 additions & 0 deletions docs/content/1_3_0_Final/authorization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: Task Authorization
description: Per-user access control for A2A tasks — ownership, read/write checks, and user identity across transports.
layout: page
---

# Task Authorization

> **Security note:** By default, all task operations are **denied** when no `TaskAuthorizationProvider` is configured (fail-closed). This ensures multi-user deployments cannot accidentally expose tasks. For single-user deployments or testing where authorization is not needed, set `a2a.authorization.required=false` in your configuration, or call `.authorizationRequired(false)` on the builder. Production deployments should always configure a provider with a fail-closed ownership policy (deny access when ownership is unknown).

## Implementing TaskAuthorizationProvider

Implement `TaskAuthorizationProvider` to control per-user access:

```java
@ApplicationScoped
public class MyTaskAuthorizationProvider implements TaskAuthorizationProvider {

@Override
public boolean checkRead(ServerCallContext context, String taskId, TaskOperation op) {
return isOwner(context.getUser(), taskId);
}

@Override
public boolean checkWrite(ServerCallContext context, String taskId, TaskOperation op) {
return isOwner(context.getUser(), taskId);
}

@Override
public boolean checkCreate(ServerCallContext context, TaskOperation op) {
return context.getUser() != null && context.getUser().isAuthenticated();
}

@Override
public boolean isTaskRecorded(String taskId) {
return ownershipStore.containsKey(taskId);
}

@Override
public void recordOwnership(ServerCallContext context, String taskId, TaskOperation op) {
if (context.getUser() != null) {
ownershipStore.put(taskId, context.getUser().getUsername());
}
}
}
```

The SDK discovers the bean via CDI automatically — no additional wiring needed. Authorization is also enforced when using `DefaultRequestHandler.builder()` directly — pass the provider via `.authorizationProvider(provider)`.

## User Identity in ServerCallContext

Authorization decisions rely on `context.getUser()` returning the authenticated user. How the user is populated depends on the transport:

- **JSON-RPC and REST**: The Quarkus route handler extracts the user from the Vert.x routing context (`rc.user()`) and sets it on `ServerCallContext` directly.
- **gRPC**: The reference server includes a `QuarkusCallContextFactory` CDI bean that injects the Quarkus `SecurityIdentity` and maps it to the `ServerCallContext` `User`. This happens automatically when using the reference gRPC module. If you provide your own `CallContextFactory`, you are responsible for populating the user.

## Authorization Checks

| Operation | Authorization check |
|-----------|---------------------|
| `getTask`, `subscribeToTask`, `getTaskPushNotificationConfig`, `listTaskPushNotificationConfigs` | `checkRead` |
| `cancelTask`, `createTaskPushNotificationConfig`, `deleteTaskPushNotificationConfig` | `checkWrite` |
| `messageSend` / `messageSendStream` (existing task) | `checkWrite` |
| `messageSend` / `messageSendStream` (new task) | `checkCreate`, then `recordOwnership` |
| `listTasks` | `checkRead` per task |
Loading
Loading