Skip to content

Commit 8d5edd0

Browse files
committed
update
1 parent 4067ecb commit 8d5edd0

2 files changed

Lines changed: 22 additions & 38 deletions

File tree

README.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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).
180194
2. 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
184198
to Keycloak to log in. Default credentials: `admin@pba.local` / `admin`

process-compose.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,6 @@ processes:
2525
availability:
2626
restart: "no"
2727

28-
keycloak:
29-
# Disabled by default — local dev runs with AUTH_ENABLED=false in .env so no
30-
# OIDC provider is needed. Set `disabled: false` and ensure AUTH_ENABLED=true
31-
# if you want to test the Keycloak login flow.
32-
disabled: true
33-
command: |
34-
docker run --rm --name pba-keycloak \
35-
-p 8180:8080 \
36-
-m 2g \
37-
-v "$(pwd)/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json:ro" \
38-
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
39-
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
40-
-e JAVA_OPTS_KC_HEAP="-XX:MaxRAMPercentage=50 -Xms256m -Xmx1024m -XX:UseSVE=0" \
41-
quay.io/keycloak/keycloak:26.0 \
42-
start-dev --import-realm
43-
readiness_probe:
44-
http_get:
45-
host: 127.0.0.1
46-
port: 8180
47-
path: /realms/pba/.well-known/openid-configuration
48-
initial_delay_seconds: 15
49-
period_seconds: 3
50-
failure_threshold: 20
51-
shutdown:
52-
command: docker rm -f pba-keycloak
53-
5428
tigerbeetle:
5529
command: |
5630
if [ ! -f .tb_data/dev/0_0.tigerbeetle ]; then
@@ -75,10 +49,6 @@ processes:
7549
condition: process_completed_successfully
7650
tigerbeetle:
7751
condition: process_healthy
78-
# keycloak dependency removed — auth disabled in dev. Re-add this block
79-
# alongside enabling the keycloak process if you want OIDC login locally:
80-
# keycloak:
81-
# condition: process_healthy
8252
readiness_probe:
8353
http_get:
8454
host: 127.0.0.1

0 commit comments

Comments
 (0)