keycloak/keycloak

SCIM: Incorrect location URL

Chiusa

#49.176 aperta il 20 mag 2026

 (1 commento) (1 reazione) (1 assegnatario)Java (8346 fork)batch import
area/scimhelp wantedkind/bugpriority/normalteam/core-iam

Metriche repository

Star
 (34.398 stelle)
Metriche merge PR
 (Merge medio 6g 19h) (384 PR mergiate in 30 g)

Descrizione

Before reporting an issue

  • 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

scim

Describe the bug

When querying all groups, for example, the location is generated correctly.

{
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "totalResults": 1,
    "Resources": [
        {
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:Group"
            ],
            "id": "43fff4ad-9cca-4716-b01c-7b46d103eba1",
            "meta": {
                "resourceType": "Group",
                "created": "2026-05-20T15:29:31.757Z",
                "lastModified": "2026-05-20T15:29:31.757Z",
                "location": "https://keycloak:8443/realms/test/scim/v2/Groups/43fff4ad-9cca-4716-b01c-7b46d103eba1"
            },
            "displayName": "Test"
        }
    ],
    "startIndex": 1,
    "itemsPerPage": 1
}

However, if you query a group individually, the ID is added twice to the URL.

{
    "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
    ],
    "id": "43fff4ad-9cca-4716-b01c-7b46d103eba1",
    "meta": {
        "resourceType": "Group",
        "created": "2026-05-20T15:29:31.757Z",
        "lastModified": "2026-05-20T15:29:31.757Z",
        "location": "https://keycloak:8443/realms/test/scim/v2/Groups/43fff4ad-9cca-4716-b01c-7b46d103eba1/43fff4ad-9cca-4716-b01c-7b46d103eba1"
    },
    "displayName": "Test"
}

The same goes for users

Version

26.6.2

Regression

  • The issue is a regression

Expected behavior

The URL should contain the ID only once and point to the correct resource.

Actual behavior

When the resource is accessed directly, the ID is included twice in the URL.

How to Reproduce?

  • Run Keycloak with the experimental scim feature
  • Create a realm
  • Enable the scim api
  • Create a group
  • Query all groups
  • Query the specific group

Anything else?

No response

Guida contributor