-
Notifications
You must be signed in to change notification settings - Fork 192
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
Internal Server Error: JSON::JWK::Set::KidNotFound #64
Comments
I also ran into this issue today, going to revert to |
I think I found the problem:
|
#68 solves the problem, but we must reintroduce signature verification again later. |
Hi, I just run into this same issue while using |
No, this must be something else. Is there an error "KidNotFound"? |
yep, same stacktrace as the one posted up there.. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We solved this issue on our Gitlab instance by switching the ID token signature method to RS256 instead of HS256 in our OP configuration. It is normal for JWT signed with HS* to not have a |
As defined in https://tools.ietf.org/html/rfc7515#section-4.1.4, the `kid` (Key ID) parameter is optional and helps to disambiguate multiple keys. If there is only a single key and `kid` is not provided, then we can just return the only key present. Relates to omniauth/omniauth_openid_connect#64
I believe nov/json-jwt#92 is the proper fix for this issue. |
As defined in https://tools.ietf.org/html/rfc7515#section-4.1.4, the `kid` (Key ID) parameter is optional and helps to disambiguate multiple keys. If there is only a single key and `kid` is not provided, then we can just return the only key present. Relates to omniauth/omniauth_openid_connect#64
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If this happens, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
Got some feedback from the json-jwt maintainer, and this is another attempt at fixing this issue: #91 |
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If a missing `kid` exception is raised, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If a missing `kid` exception is raised, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If a missing `kid` exception is raised, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If a missing `kid` exception is raised, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
When a key ID (`kid`) is not included in the JWT, that means we don't know anything about which signing key to use. The json-jwt library expects the `kid` value to be present if a JWK Set is presented. If a missing `kid` exception is raised, we now iterate through each key to find one that works. Closes omniauth/omniauth_openid_connect#64
@stanhu Is the fix you provided for this issue in #91 or nov/json-jwt#92 expected to get merged & released? Both maintainers don't seem very willing nor active 😦 |
As defined in https://tools.ietf.org/html/rfc7515#section-4.1.4, the `kid` (Key ID) parameter is optional and helps to disambiguate multiple keys. If there is only a single key and `kid` is not provided, then we can just return the only key present. Relates to omniauth/omniauth_openid_connect#64
Currently, we are using GitLab version 13.1.3 which ships the omniauth_openid_connect gem in version
0.3.5
. In GitLab 13.1.0 the omniauth_openid_connect package was upgraded from0.3.3
to0.3.5
. (https://gitlab.com/gitlab-org/gitlab/-/merge_requests/34030)The previously working OpenID configuration now results in an Internal Server Error during the callback phase. Manually downgrading the package to the version 0.3.3 used in GitLab 13.1 fixes the issue temporarily for us.
Relevent stacktrace
OpenID configuration
I also experimented with other configuration options. Setting
discovery
tofalse
and specifying all information manually. I also tried to set the JSON web set keys manually as well https://github.com/m0n9oose/omniauth_openid_connect/blob/ef2942047c866993d8323115c419371d75f05a60/lib/omniauth/strategies/openid_connect.rb#L270-L273. Unfortunately, none of the measures changed anything.Possible fixes
I would be very happy if you could have a look into this issue!
For reference, this is the respective GitLab issue: https://gitlab.com/gitlab-org/gitlab/-/issues/225850
The text was updated successfully, but these errors were encountered: