feat(sandbox): add keycloak to the sandbox stack with an imported demo realm - #316
Merged
Conversation
…o realm Give the sandbox a real OAuth2 issuer so the token-protected ledger and payment journeys are exercisable end to end. Keycloak boots from a static realm import with a client-credentials demo client whose default scopes match the services' required authorities, and its hostname is pinned so every issued token carries the in-network issuer the services validate, whether the token is requested from inside the network or from the host. The ledger and payments services point at that issuer. The compose smoke now proves the whole auth chain: it fetches a token and calls a protected ledger and payments endpoint expecting success. A path-scoped gitleaks allowlist covers the documented sandbox demo secret. Closes #315
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
F-06.8 (#315) - Keycloak in the sandbox compose stack. Prerequisite for #236 (owner delegated the auth decision; chose Option 1: a real IdP, not an auth-bypass).
What
Security
This STRENGTHENS security: it replaces an unused issuer placeholder with a real validating issuer. No SecurityConfig changes, no auth-bypass; the services still require valid JWTs. The demo secret is sandbox-only (start-dev, never in Helm/prod).
Gate chain
docker compose up --waitalready waits on keycloak's healthcheck so service_started is correct; its 2 recommendations were APPLIED (payments-scope assertion; gitleaks anchored + script path).Cannot run compose locally; the compose-smoke CI job is the integration gate.
Closes #315