Closed AdriDevelopsThings closed 4 months ago
The algorithms should already be detected through the id_token_signing_alg_values_supported key in discovery.
https://github.com/coreos/go-oidc/blob/22dfdcabd450013b4d51ac15b6423f529d957e9f/oidc/oidc.go#L138 https://github.com/coreos/go-oidc/blob/22dfdcabd450013b4d51ac15b6423f529d957e9f/oidc/oidc.go#L242-L255 https://github.com/coreos/go-oidc/blob/22dfdcabd450013b4d51ac15b6423f529d957e9f/oidc/verify.go#L138-L144
What provider are you attempting to use this with? Do you have their discovery doc?
I'm using https://kanidm.github.io/. You can take a look to my openid configuration here.
Thanks! I was able to reproduce #430
Will get a fix in a sec
Actually, there was a bug in my test. With an e2e program, I'm not able to reproduce. The program appears to be correctly reading the ES256 algorithm
Thanks for your help but I found the problem: I was just using an old version of traefik-forward-auth
. The current version works for me.
I'm trying to verify a oidc token but I get the following error:
id token signed with unsupported algorithm, expected [\"RS256\"] got \"ES256\"
. The openid-configurations keyid_token_signing_alg_values_supported
is["ES256"]
. The library should automatically recognize the algorithm.go-oicd
version: v2.2.1Context: I'm using
traefik-forward-auth
what is using this library. They verify the token here: https://github.com/thomseddon/traefik-forward-auth/blob/master/internal/provider/oidc.go#L88. I'm not sure if the bug is intraefik-forward-auth
or ingo-oidc
but I guess you can see the problem faster.I already found this issue but
traefik-forward-auth
usesVerifier
instead ofNewVerifier
. There is someone attraefik-forward-auth
who has the same problem than me (https://github.com/thomseddon/traefik-forward-auth/issues/358) but the supported algorithms should be recognized by this library automatically instead of adding them manually I guess.