4.1 Cryptography Used
The Keycloak realm described in this guide uses RS256 for token signing. RS256 is an RSA signature algorithm using SHA-256. It provides token integrity and issuer authentication when correctly validated; a signed JWT does not encrypt its claims. Do not include secrets or unnecessary sensitive data in token claims.
The token validator shall restrict accepted algorithms and validate token integrity, issuer, intended audience, and expiry, together with other required validity claims. Use the trusted realm discovery and public-key information according to the supported gateway configuration. Decoding a JWT is not token validation.
Protect Keycloak signing private keys and restrict administrative access. Manage key rotation using supported Keycloak mechanisms and account for public-key cache refresh and tokens already issued. Do not change accepted algorithms solely on the basis of an untrusted token header.
Parent topic: Session Management