Skip to content

Commit 76c64ef

Browse files
GWealecopybara-github
authored andcommitted
docs: note the adk web/api servers are unauthenticated and local-only
Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 956679982
1 parent a5b5b46 commit 76c64ef

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/google/adk/cli/api_server.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,15 @@ class ApiServer:
671671
instance returned by get_fast_api_app as this class exposes the agent runners
672672
and most other bits of state retained during the lifetime of the server.
673673
674+
Security:
675+
The served endpoints are unauthenticated. Any client that can reach the
676+
server can read and write sessions, memory, and artifacts and run agents
677+
for any user or app. Run it only on a trusted network (for example bound
678+
to localhost for local development) and do not expose it directly to
679+
untrusted or public networks. Put it behind your own authentication and
680+
authorization layer before serving multiple users or exposing it beyond
681+
the local machine.
682+
674683
Attributes:
675684
agent_loader: An instance of BaseAgentLoader for loading agents.
676685
session_service: An instance of BaseSessionService for managing sessions.

src/google/adk/cli/cli_tools_click.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1961,6 +1961,10 @@ def cli_web(
19611961
agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path
19621962
pointing directly to a single agent folder.
19631963
1964+
This server is intended for local development. Its endpoints are
1965+
unauthenticated, so run it on a trusted network only and do not expose it to
1966+
untrusted or public networks.
1967+
19641968
Example:
19651969
19661970
adk web --session_service_uri=[uri] --port=[port] path/to/agents_dir
@@ -2102,6 +2106,10 @@ def cli_api_server(
21022106
agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path
21032107
pointing directly to a single agent folder.
21042108
2109+
This server's endpoints are unauthenticated. Run it on a trusted network
2110+
only, and put it behind your own authentication and authorization layer
2111+
before exposing it to untrusted or public networks or serving multiple users.
2112+
21052113
Example:
21062114
21072115
adk api_server --session_service_uri=[uri] --port=[port] path/to/agents_dir

src/google/adk/cli/dev_server.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
2121
Use this for local development with `adk web`.
2222
For production deployments, use api_server.py instead.
23+
24+
Security: like ApiServer, every endpoint here is unauthenticated, and the
25+
dev-only endpoints additionally read and write agent files on disk and run
26+
evaluation and debugging code. This server is intended solely for local
27+
development on a trusted machine. Never expose it to an untrusted or public
28+
network, and never use it for a production or multi-user deployment.
2329
"""
2430

2531
from __future__ import annotations
@@ -185,6 +191,9 @@ class DevServer(ApiServer):
185191
186192
Inherits all production endpoints from ApiServer and adds development-specific
187193
endpoints for evaluation, debugging, and developer UI features.
194+
195+
Like ApiServer, all endpoints are unauthenticated. This server is intended
196+
for local development only and must not be exposed to untrusted networks.
188197
"""
189198

190199
_allow_special_agents: bool = True

0 commit comments

Comments
 (0)