Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-2646

Update to KC 26.x from <26 fails if admin-cli client deleted [GHI#35793]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [X] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      core

      Describe the bug

      When the admin-cli clients has been deleted in one realm, the upate from KC <26 to KC 26.x fails with the following error:

      ```json
      {"timestamp":"2024-12-11T07:29:23.579094554Z","sequence":9861,"loggerClassName":"org.jboss.logging.Logger","loggerName":"org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler","level":"ERROR","message":"ERROR: Cannot invoke \"org.keycloak.models.ClientModel.setFullScopeAllowed(boolean)\" because \"adminCliClient\" is null","threadName":"main","threadId":1,"mdc":{},"ndc":"","hostName":"xxxx","processName":"/usr/lib/jvm/java-21-openjdk-21.0.5.0.11-2.el9.x86_64/bin/java","processId":1}
      ```

      Version

      26.0.7

      Regression

      [X] The issue is a regression

      Expected behavior

      The update works even if the client does not exists.

      Actual behavior

      KC startup fails with error message.

      How to Reproduce?

      Run Keycloak in version <26. Delete the admin-cli client in one realm. Update to KC 26.x.

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak Core (shared)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: