Skip to content

UI login fails after PR #764: ui-oauth-secret image missing realm bootstrap code #833

Closed

Description

@pdettori

Bug

After merging #764 (migrate UI from Keycloak master realm to dedicated kagenti realm), local Kind installs fail with "wrong user/password" on the UI login page.

Root Cause

charts/kagenti/values.yaml points to a test image (quay.io/pdettori/ui-oauth-secret:latest) that was built on Jan 9 — before #764 added the realm bootstrap logic. The old image:

  1. Creates the kagenti realm (via register_client)
  2. Creates the OAuth secret with /realms/kagenti endpoints
  3. Never creates the admin user in the kagenti realm

The UI redirects to Keycloak's kagenti realm login, but no user exists there.

Fix

Change the default image from quay.io/pdettori/ui-oauth-secret to ghcr.io/kagenti/kagenti/ui-oauth-secret — consistent with the pattern used by agent-oauth-secret and other images. The ghcr.io image is published from CI and contains the bootstrap code.

CI workflows are unaffected — all four e2e workflows already call 25-build-oauth-secret-image.sh to rebuild from source.

Reproducer

  1. Deploy to Kind: ./.github/scripts/local-setup/kind-full-test.sh --skip-cluster-destroy
  2. Navigate to http://kagenti-ui.localtest.me:8080
  3. Login with admin/admin → fails with "Invalid user credentials"
  4. Verify: curl -s http://keycloak.localtest.me:8080/realms/kagenti/protocol/openid-connect/token -d "grant_type=password" -d "client_id=admin-cli" -d "username=admin" -d "password=admin" → returns error

Activity

  1. added a commit that references this issue on Mar 4, 2026
    f32002c
  2. added
    bug
    high priority
    on Mar 4, 2026
  3. added theissue type on Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughigh priority

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions