This guide explains how to test OIDC and SAML authentication locally using Keycloak.
make db)# 1. Start PostgreSQL (if not already running)
make db
# 2. Start Keycloak
make keycloak
# 3. Set up SSO environment variables
cp .envrc.example .envrc
source .envrc
# 4. Seed SSO test data
make seed-sso
# 5. Start backend and frontend
make dev-backend # Terminal 1
make dev-frontend # Terminal 2| 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 environment variables are set:
source .envrc
make dev-backendEnsure 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 keycloak |
Start Keycloak container |
make keycloak-stop |
Stop and remove Keycloak |
make keycloak-logs |
Tail Keycloak logs |
make seed-sso |
Seed SSO test data |