diff --git a/src/main/java/jp/openstandia/connector/keycloak/rest/KeycloakAdminRESTClientRole.java b/src/main/java/jp/openstandia/connector/keycloak/rest/KeycloakAdminRESTClientRole.java index 945a69d..3c00f73 100644 --- a/src/main/java/jp/openstandia/connector/keycloak/rest/KeycloakAdminRESTClientRole.java +++ b/src/main/java/jp/openstandia/connector/keycloak/rest/KeycloakAdminRESTClientRole.java @@ -156,7 +156,16 @@ public void updateClientRole(KeycloakSchema schema, String realmName, Uid uid, S try { for (AttributeDelta delta : modifications) { if (delta.getName().equals(Name.NAME)) { - current.setName(AttributeDeltaUtil.getAsStringValue(delta)); + String name = AttributeDeltaUtil.getAsStringValue(delta); + String[] split = name.split("/"); + + if (split.length != 2) { + throw new InvalidAttributeValueException("Invalid clientRole name format." + + " It must be /. name: " + name); + } + + current.setContainerId(split[0]); + current.setName(split[1]); } else if (delta.getName().equals(ATTR_DESCRIPTION)) { current.setDescription(AttributeDeltaUtil.getStringValue(delta));