Repository navigation
Conversation
- pyro-api client scope: adds pyro-api to aud and the realm roles as a top-level roles claim - pyro-organization claim renamed to organization_id, which avoids Keycloak's built-in Organizations claim - new-pyro-platform gets both scopes by default - pyro-api confidential client, used by the API to introspect tokens - pyro-scripts service account (admin, org 1, 10h tokens) for the init script and notebooks - test-admin user (admin, org 1)
…and scripts - Keycloak leaves the tools profile, pins its issuer with KC_HOSTNAME and reports readiness from /health/ready - pyro_api gets KEYCLOAK_ISSUER, the backchannel URL and the pyro-api client secret - init_script and notebooks get the pyro-scripts credentials, with defaults for .env files created before Keycloak
The init script and notebooks use client credentials instead of logging in with the superadmin password. The notebooks' legacy get_token stays for local scripts while pyro-api still accepts API-issued user tokens.
Drop firstName and lastName from the realm user profile and from the test users, so a new user is no longer asked for them at first login. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
fe51
left a comment
There was a problem hiding this comment.
Tested locally against the feat/keycloak branch of pyro-api: make run-tools starts cleanly, the realm is imported, the init script completes, and the pyro-scripts service account as well as the four test users get working tokens. Organization isolation and role restrictions behave as expected with the platform branch running on port 5173.
I pushed one small commit (6106c6c): the user profile now only asks for an email. First name and last name are removed from the profile and from the test users, since we do not want to collect them. Checked on a fresh import: a new user is only asked for an email at first login.
One thing to keep in mind, not for this PR: make run works today only because the published front image still uses the old login form. The front container will need its Keycloak config once pyronear/new-pyro-platform#295 is released. Tracked in #71.
Configures Keycloak for pyro-api and switches the init script and notebooks to a service account.
Based on #45. Requires pyronear/pyro-api#728. Platform demo uses pyronear/new-pyro-platform#295.
Platform login
keycloak-platform-demo.mp4
Session revocation
keycloak-api-demo.mp4