Adds the breakpilot platform multi-tenancy claims to the dev realm so M7.x products (starting with compliance-scanner-agent) can authenticate against the local CERTifAI stack end-to-end.
New tenant-context client scope, default on all three clients
directAccessGrantsEnabled: true on certifai-dashboard for scripted local testing
Test plan
docker compose up -d keycloak boots cleanly
Password grant against each user decodes a token with all 6 claims correctly
Compliance-scanner-agent (PR #82) validates each token, gates writes for frozen, blocks archived
Notes
This is the dev realm only — KC_DB: dev-mem, in-memory, recreated on every container start. Production realms are not affected.
## Summary
Adds the breakpilot platform multi-tenancy claims to the dev realm so M7.x products (starting with `compliance-scanner-agent`) can authenticate against the local CERTifAI stack end-to-end.
- New `tenant-context` client scope, default on all three clients
- 6 protocol mappers: `tenant_id`, `tenant_slug`, `tenant_status`, `plan` (strings); `org_roles`, `products` (multi-valued)
- 5 test users covering every `tenant_status` branch:
- `admin@certifai.local` (acme, active, IT_ADMIN + CXO)
- `user@certifai.local` (acme, active, USER)
- `trial@acme.local` (trialco, trial)
- `frozen@acme.local` (frozenco, frozen) -> 402 on writes
- `archived@acme.local` (archiveco, archived) -> 410 always
- `directAccessGrantsEnabled: true` on `certifai-dashboard` for scripted local testing
## Test plan
- [x] `docker compose up -d keycloak` boots cleanly
- [x] Password grant against each user decodes a token with all 6 claims correctly
- [x] Compliance-scanner-agent (PR #82) validates each token, gates writes for frozen, blocks archived
## Notes
This is the dev realm only — `KC_DB: dev-mem`, in-memory, recreated on every container start. Production realms are not affected.
Adds the breakpilot platform multi-tenancy claims to the dev realm
so M7.x products (starting with compliance-scanner-agent) can
authenticate against the local CERTifAI stack end-to-end.
New tenant-context client scope, included by default on all three
clients, with six protocol mappers backed by user attributes:
tenant_id, tenant_slug, tenant_status, plan (strings)
org_roles, products (multi-valued)
Five test users cover every tenant_status branch:
admin@certifai.local (acme, active, IT_ADMIN + CXO)
user@certifai.local (acme, active, USER)
trial@acme.local (trialco, trial)
frozen@acme.local (frozenco, frozen) -> 402 on writes
archived@acme.local (archiveco, archived) -> 410 always
Enables Direct Access Grants on certifai-dashboard so password-
grant requests work for local API testing. This is the dev realm
only (KC_DB: dev-mem); prod realms inherit nothing from this file.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
sharang
merged commit 8b8ec1fc9f into main2026-06-04 14:38:24 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Adds the breakpilot platform multi-tenancy claims to the dev realm so M7.x products (starting with
compliance-scanner-agent) can authenticate against the local CERTifAI stack end-to-end.tenant-contextclient scope, default on all three clientstenant_id,tenant_slug,tenant_status,plan(strings);org_roles,products(multi-valued)tenant_statusbranch:admin@certifai.local(acme, active, IT_ADMIN + CXO)user@certifai.local(acme, active, USER)trial@acme.local(trialco, trial)frozen@acme.local(frozenco, frozen) -> 402 on writesarchived@acme.local(archiveco, archived) -> 410 alwaysdirectAccessGrantsEnabled: trueoncertifai-dashboardfor scripted local testingTest plan
docker compose up -d keycloakboots cleanlyNotes
This is the dev realm only —
KC_DB: dev-mem, in-memory, recreated on every container start. Production realms are not affected.