Closed tobiashuste closed 3 years ago
I also ran into this issue today, going to revert to 0.3.3
for now
I think I found the problem:
::OpenIDConnect::ResponseObject::IdToken.decode(id_token, public_key)
public_key
is an jwt encoded array of dicts, where each dict represents one key containing a key id. id_token
is also an array of dicts. There must be the key id kid
named in the id_token
.
Hi,
I just run into this same issue while using 0.3.3
...
Does that makes sense to you ? Could it be not related to this issue ?
I have pretty much the same stacktrace as @tobiashuste
Hi,
I just run into this same issue while using
0.3.3
... Does that makes sense to you ? Could it be not related to this issue ? I have pretty much the same stacktrace as @tobiashuste
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 kid
because they are unambiguously signed by the client secret in the context of OpenID Connect. The lack of kid
should not be a fatal error.
I believe https://github.com/nov/json-jwt/pull/92 is the proper fix for this issue.
Got some feedback from the json-jwt maintainer, and this is another attempt at fixing this issue: https://github.com/m0n9oose/omniauth_openid_connect/pull/91
@stanhu Is the fix you provided for this issue in https://github.com/omniauth/omniauth_openid_connect/pull/91 or https://github.com/nov/json-jwt/pull/92 expected to get merged & released? Both maintainers don't seem very willing nor active 😦 Should we switch to the Gitlab fork? In case of the latter, is there any Omniauth 2.x support planned for that fork?
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