How to configure SSO with Keycloak
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 Keycloak and Reservium server where they run
KEYCLOAK VERSION
This guide uses Keycloak 26.4. Use a specific version rather than latest for consistency: quay.io/keycloak/keycloak:26.4.
Configuration
Step 1: Configure Keycloak
Create a Keycloak Realm
- Navigate to your Keycloak instance (e.g.,
https://keycloak.local:8443) - Log in with the admin credentials:
- Username:
admin - Password:
admin
- Username:
- Navigate to the dropdown in the top-left corner and click "
Create realm" - Enter a realm name (e.g., "reservium")
- Click "Create"
Create a Keycloak Client
- In your newly created realm, go to "Clients" in the left menu
- Click "Create client"
- Configure the client:
- Client type: OpenID Connect
- Client ID: reservium-client (or your preferred name)
- Click "Next"
- Configure client settings:
- Client authentication: On
- Authorization: Off
- Authentication flow: Standard flow
- Click "Next"
- Configure login settings:
- Root URL: Leave empty
- Home URL: Leave empty
- Valid redirect URIs: Add your Reservium redirect URI (get this from Reservium's SSO configuration page)
- Web origins: https://reservium.local
- Click "Save"
Configure Client Credentials
- In the client settings, go to the "Credentials" tab
- Copy the Client secret value - you'll need this for Reservium configuration
Create a Test User
- Go to "Users" in the left menu
- Click "Create new user"
- Fill in the user details:
- Username: Choose a username
- Email: Use an email that exists in Passbolt
- First name and Last name: Fill as desired
- Email verified: Toggle to "On"
- Click "Create"
- Set a password for the user:
- Go to the "Credentials" tab
- Click "Set password"
- Enter a password and confirm it
- Toggle "Temporary" to "Off"
- Click "Save"
Step 2: Configure Reservium Environment Variables
- Connect to the server where Reservium is running.
- Navigate to the working directory containing your
docker-compose.ymland configuration files. - Open the
.envfile and add the following environment 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 to apply the changes:
docker-compose down docker-compose up -d
Step 3: Verify Configuration
- Open the Reservium login page and click the login button.
- Confirm that you can authenticate via Keycloak successfully.
- Ensure you can access Reservium after logging in.