Skip to content

Commit

Permalink
openid-connect: fix use_jwks breaking authentication header
Browse files Browse the repository at this point in the history
I you use jwks instead of explicitly setting the public key, requests with a proper `Authorization: Bearer` header would still get the `302 Found` response. Fix by adding `conf.use_jwks` to the check.
  • Loading branch information
jesse-r-s-hines committed Dec 19, 2023
1 parent 4f0b85f commit cca43f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apisix/plugins/openid-connect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ function _M.rewrite(plugin_conf, ctx)

local response, err, session, _

if conf.bearer_only or conf.introspection_endpoint or conf.public_key then
if conf.bearer_only or conf.introspection_endpoint or conf.public_key or conf.use_jwks then
-- An introspection endpoint or a public key has been configured. Try to
-- validate the access token from the request, if it is present in a
-- request header. Otherwise, return a nil response. See below for
Expand Down

0 comments on commit cca43f2

Please sign in to comment.