litellm/tests/litellm/proxy
ryan-crabbe-berri 78addb230b
fix(proxy): deny agent access when key and team grants resolve to nothing (#36221)
* fix(proxy): deny when agent grants resolve to nothing

`get_allowed_agents` returned a plain list where the empty value meant both
"this caller was never restricted" and "this caller's grants resolved to
nothing". Downstream read either as allow-all, so a key restricted to one
agent inside a team restricted to another reached every agent on the proxy,
and an access group that resolved to no agents did the same.

Replace it with `resolve_agent_access`, returning a tagged
UnrestrictedAgentAccess | RestrictedAgentAccess. Only a caller with no grant
anywhere is unrestricted; an empty restricted set denies. Access group lookup
failures now propagate to the key/team resolvers so a DB error still fails
open exactly as before, while a group that genuinely resolves to nothing
denies.

* style(proxy): drop redundant comments from the agent access match
2026-08-07 20:44:11 +00:00
..
_experimental/mcp_server [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
agent_endpoints fix(proxy): deny agent access when key and team grants resolve to nothing (#36221) 2026-08-07 20:44:11 +00:00
common_utils refactor(rbac): narrow org-admin restriction to key generation only 2026-04-24 19:36:31 -07:00
management_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vector_store_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_claude_code_marketplace.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_init_litellm_callbacks.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_prisma_engine_watchdog.py chore: litellm oss staging (#30745) 2026-06-18 13:55:35 -07:00