TrueVault Identity Manager

Secure Response Types

This guide explains how to integrate with our OIDC UserInfo encryption and signatures, including how to create and provide a JSON Web Key (JWK) for encrypting responses to your application

1. Decide your delivery format

Work with your account team to set userinfo_delivery to your desired value. For JWE, you must provide a JWK as described below.

2. Generate an RSA keypair

You can use OpenSSL locally. We recommend 2048-bit RSA for production.

# Generate a private key (unencrypted PEM) openssl genrsa -out rp-private.pem 2048 # Extract the public key (PEM) openssl rsa -in rp-private.pem -pubout -out rp-public.pem

Keep rp-private.pem secret. You will only share the PUBLIC components via a JWK.

3. Create a JWK from your public key

A minimal RSA public JWK requires the base64url-encoded modulus n and exponent e.

# Print the public key details openssl rsa -in rp-private.pem -pubout | openssl pkey -pubin -text -noout

Alternatively, you can use libraries to produce JWK directly (recommended in code). Below is the required structure we accept for encryption:

{
  "kty": "RSA",
  "use": "enc",
  "alg": "RSA-OAEP-256",
  "kid": "<your-key-id>",
  "n": "<base64url-modulus>",
  "e": "<base64url-exponent>"
}

Notes:

Example JWK

{
  "kty": "RSA",
  "use": "enc",
  "alg": "RSA-OAEP-256",
  "kid": "my-key-2025-08-01",
  "n": "s7w4V4...",
  "e": "AQAB"
}

4. Provide your JWK to us

You have two options:

{
  "keys": [
    {
      "kty": "RSA",
      "use": "enc",
      "alg": "RSA-OAEP-256",
      "kid": "my-key-2025-08-01",
      "n": "...",
      "e": "AQAB"
    }
  ]
}

Provide the HTTPS URL to your account team.

5. Request encrypted UserInfo

6. Decrypting the response

Use a JOSE/JWT library that supports JWE (RSA-OAEP-256 / A256GCM). Configure it with your private key (rp-private.pem). After decryption, you’ll receive a nested JWS (RS256) which you can optionally verify against our public signing keys.

7. Key rotation

8. Common pitfalls

9. Validation checklist

10. Need help?

Contact your integration engineer with your JWKS URL or sample JWK. Include your desired kid and confirm your userinfo_delivery mode.