General
In the Liberty traces, I tended to look for the last few CWW…. messages.
Processing lines in ASCII files in ISPF edit macros made looking at log files so much easier.
Tracing the openidConnectClient activity
You can use the trace
com.ibm.ws.security.*=all:com.ibm.ws.webcontainer.security.*=all:com.ibm.oauth.*=all:com.ibm.wsspi.security.oauth20.*=all:org.openid4java.*=all:org.apache.http.client.*=all:io.openliberty.security.*=all
to get a lot of information about the activity.
- com.ibm.oauth.*=all didnt give me anything.
- com.ibm.ws.webcontainer.security.*=fine didn’t produce anything
- com.ibm.ws.webcontainer.security.*=finer produced good stuff – too much info
I used Setting mqweb trace on z/OS and other useful hints on tracing extensively to look at the Liberty traces.
Messages
CWWKS1776E: Validation failed for the token requested by (COLINCOO2) using the (RS384) algorithm due to a signature verification failure:
CWWKS1737E: The OpenID Connect client (COLINCOO2) failed to validate the JSON Web Token. The cause of the error was: (JWT rejected due to invalid signature).
After I added the certificate to the keyring, I needed to restart the server to pickup the change.
CWWKS2915E: SAF service IRRSIA00_CREATE did not succeed because group
null was not found in the SAF registry. SAF return code 0x00000008. RACF return code 0x00000008. RACF reason code 0x00000010.
Explanation: The JWT has a userid, and the userid/realm mapping does not exist in the RACMAP definitions. I think this is a bug… it should not have got into RRSIA00_CREATE if there is no userid.
Basic configuration errors
When there was no matching issuerIdentifier in the openidConnectClient, I got
HTTP/2 401
www-authenticate: Bearer realm=”jwt”, error=”invalid_token”, error_description=”Check JWT token”{“error_description”:”OpenID Connect client returned with status: SEND_401″,”error”:401}
With the above I got in the trace
… Jose4jUtil E CWWKS1737E: The OpenID Connect client (…) failed to validate the JSON Web Token . The cause of the error was: (
CWWKS1773E: Validation failed for the token requested by the (…) OpenID Connect client for the (…) user because the token is outside of its valid range. This error occurs either because the (2025-08-08T18:45:15.182Z) current time is after the (2025-08-08T18:03:21.000Z) token expiration time or because the (2025-08-08T17:13:21.000Z) issue time is too far away from the (2025-08-08T18:45:15.182Z) current time.)
Which means the token has expired.
2 thoughts on “Using JWT and when it goes wrong”