Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-14106

Adding a role to a composite role does not work with kcadm

    Details

    • Sprint:
      Keycloak Sprint 40, Keycloak Sprint 41, Keycloak Sprint 42
    • Steps to Reproduce:
      Hide

      ./kcadm.sh create roles -r demorealm -s name=abc
      ./kcadm.sh create roles -r demorealm -s name=abc1
      ./kcadm.sh create roles -r demorealm -s name=abc2
      ./kcadm.sh create roles -r demorealm -s name=abc3
      ./kcadm.sh create roles -r demorealm -s name=testcomposite -s composite=true
      ./kcadm.sh create roles -r demorealm -s name=testmember
      ./kcadm.sh add-roles -r demorealm --rname testcomposite --rolename testmember

      Show
      ./kcadm.sh create roles -r demorealm -s name=abc ./kcadm.sh create roles -r demorealm -s name=abc1 ./kcadm.sh create roles -r demorealm -s name=abc2 ./kcadm.sh create roles -r demorealm -s name=abc3 ./kcadm.sh create roles -r demorealm -s name=testcomposite -s composite=true ./kcadm.sh create roles -r demorealm -s name=testmember ./kcadm.sh add-roles -r demorealm --rname testcomposite --rolename testmember
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      When you try to add a realm role to a composite realm role, the operation fails with the error message:

      Role not found for name: <rolename>

      After some investigation I found out that the API request:

      GET - https://<keycloak_url>/auth/admin/realms/<realmname>/roles?name=<role_name>&first=0&max=2

      Seems not to be filtered for the name, as two other roles with different names are returned.

      If I change the max parameter to 5, the role is returned.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mkanis Martin Kanis
                  Reporter:
                  sw_sb Patrick Giardina
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: