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
- correct documentation wrt. cache password; closes #52; thanks @webermax depend on liboauth2 >= 1.5.1; see https://github.com/OpenIDC/liboauth2/issues/44 Signed-off-by: Hans Zandbelt <hans.zandbelt@o... — committed to OpenIDC/mod_oauth2 by zandbelt 3 years ago
- add issuer validation for JWT access tokens when configured through OAuth2Verify metadata; closes #44; thanks @chris-crunchr Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com> — committed to umbrella-c/liboauth2 by zandbelt 4 years ago
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!