Skip to content

fix(KAAP-2297): retry federation auth redirects, surface retryable session errors - #71

Open
mridulgain wants to merge 1 commit into
masterfrom
private/master/mg/retry-on-failure
Open

fix(KAAP-2297): retry federation auth redirects, surface retryable session errors#71
mridulgain wants to merge 1 commit into
masterfrom
private/master/mg/retry-on-failure

Conversation

@mridulgain

@mridulgain mridulgain commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Keystone's federation auth endpoint intermittently returns a 302 redirect instead of a token, which the keystonefed connector today surfaces as an opaque 500.

Most real occurrences of this redirect resolve transparently within the retry window, so users no longer hit an error page at all for the common case. When it does exhaust retries, the message tells the user to just log in again instead of looking like a server failure.

Test plan

  • unit tests
  • end-to-end automation
  • e2e local: local Dex build hitting the live federation endpoint with a stale session cookie retried 3x then returned 401 with the new message;
  • e2e local: the same flow with a freshly-valid session cookie completed the login successfully with no retries triggered.

🤖 Generated with Claude Code

…sion errors

The keystonefed connector's federation auth call intermittently gets a
302 redirect instead of a token (KAAP-2297), which today surfaces as an
opaque 500. Add a bounded retry (3 attempts, 150ms apart) since the
redirect has so far only reproduced as a transient session-lookup miss,
and classify a still-redirecting response as a distinct connector.RetryableError
so the server renders 401 with an actionable message instead of a
generic "Failed to authenticate" 500.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mridulgain mridulgain changed the title fix(keystone): retry federation auth redirects, surface retryable session errors fix(KAAP-2297): retry federation auth redirects, surface retryable session errors Aug 12, 2026
@mridulgain mridulgain self-assigned this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant