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

Wrong persistent group permissions when multiple group membership changes happen in the same request [GHI#44480]

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 two IDP group mappers assign the same group and one decides to map the group and the other doesnt, there is currently a condition where sometimes the user is in the group and sometimes it is not. This is due to the following change: https://github.com/keycloak/keycloak/commit/bb9015a1f26ada048610e8b89f34c0f3959ac9a9 / #43682
      Where joinGroup() is missing the condition && updated == null causing it to miss other updates to the user done in the same request.

      Version

      26.4.5

      Regression

      [x] The issue is a regression

      Expected behavior

      If two group mappers map the same group and one wants to join and one wants to leave, the join always wins.

      Actual behavior

      Race condition, sometimes user joins, sometimes he doesn't, depending on mapper execution order.

      How to Reproduce?

      Skipping as discussed with @ahus1

      Anything else?

      No response

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak SRE
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: