diff --git a/python/samples/04-hosting/a2a/README.md b/python/samples/04-hosting/a2a/README.md index 803bab3f9e5..c187e55b61d 100644 --- a/python/samples/04-hosting/a2a/README.md +++ b/python/samples/04-hosting/a2a/README.md @@ -79,3 +79,16 @@ cd python/samples/02-agents/a2a $env:A2A_AGENT_HOST = "http://localhost:5001/" uv run python agent_with_a2a.py ``` + +## Security considerations for multi-tenant hosting + +The default `a2a-sdk` task/push-config stores scope ownership by `user_name` only. **Any host that mounts tenant-bearing routes must pass a tenant-aware `owner_resolver`** to the stores, e.g.: + +```python +from a2a.server.tasks import InMemoryTaskStore + +def resolve_tenant_user_scope(context): + # Derive tenant + user identity from your host's auth/session context. + return f"{context.tenant}:{context.user.user_name}" +task_store = InMemoryTaskStore(owner_resolver=resolve_tenant_user_scope) +```