-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 fix: use OpenID token signature algo as discovered from the server. #5348
base: main
Are you sure you want to change the base?
🐛 fix: use OpenID token signature algo as discovered from the server. #5348
Conversation
Can we make this an optional assignment? Would require an update to the docs too: https://github.com/LibreChat-AI/librechat.ai |
The existing documentation does cover everything properly, this is something the user might configure in the Authentication server, for which the default is RS256 algorithm. This change only covers other algorithms, that are discovered seamlessly without user interaction, I hope there should be no need to include this in docs, removing documentation action items. If this commit is merged, no need to update Docs. |
I will try to see why the checks fails and prefer merging this, will update docs as a last resort. |
My main concern is that the object being passed to There might be a default value in place but this would be the best way to avoid potential side effects |
Checked the upstream package But v6 does fixes this and uses the one from the server, but keeps 'ES256' as default (this commit still defaults 'RS256') I'll agree with you, it is just one of the five other properties this algorithm is required for, I'll close this PR, best way to support other algorithms is to update the Updating the docs can be optional, since most Auth servers still default to RS256 and the error messages are now displayed after #5337, I'll see if I could update that package. |
Just keeping this as a draft in case if required, the error was just happening due to the missing property. Since v6 of I think assigning this property in If more users try to use ES256, consider using a different package to handle openid-strategy if this patch feels uneasy, this can be used. |
Summary
Currently if an Authentication server uses a different Token Signing Algorithm other than the default 'RS256', it will fail.
This change sets the OpenID Token Algorithm to the one advertised by the Authentication server.
id_token_signed_response_alg
has to be set at the time of the Client object creation, it doesn't take account of that property even if set before or after the creation of the Client object.All authentication servers advertise their token signing algorithm in
id_token_signing_alg_values_supported
as an array with one element (as far as I can check)I tried to see if updating the
openid-client
package will resolve the issue without this patch fix, but it seems that package has fundamentally changed a lot and requires a lot of changes to use that.This patch fix will last until the next re-write of openid-client strategy.
Fixes #5358.
Change Type
Please delete any irrelevant options.
Testing
Test Configuration:
Checklist
Please delete any irrelevant options.