What
Found while implementing #16374. #16374's nginx auth_request gate on /autobot-api/ targets GET /api/auth/me (autobot-slm-backend/api/auth.py, get_current_user_info) as its session-verify endpoint: 2xx for a valid SLM session, 401/403 otherwise (services/auth.py's security = HTTPBearer() and get_current_user).
get_current_user itself is exercised indirectly by other tests (autobot-slm-backend/tests/api/test_slm_endpoints_12515.py, test_drift_resolve.py, test_local_admin_socket_15728.py, test_step_up_auth.py), but nothing tests the /api/auth/me route directly — valid-session-gives-2xx / missing-or-invalid-gives-401 for that specific route has no test today. Not added in #16374 itself: this repo's SLM API tests bootstrap a heavy stub environment per file (see test_auth_logout.py's module-level sys.modules dance) rather than a real TestClient, and building that correctly for a new route is separate scope from the nginx template change.
Why it matters now
This route is no longer just a UI convenience call — it is the fail-closed gate protecting every /autobot-api/* request from carrying backend-admin credentials. A regression in get_current_user_info or its get_current_user dependency (e.g. always returning 200, or crashing in a way nginx's auth_request treats as pass-through) would silently reopen #16374.
Acceptance criteria
What
Found while implementing #16374. #16374's nginx
auth_requestgate on/autobot-api/targetsGET /api/auth/me(autobot-slm-backend/api/auth.py,get_current_user_info) as its session-verify endpoint: 2xx for a valid SLM session, 401/403 otherwise (services/auth.py'ssecurity = HTTPBearer()andget_current_user).get_current_useritself is exercised indirectly by other tests (autobot-slm-backend/tests/api/test_slm_endpoints_12515.py,test_drift_resolve.py,test_local_admin_socket_15728.py,test_step_up_auth.py), but nothing tests the/api/auth/meroute directly — valid-session-gives-2xx / missing-or-invalid-gives-401 for that specific route has no test today. Not added in #16374 itself: this repo's SLM API tests bootstrap a heavy stub environment per file (seetest_auth_logout.py's module-level sys.modules dance) rather than a realTestClient, and building that correctly for a new route is separate scope from the nginx template change.Why it matters now
This route is no longer just a UI convenience call — it is the fail-closed gate protecting every
/autobot-api/*request from carrying backend-admin credentials. A regression inget_current_user_infoor itsget_current_userdependency (e.g. always returning 200, or crashing in a way nginx'sauth_requesttreats as pass-through) would silently reopen #16374.Acceptance criteria
GET /api/auth/mereturns 2xx for a valid session token (via the realget_current_userdependency, not a mock of the route itself).HTTPBearer's default) for a missing or invalid token.