Keycloak Configuration
DEMO CONFIGURATION
This documentation includes examples from a demo environment for informational purposes only. Adapt the configuration values (domains, ports, credentials) to match your specific setup.
Reservium supports SSO via OpenID Connect (OIDC). This guide shows how to configure SSO with Keycloak as an example.
How does it work?
Reservium SSO uses Keycloak OAuth2/OpenID Connect. When a user logs in through Keycloak, they unlock a server-side key needed to decrypt their secret key passphrase.
Prerequisites
You need the following to configure Keycloak SSO with Reservium:
- A running Keycloak instance (version 26.4 or later).
- Access to the Keycloak admin panel and the Reservium server.
Keycloak Version
This guide uses Keycloak 26.4. It is recommended to use a specific version rather than latest for consistency: quay.io/keycloak/keycloak:26.4.
Configuration Steps
Step 1: Configure Keycloak
Create a Keycloak Realm
- Navigate to your Keycloak instance (e.g.,
https://keycloak.local:8443). - Log in with admin credentials.
- In the top-left dropdown, click Create realm.
- Enter a realm name (e.g.,
reservium) and click Create.
Create a Keycloak Client
- In your new realm, go to Clients -> Create client.
- Client type:
OpenID Connect. - Client ID:
reservium-client. - Client authentication:
On. - Authentication flow:
Standard flow. - Valid redirect URIs: Add your Reservium redirect URI.
- Web origins:
https://reservium.local. - Click Save.
Configure Client Credentials
- In the client settings, go to the Credentials tab.
- Copy the Client secret - you will need this for Reservium configuration.
Create a Test User
- Go to Users -> Create new user.
- Fill in details (Username, Email, etc.) and set Email verified to
On. - In the Credentials tab, click Set password.
- Set a password and toggle Temporary to
Off.
Step 2: Configure Reservium Environment Variables
- Connect to your Reservium server.
- Open your
.envfile and add the following variables:
KEYCLOAK__SERVER_URL=https://keycloak.example.com:8443
KEYCLOAK__REALM=your.realm
KEYCLOAK__CLIENT_ID=reservium-app
KEYCLOAK__CLIENT_SECRET=your-secret
- Restart the Docker containers:
docker compose down
docker compose up -d
Step 3: Verify Configuration
- Open the Reservium login page and click the login button.
- Confirm that you are redirected to Keycloak and can authenticate successfully.
- Ensure you have access to the Reservium dashboard after logging in.