Skip to content
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

Gitlab jwk verification failure #8

Open
mestrade opened this issue Aug 19, 2021 · 0 comments · May be fixed by #9
Open

Gitlab jwk verification failure #8

mestrade opened this issue Aug 19, 2021 · 0 comments · May be fixed by #9

Comments

@mestrade
Copy link

In:

/* // there is no alg...

The code using "alg" in the jwk parsing is disabled. The alg is determined with the len of the "n" modulus found in the jwk.

Using the modulus len with Google/Microsoft/Github oauth/oidc endpoints is working well.

Gitlab is actually providing "alg" as "RS256" but the provided "n" modulus len is 512, which cause rsa.Verify to fail.
By using the "alg" value, the verification is done correctly.

RSA private key representation
gitlab keys from oidc configuration url

@mestrade mestrade linked a pull request Aug 19, 2021 that will close this issue
@mestrade mestrade linked a pull request Aug 19, 2021 that will close this issue
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 a pull request may close this issue.

1 participant