liboauth2: Unable to do strict issuer verification

According to the example apache config, I can force strict issuer verification with the verify.iss=required option. However, when I set this option to required it fails, while it succeeds with optional.

My config looks like this:

OAuth2TokenVerify metadata https://<domain>/.well-known/openid-configuration metadata.ssl_verify=false&verify.iss=required

One interesting excerpt from the logs:

[Wed Apr 19 11:53:49.360956 2023] [oauth2:debug] [pid 110463:tid 140637177321216] src/jose.c(1040): [client 127.0.0.1:52514] _oauth2_jose_jwt_validate_iss: enter: iss=(null), validate=required

This suggests to me that the value of iss is not passed along.

I’m using KeyCloak as my IdP and verified that the iss field in token corresponds with the issuer field in the metadata.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (13 by maintainers)

Commits related to this issue

Most upvoted comments

ok, thanks for putting in the effort in reproducing this! I will try this and get back to you asap

Is it possible for you to create a new release with this patch? Or provide details on how to do it myself? I’m trying to create a deb myself, but its a bit finicky. Also, it would help us track the exact version used.

Awesome! I was sifting through the code to find a way to fix it, but you fixed it before I could even find a suitable starting point. Thanks!