Keycloak security hardening

Specific hardening tasks for a production Keycloak, from admin endpoint exposure and token lifetimes to key rotation, secrets, client policies, patching and security testing.

Restricting access to the Keycloak admin console

Keeping the admin console and Admin REST API off the public internet: a separate admin hostname, proxy path rules, network restrictions, MFA for administrators, dedicated admin accounts and limiting master realm use.

Keycloak token and session lifetime settings

Choosing access token, SSO session, client session and offline session lifetimes by application risk: the realm and client settings, remember me, idle versus maximum timeouts, and the impact on logout and user experience.

Rotating Keycloak realm signing keys

Planning realm key rotation without logging everyone out: active, passive and disabled keys, priority, the suggested rotation interval, offline tokens, and applications that cache JWKS or pin certificates.

Keycloak penetration testing and security assessment

Scoping a security test of a Keycloak deployment: login and token flows, admin endpoints, client configuration, custom extensions and themes, proxy setup, and how findings map to the threat mitigations in the Keycloak documentation.

Keycloak production security checklist

An item-by-item review of a running Keycloak against the threats its documentation lists, with the setting to check for each, how to verify it and the evidence to keep, for internal audits or before go-live.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.