File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 2020
2121Use this for local development with `adk web`.
2222For 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
2531from __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
You can’t perform that action at this time.
0 commit comments