litellm/tests/test_litellm/proxy/management_endpoints
yucheng-berri 5637b3212e
feat(proxy): configurable response headers and login-page hint (#30792)
* feat(proxy): add configurable response headers middleware

Adds a small ASGI middleware that sets standard response headers
(X-Frame-Options, Content-Security-Policy frame-ancestors, X-Content-Type-Options)
on proxy and UI responses. Strict-Transport-Security is optional and gated
behind LITELLM_ENABLE_HSTS for HTTPS deployments. Values use setdefault so a
route that sets its own header is preserved.

* feat(proxy/ui): make login page credentials hint configurable

build_ui_login_form accepts a hide_default_credentials_hint parameter and
google_login reads LITELLM_HIDE_DEFAULT_CREDENTIALS_HINT (or general_settings)
so the legacy login page behaves consistently with the new UI. Also collapses
a duplicated branch and removes an unused variable and module-level constant.

* fix(proxy/ui): apply credentials hint flag on /fallback/login

The /fallback/login handler still rendered the default-credentials hint
regardless of LITELLM_HIDE_DEFAULT_CREDENTIALS_HINT. Collapse its duplicate
branch and forward the flag, matching google_login, so all login surfaces
behave consistently. Adds regression tests for /fallback/login and makes the
ui_sso test helper restore os.environ so env vars do not leak across tests.
2026-06-18 18:12:45 -07:00
..
policy_endpoints style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
scim Fix SCIM user lookup filters (#27308) 2026-05-06 11:58:47 -07:00
search_endpoints fix(proxy): self-heal startup/reload prisma reads on engine disconnect (#28803) 2026-06-10 20:16:58 +02:00
usage_endpoints fix(proxy): reject user_id=None on non-admin analytics endpoints (cross-tenant disclosure) 2026-04-30 23:54:01 +02:00
test_access_group_endpoints.py update test cases to match new behaviour. The earlier test cases assumed the cache stores a pydantic object 2026-04-28 21:08:46 +00:00
test_access_group_management.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_activity_tenant_scoping.py fix(proxy): guard agent activity owned-fallback against null user_id 2026-05-01 22:04:54 +00:00
test_budget_endpoints.py fix(budget): recompute budget_reset_at when budget_duration changes on /budget/update (#30555) 2026-06-16 14:12:39 -07:00
test_cache_settings_endpoints.py fix(proxy): self-heal startup/reload prisma reads on engine disconnect (#28803) 2026-06-10 20:16:58 +02:00
test_callback_management_endpoints.py fix(galileo): use ingest traces API and standard logging payload (#29651) 2026-06-05 09:03:17 -07:00
test_common_daily_activity.py chore: litellm oss 170626 (#30637) 2026-06-17 21:11:12 -07:00
test_common_utils.py chore: litellm oss 170626 (#30637) 2026-06-17 21:11:12 -07:00
test_compliance_endpoints.py Add compliance checker endpoints + UI panel (#21432) 2026-02-17 18:22:26 -08:00
test_config_override_endpoints.py fix(audit): label vault POST as updated when DB row exists 2026-05-01 02:44:47 +00:00
test_cost_tracking_settings.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_customer_budget.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_customer_endpoints.py chore(oss): litellm oss staging 150626 (#30463) 2026-06-16 12:06:41 -07:00
test_delete_callbacks_endpoint.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_delete_verification_tokens_failed.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_entraid_app_roles.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_internal_user_endpoints.py fix: tighten budget field validation and authorization checks (#27897) 2026-05-14 05:41:13 +00:00
test_key_management_endpoints.py chore: litellm oss staging (#30745) 2026-06-18 13:55:35 -07:00
test_mcp_management_endpoints.py fix(mcp): allow team access-group grants in OAuth authorize/token access check (#30041) 2026-06-09 14:19:11 -07:00
test_model_management_endpoints.py fix(team-management): delete a team's BYOK models when the team is deleted (#29977) 2026-06-08 16:55:35 -07:00
test_org_admin_team_access.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_organization_endpoints.py fix(team): also gate organization-scoped endpoints behind _verify_org_access 2026-04-29 22:51:59 +00:00
test_policy_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_project_org_authz.py fix(tests): use canonical litellm_enterprise import path (#27699) 2026-05-12 12:32:57 -07:00
test_router_settings_endpoints.py feat: routing groups ui 2026-05-04 18:09:14 -07:00
test_tag_management_endpoints.py Fix internal tag usage scoping (#27315) 2026-05-11 10:44:50 -07:00
test_team_callback_endpoints.py encrypt callback_vars in key/team metadata at rest (#27141) 2026-05-23 12:15:44 -07:00
test_team_default_params.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_team_endpoints.py chore: litellm oss 170626 (#30637) 2026-06-17 21:11:12 -07:00
test_team_model_alias_merge.py chore(oss): litellm oss staging 120626 (#30292) 2026-06-12 09:49:25 -07:00
test_tool_management_endpoints.py Fix tool management tests using wrong field name call_policy 2026-03-04 11:20:17 -03:00
test_ui_sso.py feat(proxy): configurable response headers and login-page hint (#30792) 2026-06-18 18:12:45 -07:00
test_workflow_management_endpoints.py feat(proxy): durable agent workflow run tracking via /v1/workflows/runs (#26793) 2026-04-29 17:12:18 -07:00