diff --git a/src/google/adk/cli/api_server.py b/src/google/adk/cli/api_server.py index 54708b28..1e4c504d 100644 --- a/src/google/adk/cli/api_server.py +++ b/src/google/adk/cli/api_server.py @@ -671,6 +671,15 @@ class ApiServer: instance returned by get_fast_api_app as this class exposes the agent runners and most other bits of state retained during the lifetime of the server. + Security: + The served endpoints are unauthenticated. Any client that can reach the + server can read and write sessions, memory, and artifacts and run agents + for any user or app. Run it only on a trusted network (for example bound + to localhost for local development) and do not expose it directly to + untrusted or public networks. Put it behind your own authentication and + authorization layer before serving multiple users or exposing it beyond + the local machine. + Attributes: agent_loader: An instance of BaseAgentLoader for loading agents. session_service: An instance of BaseSessionService for managing sessions. diff --git a/src/google/adk/cli/cli_tools_click.py b/src/google/adk/cli/cli_tools_click.py index fd10057c..7a9b6647 100644 --- a/src/google/adk/cli/cli_tools_click.py +++ b/src/google/adk/cli/cli_tools_click.py @@ -1961,6 +1961,10 @@ def cli_web( agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path pointing directly to a single agent folder. + This server is intended for local development. Its endpoints are + unauthenticated, so run it on a trusted network only and do not expose it to + untrusted or public networks. + Example: adk web --session_service_uri=[uri] --port=[port] path/to/agents_dir @@ -2102,6 +2106,10 @@ def cli_api_server( agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path pointing directly to a single agent folder. + This server's endpoints are unauthenticated. Run it on a trusted network + only, and put it behind your own authentication and authorization layer + before exposing it to untrusted or public networks or serving multiple users. + Example: adk api_server --session_service_uri=[uri] --port=[port] path/to/agents_dir diff --git a/src/google/adk/cli/dev_server.py b/src/google/adk/cli/dev_server.py index 2d01f60f..2237ecda 100644 --- a/src/google/adk/cli/dev_server.py +++ b/src/google/adk/cli/dev_server.py @@ -20,6 +20,12 @@ All dev-only endpoints (eval, debug, graph, test management) are added by DevSer Use this for local development with `adk web`. For production deployments, use api_server.py instead. + +Security: like ApiServer, every endpoint here is unauthenticated, and the +dev-only endpoints additionally read and write agent files on disk and run +evaluation and debugging code. This server is intended solely for local +development on a trusted machine. Never expose it to an untrusted or public +network, and never use it for a production or multi-user deployment. """ from __future__ import annotations @@ -185,6 +191,9 @@ class DevServer(ApiServer): Inherits all production endpoints from ApiServer and adds development-specific endpoints for evaluation, debugging, and developer UI features. + + Like ApiServer, all endpoints are unauthenticated. This server is intended + for local development only and must not be exposed to untrusted networks. """ _allow_special_agents: bool = True