mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-02 20:51:20 +02:00
* Propagate Microsoft Graph errors during Entra group overage When a session hit AAD group overage, addGraphGroupsToSession logged a failed Graph request and returned nil, so EnrichSession's error handling never ran and the session kept the overage placeholder instead of the real groups. Return the error like the rest of the file does, and add a regression test using the existing 401 Graph mock. Signed-off-by: Ishan Shaurya Jaiswal <19599684+no-hup@users.noreply.github.com> * Tighten the Graph-error test and wrap the error, add a changelog entry Wrap the Graph error with %w so callers can errors.Is through EnrichSession. Pin the test to the Graph path with ErrorContains and assert the session's groups are left untouched after the failed call, so the test fails if the fix regresses rather than on any error. Add the behaviour change to the changelog since a Graph outage during overage now fails the login instead of proceeding with the overage placeholder. Signed-off-by: Ishan Shaurya Jaiswal <19599684+no-hup@users.noreply.github.com> --------- Signed-off-by: Ishan Shaurya Jaiswal <19599684+no-hup@users.noreply.github.com> Co-authored-by: Ishan Shaurya Jaiswal <19599684+no-hup@users.noreply.github.com>