wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
744 stars 723 forks source link

SCIM2 roles attribute should be a multi valued attribute. #5283

Open IsuraD opened 5 years ago

IsuraD commented 5 years ago

SCIM2 roles attribute should be a multi-valued attribute [1]. Currently, it returns as a command separated string.

{
   "Resources" : [
      {
         "roles" : [
            {
               "value" : "Internal/everyone,admin",
               "type" : "default"
            }
         ],
         "name" : {
            "familyName" : "admin",
            "givenName" : "admin"
         },
         "meta" : {
            "lastModified" : "2019-05-13T16:11:48Z",
            "created" : "2019-05-13T16:11:48Z"
         },
         "emails" : [
            {
               "value" : "admin@wso2.com",
               "type" : "work"
            }
         ],
         "id" : "9b9631dc-5be6-42d0-acc2-45afecbc6887",
         "groups" : [
            {
               "value" : "2327fe53-7e44-43c6-8752-92d4ab944e9d",
               "display" : "PRIMARY/admin"
            }
         ],
         "userName" : "admin"
      }
   ],
   "totalResults" : 1,
   "schemas" : [
      "urn:ietf:params:scim:api:messages:2.0:ListResponse"
   ],
   "startIndex" : 1,
   "itemsPerPage" : 1
} 

[1] https://tools.ietf.org/html/rfc7643#section-4.1.2

hauntingEcho commented 5 years ago

the command to reproduce is curl -k -u admin:admin https://localhost:9443/scim2/Users