bug: Stale Json Web Keys. #2463
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
compliance
No milestone
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
continuwuation/continuwuity#2463
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
Continuwuity remembers OIDC keys once on startup. Rotating the Json Web Keys (JWKs) can cause login failures. My continuwuity instance stopped logging in in November while it was working before.
Continuwuity does not log in after scheduled Rauthy Json Web Keys rotation, which causes users to not being able to log in. I expect it to log in, but instead it shows an error "Bad request" and "Identity server is misconfigured. Contact your homeserver's administrator.".
Steps to reproduce
To reproduce this problem install Rauthy v0.37.2, continuwuity 26.9.1 (
abf8f87) and prepare two accounts.Server name and version
Private server running continuwuity 26.9.1 (
abf8f87)Additional context
I suspect the reason is stale JWKs. In this case the following happen.
Continuwuity does not go back to the jwks_uri location to re-retrieve the keys when it sees an unfamiliar kid value, which causes failure to verify id token claims because signature verification failed. The user sees "Bad request" and "Identity server is misconfigured. Contact your homeserver's administrator.". I expect it to follow OpenID Connect Core 1.0 10.1.1. Rotation of Asymmetric Signing Keys, retrieve new keys and succeed login attempt.
Please provide the error that Continuwuity logs to the console when you try to log in. That will have more detail than the error presented to users.
Fixed by !2497, which has been merged to main.