Core concepts - Realm
What is a Realm?
A realm is a self-contained authentication environment. It groups the users, clients, and availabilities that belong together, and it draws the hard boundary nothing crosses: users authenticate against their realm, tokens are valid within their realm, and realms have no knowledge of each other. One user, one login pair, one realm — and every application registered there trusts it.
The analogy version: a realm is what Keycloak calls a realm (and what a tenancy boundary is in multi-tenant systems) — your org’s own private identity universe, distinct from every other universe hosted on the same platform.
A realm typically maps to one organization or one product family. The apartment-building intuition — clients are separate apartments that don’t share keys, but residents of the realm share one entrance. Distinct apps that should share users? Same realm. Different companies, or staging vs. production? Different realms.