Validate mode

In validate mode, the JWT Module consumes a binary security token, which has the attribute type “urn:com:ibm:JWT”.

When the module consumes a JWT, the following operations are performed:

  1. The keys are resolved.
  2. The JWT is decrypted if it was encrypted.
  3. The JWT signature is verified if it was signed. If the JWT was encrypted, this step is performed on the payload of the decrypted JWT.
  4. The claims are validated.
  5. The STSUU is populated.

If the JWT is successfully decrypted and validated, then the STSUU attributes will contain the claims and context attributes. The claims will have the attribute type urn:com:ibm:JWT:claim. The context attributes will have one of the following values:

The following table shows the configuration properties.

Configuration property Description Can be provided via WS-Trust claims
signing.alg The algorithm with which the JWT is signed. FALSE
signing.symmetricKey The symmetric key used to perform signature validation. TRUE
signing.db The keystore from which the certificate is sourced. TRUE
signing.cert Certificate label from which the public keys are sourced. TRUE
signing.jwksUri The JWKS URI from which the public key is retrieved. TRUE
encryption.alg The algorithm used by the JWT for key management. FALSE
encryption.enc The algorithm used by the JWT for content encryption. FALSE
encryption.symmetricKey The symmetric key used for key management. TRUE
encryption.db The keystore from which the private key is sourced. TRUE
encryption.cert The label of the certificate containing private key to use for decrypting the encryption key. TRUE
iss The Java regular expression matching the iss (issuer) claim. This value is optional. FALSE
aud The Java regular expression matching the aud (audience) claim. This value is optional. FALSE
sub The Java regular expression matching the sub (subject) claim. This value is optional. FALSE
validateExp Whether the exp claim in the JWT is checked. This check requires the exp (expiration time) claim be set to a time in the future. FALSE
validateNbf Whether the nbf (not before) claim in the JWT is checked. This check requires the nbf claim be set to a time in the past. FALSE
validateSkew The skew to offset time checks with. FALSE

When the module runs in validate mode, it converts the JWT into a populated STSUU. The following examples show some sample input JWT and the corresponding output STSUU.

Input example

Output example


Parent topic: JSON Web Token (JWT)