Skip to content

fix(keycloak): handle situations where the systemInfo.version isn't available#8406

Merged
PatAKnight merged 3 commits intobackstage:mainfrom
PatAKnight:support-missing-systemInfo-version
Apr 8, 2026
Merged

fix(keycloak): handle situations where the systemInfo.version isn't available#8406
PatAKnight merged 3 commits intobackstage:mainfrom
PatAKnight:support-missing-systemInfo-version

Conversation

@PatAKnight
Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

Handles cases where systemInfo.version is unavailable in the Keycloak server info response. Starting with Keycloak v26.4.0, systemInfo is only accessible from the master realm — retrieving it from any other realm requires granting additional roles to that realm's realm-management client. Rather than making this an extra configuration requirement for users, the plugin now defaults to processGroupsRecursively when the server version cannot be determined, only falling back to the legacy traverseGroups path when a version is explicitly detected as 22 or lower.

Fixes

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@backstage-goalie
Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-catalog-backend-module-keycloak workspaces/keycloak/plugins/catalog-backend-module-keycloak patch v3.19.0

@seilerre
Copy link
Copy Markdown

seilerre commented Apr 6, 2026

Running into this, so thanks for fixing! :)

Copy link
Copy Markdown
Contributor

@dzemanov dzemanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified locally that subgroups importing works correctly with versions:

  • 22.0.1
  • 26.5.7

Thank you @PatAKnight for the PR!

…vailable

Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Patrick Knight <pknight@redhat.com>
@PatAKnight PatAKnight force-pushed the support-missing-systemInfo-version branch from 25b8f71 to c4890a3 Compare April 7, 2026 17:32
@PatAKnight PatAKnight merged commit e8b7471 into backstage:main Apr 8, 2026
12 checks passed
evanlankveld pushed a commit to evanlankveld/community-plugins that referenced this pull request Apr 28, 2026
…vailable (backstage#8406)

* fix(keycloak): handle situations where the systemInfo.version isn't available

Signed-off-by: Patrick Knight <pknight@redhat.com>

* fix(keycloak): add changeset

Signed-off-by: Patrick Knight <pknight@redhat.com>

* fix(keycloak): swap to descending order for keycloak version tests

Signed-off-by: Patrick Knight <pknight@redhat.com>

---------

Signed-off-by: Patrick Knight <pknight@redhat.com>
Signed-off-by: Emiel van Lankveld <evanlankveld@bol.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 keycloak: Subgroups imports not working cause Keycloak >26.4.0 restrict the use of the server info endpoint

4 participants