You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(slm): SSO OAuth-state uses sync get_redis_client() with await → fails against real Redis #10284
autobot-slm-backend/user_management/services/sso_service.py (_generate_oauth_state ~line 229, _validate_oauth_state ~line 237, and the SAML relay-state store) call redis = get_redis_client() (default async_client=False → syncredis.Redis) and then await redis.set(...) / await redis.getdel(...). Per autobot_shared/redis_client.py:197 the sync client's methods are NOT awaitable → TypeError against a real Redis. Unit tests pass only because they inject an AsyncMock (false green).
Impact: OAuth/SAML state storage (CSRF protection) is latently broken at runtime — likely unexercised because the enterprise SSO tier is still being built. This also affects the PKCE state code merged in #10254 (#10150), which kept the same await redis.set pattern.
Fix: use the canonical async form redis = await get_redis_client(async_client=True) in these async methods (see redis_client.py docstring lines 236-239). Add a test that exercises a real async client (fakeredis-aioredis), not AsyncMock. A2's #10151 fixes its own new denylist code this way; this issue tracks the pre-existing sso_service.py + PKCE occurrences.
Activity
fix(auth): async redis for SSO/PKCE OAuth-state + reconcile RBAC seed…
github-actions commentedon Jun 22, 2026
PR #10455 (merged to
Dev_new_gui) references this issue with a close keyword.If this issue is fully resolved, close it manually. If work remains, no action is needed.
mrveiss commentedon Jun 22, 2026
Merged to
Dev_new_gui(c1a6c133c). SSO/PKCE/SAML OAuth-state now uses await get_async_redis_client() (true async client) instead of the sync client; tests exercise the async path. 55/55 SSO tests pass. Batch #10440.