Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log OIDC evaluation in Quarkus

I am new to Quarkus and I am trying OIDC in Quarkus 1.13.3 I added the oidc-dependency and annotated my REST-Service-methods with @RolesAllowed. When I call the service with an expired JWT-Token, I get 401, when I call with the wrong user group, I get 403, this is fine so far. However, Quarkus does not write anything into the log when doing this. I need Log-messages stating that someone called with an invalid token or with a wrong user group. How can I achieve this ? Even with quarkus.log.level=TRACE, I do not see any messages concerning the oidc evaluation.

like image 888
DocU Avatar asked Nov 18 '25 05:11

DocU


1 Answers

For future reference, since I landed here while searching for the same. I added the following properties:

quarkus.log.category."io.quarkus.oidc".level=TRACE
quarkus.log.category."io.quarkus.oidc".min-level=TRACE

that way you can start seeing messages like this in the log

2023-09-11 11:39:02,664 DEBUG [io.quarkus.oidc.runtime.OidcIdentityProvider] (vert.x-eventloop-thread-9) {} Starting creating SecurityIdentity
2023-09-11 11:39:02,665 DEBUG [io.quarkus.oidc.runtime.OidcIdentityProvider] (vert.x-eventloop-thread-9) {} Verifying the JWT token with the local JWK keys
like image 136
femago Avatar answered Nov 19 '25 19:11

femago