Make Keycloak the single source of truth for user identity - #224
Open
ganeshmurthy wants to merge 1 commit into
Open
Make Keycloak the single source of truth for user identity#224ganeshmurthy wants to merge 1 commit into
ganeshmurthy wants to merge 1 commit into
Conversation
ganeshmurthy
force-pushed
the
KEYCLOAK
branch
2 times, most recently
from
July 31, 2026 20:31
1e6efb3 to
d4fb2f7
Compare
Replace the app's duplicated user management with Keycloak as the system of record for identity and authorization. The users table is slimmed to keycloak_id (UUID PK from sub claim) + agent_ids only. Backend: - Slim User model: remove username, email, role, created_at, updated_at - Rename users.id to users.keycloak_id with Alembic migration - Add CurrentUser composite type combining token identity + DB agent_ids - Add Keycloak Admin REST API client (client credentials grant) for admin user listings - Remove seed admin mechanism from migrations - Fix /validate endpoint to work without token validation sidecar - Add AUTO_ASSIGN_AGENTS_TO_USERS env var to deployment Frontend: - Update User type: id -> keycloak_id, remove timestamps - Remove user creation/editing UI (new-user-card, user-form components) - Remove edit mode from user-profile, keep agent assignment - Update all .id references to .keycloak_id - Add role-aware "no agents" warning in chat UI Deployment: - Create app admin user in ai-apps realm during Keycloak setup job with admin role pre-assigned (prompted during make install) - Store app admin password in Kubernetes Secret via secretKeyRef - Add Keycloak OIDC secret, setup configmap, and setup job templates - Assign view-users role to service account in Keycloak setup job - Set 'user' as default realm role for new registrations - Add autoAssignAgents flag to Helm values (default: true) - Display Keycloak Admin Console URL after install - Update README with application and Keycloak access URLs - Restore image registry to quay.io/rh-ai-quickstart
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.
Replace the app's duplicated user management with Keycloak as the system of record for identity and authorization. The users table is slimmed to keycloak_id (UUID PK from sub claim) + agent_ids only.
Backend:
Frontend:
Deployment: