This guide explains how to test OIDC and SAML authentication locally using Keycloak.
# 1. Seed SSO test data
make seed-sso
# 2. Start dev environment with SSO + Keycloak
make dev-ssomake dev-sso starts the database, Keycloak (via Docker
Compose sso profile), and the backend with SSO
environment variables — all in one command.
| Password | Auth Method | |
|---|---|---|
alice@oidc-test.local |
password123 |
OIDC |
bob@saml-test.local |
password123 |
SAML |
alice@oidc-test.localpassword123bob@saml-test.localpassword123adminadminUse this to: - View/edit test users - Check client configurations - Debug SSO issues
Ensure you started with make dev-sso (not
make dev-up).
Ensure SP_CERT and SP_KEY are set and the cert files exist:
ls docker/keycloak/sp-*.pem
cat docker/keycloak/sp-cert.pem | head -1 # Should show BEGIN CERTIFICATECheck Docker logs:
make keycloak-logsEnsure SSO data is seeded:
make seed-ssocurl http://localhost:8180/health/readyhttp://localhost:8080| Command | Description |
|---|---|
make dev-sso |
Start backend with SSO + Keycloak |
make keycloak-logs |
Tail Keycloak logs |
make seed-sso |
Seed SSO test data |
make dev-down |
Stop everything (server, DB, Keycloak) |