Skip to content

Retry failed JWKS loads in provider worker - #559

Merged
maennchen merged 1 commit into
mainfrom
fix-jwks-backoff-retry
Oct 3, 2026
Merged

maennchen merged 1 commit into
mainfrom
fix-jwks-backoff-retry

Conversation

@maennchen

Copy link
Copy Markdown
Member

After a failed JWKS fetch, the backoff retry loaded the discovery document again. If jwks_uri did not change, the worker did not fetch the keys again, so get_jwks/1 stayed undefined after the endpoint recovered. A failed scheduled refresh of loaded keys had the same effect. The retry now repeats the load that failed. refresh_jwks_for_unknown_kid/2 also crashed with function_clause when no keys were loaded. It now loads the keys in that case. New tests cover both cases.

Fixes #552

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@maennchen
maennchen merged commit 06dd4c8 into main Oct 3, 2026
28 checks passed
@maennchen
maennchen deleted the fix-jwks-backoff-retry branch October 3, 2026 11:42
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.

Provider worker never retries a failed JWKS fetch while the discovery document is unchanged

1 participant