Skip to content

Updating of ClientScope doen't include creating new ProtocolMappers #183

@ArtemZip

Description

@ArtemZip

Describe the bug
I need to update std "profile" client scope with new protocol mapper. According to supported features this thing should work.

To Reproduce
Trying on keycloak 8 with latest version of your cli.
After importing empty realm, kc creates default clientScopes, one of them is profile. Then I import realm with next clientScopes

"clientScopes": [
        {
            "name": "profile",
            "protocolMappers": [
                {
                    "id": "tmp",
                    "name": "tmp",
                    "protocol": "openid-connect",
                    "protocolMapper": "oidc-usermodel-attribute-mapper",
                    "config": {
                        "user.attribute": "name",
                        "claim.name":  "tmp",
                        "access.token.claim":  "true",
                        "id.token.claim": "true",
                        "userinfo.token.claim": "true",
                        "jsonType.label":"String"
                    }
                }
            ]
        }
    ], 

also, if i will add id of clientScope it will ignore that.
Also I tried to create new clientScope with same configs as default profile and got 409 from server.

Expected behavior
It should insert/update protocol mapper into clientScope.

Environment (please complete the following information):

  • Keycloak Version: 8
  • keycloak-config-cli Version: latest
  • Java Version: 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions