@@ -166,19 +166,33 @@ just smithy-build # regenerate the Rust client SDK
166166## Authentication
167167
168168** Local dev runs with auth disabled.** The ` .env.example ` template sets
169- ` AUTH_ENABLED=false ` , and Keycloak is disabled by default in
170- ` process-compose.yml ` , so ` just run ` does ** not ** start an OIDC provider. The
171- Admin UI and API are open — just navigate to ` http://localhost:3030/admin ` .
169+ ` AUTH_ENABLED=false ` , and the dev stack does ** not ** start an OIDC provider, so
170+ ` just run ` leaves the Admin UI and API open — just navigate to
171+ ` http://localhost:3030/admin ` .
172172
173173### Enabling Keycloak (optional)
174174
175- To test the real OIDC login flow locally (requires Docker):
175+ Keycloak is ** not** bundled in the dev stack. To test the real OIDC login flow
176+ locally, run it standalone (requires Docker), then point the service at it:
177+
178+ 1 . Start Keycloak with the bundled realm:
179+
180+ ``` bash
181+ docker run --rm --name pba-keycloak \
182+ -p 8180:8080 -m 2g \
183+ -v " $( pwd) /keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro" \
184+ -e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
185+ -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
186+ -e JAVA_OPTS_KC_HEAP=" -XX:MaxRAMPercentage=50 -Xms256m -Xmx1024m -XX:UseSVE=0" \
187+ quay.io/keycloak/keycloak:26.0 \
188+ start-dev --import-realm
189+ ```
190+
191+ > ` -XX:UseSVE=0 ` works around a JVM crash on Apple Silicon (M-series); the
192+ > heap flags and ` -m 2g ` keep Keycloak from starving the rest of the stack.
176193
177- 1 . In ` process-compose.yml ` , set ` disabled: false ` on the ` keycloak ` process,
178- and re-add the ` keycloak ` block under ` pba-service ` 's ` depends_on ` (a
179- commented template is left in place there).
1801942 . Set ` AUTH_ENABLED=true ` in your ` .env ` .
181- 3 . ` just run ` — Keycloak now starts alongside the other services .
195+ 3 . ` just run ` (or ` just run-service ` ) — the service now uses Keycloak for auth .
182196
183197** Admin UI:** Navigate to ` http://localhost:3030/admin ` — you'll be redirected
184198to Keycloak to log in. Default credentials: ` admin@pba.local ` / ` admin `
0 commit comments