Keycloak User Storage SPI that authenticates users via the OBP REST API instead of direct database access. No JDBC drivers, no SQL views — authentication delegates entirely to OBP endpoints.
- On first request the provider obtains an admin Direct Login token via
POST /obp/v6.0.0/my/logins/direct - User lookup:
GET /obp/v6.0.0/users/provider/{PROVIDER}/username/{USERNAME} - Credential verification:
POST /obp/v6.0.0/users/verify-credentials(username + password + provider) - Only users whose OBP
providerfield matchesOBP_AUTHUSER_PROVIDERare accepted
Required roles on the OBP admin account: CanGetAnyUser, CanVerifyUserCredentials, CanGetOidcClient
- Git 2.2.1 or later
- Docker Engine or Docker Desktop 1.9 or later
- Maven 3.8.5 or later
- Java 17 or later
-
Copy and configure environment variables:
cp env.sample .env nano .env
-
Deploy locally:
./development/run-local-postgres-cicd.sh # or with OBP themes: ./development/run-local-postgres-cicd.sh --themed
| Variable | Description |
|---|---|
| OBP API | |
OBP_API_URL |
Base URL of the OBP API instance (e.g. http://localhost:8080) |
OBP_API_USERNAME |
OBP admin username (must hold required roles) |
OBP_API_PASSWORD |
OBP admin password |
OBP_API_CONSUMER_KEY |
Consumer key registered in OBP for Direct Login |
OBP_AUTHUSER_PROVIDER |
Mandatory — only users with this provider value are authenticated |
| Keycloak Admin | |
KEYCLOAK_ADMIN |
Keycloak admin username (default: admin) |
KEYCLOAK_ADMIN_PASSWORD |
Keycloak admin password (default: admin) |
| Keycloak Database | |
KC_DB_URL |
Keycloak's internal PostgreSQL JDBC URL |
KC_DB_USERNAME |
Keycloak database user (default: keycloak) |
KC_DB_PASSWORD |
Keycloak database password |
| Ports | |
KEYCLOAK_HTTP_PORT |
HTTP port (default: 7787) |
KEYCLOAK_HTTPS_PORT |
HTTPS port (default: 8443) |
KEYCLOAK_MGMT_PORT |
Management/health port (default: 9000) |
See env.sample for the full reference.
- ✅ User lookup and authentication via OBP REST API
- ✅ Password verification delegated to OBP (
verify-credentials) - ✅ Provider-based user filtering (
OBP_AUTHUSER_PROVIDER) - ✅ Admin token caching with automatic refresh on expiry
- 🔴 User creation / update / deletion — read-only by design (manage users in OBP)
After deploying, open https://localhost:8443.
Default admin credentials:
user: admin
pass: admin
Click the User federation tab — obp-keycloak-provider will be listed.
- env.sample — full environment variable reference
- docs/CICD_DEPLOYMENT.md — CI/CD deployment guide
- development/README.md — development scripts documentation
