Skip to main content

Realm Setup

This guide walks through creating and configuring the uaagi-dealerships realm in Keycloak.

Step 1: Log in to the Admin Console

Navigate to https://sso.uaagi-uno.com/admin and sign in with your Keycloak admin credentials.

Keycloak admin login page


Step 2: Create the realm

  1. After login, click the realm dropdown (top-left corner of the sidebar).
  2. Click Create Realm.
  3. Enter uaagi-dealerships as the Realm ID.
  4. Click Create.
caution

The Realm ID cannot be changed after creation. Make sure it is exactly uaagi-dealerships — this value is embedded in all OAuth endpoint URLs.


Step 3: General settings

Navigate to Configure > Realm settings > General tab.

Realm settings — General tab

Configure the following:

FieldValueNotes
Realm IDuaagi-dealershipsRead-only after creation
Display nameUAAGI Unified Dealership SystemShown in the admin console sidebar
HTML Display name<div class='kc-logo-text'><span>UAAGI</span></div>Branded login page header
Frontend URL(empty)Leave blank unless fronting Keycloak behind a separate reverse proxy hostname
Require SSLExternal requestsEnforces HTTPS for all external traffic; internal cluster comms can stay plain HTTP
User-managed accessOffUsers cannot manage their own account resources
Unmanaged AttributesDisabledPrevents users from setting arbitrary attributes on themselves

At the bottom you will see the Endpoints links — these are useful references:

  • OpenID Endpoint Configuration — the .well-known/openid-configuration URL that lists all OAuth/OIDC endpoints for this realm
  • SAML 2.0 Identity Provider Metadata — not used in this setup

Click Save.


Step 4: Login settings

Navigate to the Login tab.

Realm settings — Login tab

Login screen customization

SettingValueRationale
User registrationOffUsers are provisioned by admins only — no self-signup
Forgot passwordOffPassword resets are handled by sysadmins, not end-users
Remember meOffSession length is controlled by token lifespans, not browser cookies

Email settings

SettingValueRationale
Email as usernameOnUsers log in with their email address (e.g. juan@uaagi.com)
Login with emailOnAllows email in the login form (required when Email as username is on)
Duplicate emailsOffEnsures each email maps to exactly one Keycloak user — critical for Odoo's email-based user matching
Verify emailOnUsers must verify their email before first login

:::warning Duplicate emails must stay Off The Odoo SSO module matches users by email when linking OAuth accounts. If two Keycloak users share the same email, the wrong Odoo user could be linked. Always keep Duplicate emails disabled. :::

Click Save.


Navigate to the Tokens tab and configure session lifespans:

SettingRecommended valueNotes
Access Token Lifespan30 minutesHow long the access token is valid. Odoo uses it for the userinfo request and dealership redirects.
SSO Session Idle1 hourSession expires after 1 hour of inactivity
SSO Session Max8 hoursMaximum session length regardless of activity (one workday)
tip

Individual clients can override these values via their Advanced tab. For most dealership clients, leaving them as "Inherits from realm settings" is correct.

Click Save.


What's next

With the realm configured, proceed to create the OAuth clients: