Lion Cipher Lab

Set up single sign-on with Keycloak

Why it matters

Almost every organization runs an identity provider -- the one system that holds who people are and hands other apps a trusted answer to 'is this really them?'. Okta, Microsoft Entra ID, Google Workspace, and Ping are the commercial versions; Keycloak is the free, open-source one you can actually run yourself and take apart. Reading about single sign-on gets you words; standing up a realm, a user, and a client gets you the mental model that sticks. In one sitting you go from 'SSO is magic' to 'SSO is a server I configured, issuing signed tokens to apps I registered.' That is the difference…

What you'll learn

Steps in this lab

  1. What an identity provider, SSO, and OIDC actually are
  2. The four pieces inside Keycloak: realm, user, client, token
  3. Run Keycloak in dev mode with one Docker command
  4. Log into the admin console and create your realm
  5. Create a user who can log in
  6. Register a client (an app) and walk the OIDC login flow
  7. Lock it down: admin password, client secrets, token lifetimes, MFA
  8. Dev mode is a toy -- what production actually requires
  9. What you can now do that you could not before

Open the full interactive lab →