{"action":"opened","issue":{"url":"https://api.github.com/repos/pac4j/pac4j/issues/1145","repository_url":"https://api.github.com/repos/pac4j/pac4j","labels_url":"https://api.github.com/repos/pac4j/pac4j/issues/1145/labels{/name}","comments_url":"https://api.github.com/repos/pac4j/pac4j/issues/1145/comments","events_url":"https://api.github.com/repos/pac4j/pac4j/issues/1145/events","html_url":"https://github.com/pac4j/pac4j/issues/1145","id":331494345,"node_id":"MDU6SXNzdWUzMzE0OTQzNDU=","number":1145,"title":"SAML2 and multiple roles","user":{"login":"lrozenblyum","id":1285898,"node_id":"MDQ6VXNlcjEyODU4OTg=","avatar_url":"https://avatars0.githubusercontent.com/u/1285898?v=4","gravatar_id":"","url":"https://api.github.com/users/lrozenblyum","html_url":"https://github.com/lrozenblyum","followers_url":"https://api.github.com/users/lrozenblyum/followers","following_url":"https://api.github.com/users/lrozenblyum/following{/other_user}","gists_url":"https://api.github.com/users/lrozenblyum/gists{/gist_id}","starred_url":"https://api.github.com/users/lrozenblyum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrozenblyum/subscriptions","organizations_url":"https://api.github.com/users/lrozenblyum/orgs","repos_url":"https://api.github.com/users/lrozenblyum/repos","events_url":"https://api.github.com/users/lrozenblyum/events{/privacy}","received_events_url":"https://api.github.com/users/lrozenblyum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-12T08:48:54Z","updated_at":"2018-06-12T08:48:54Z","closed_at":null,"author_association":"NONE","body":"SCENARIO:\r\nI'm using SAML2 (with combination with spring security), with keycloak as identity provider.\r\nThe user has multiple roles.\r\n\r\nEXPECTED:\r\nSAML2Profile contains multiple roles in the attribute 'Role'\r\n\r\nACTUALLY:\r\nSAML2Profile contains just a single role in the attribute 'Role'.\r\n\r\nCode reasons:\r\nSAML2Credentials receive multiple attributes for the Role\r\n\r\nso e.g.\r\nAttribute1: Role -> Value1\r\nAttribute2: Role -> Value2\r\n\r\nCode in SAML2Authenticator calls  getProfileDefinition().convertAndAdd which in turn - overwrites the value in the org.pac4j.core.profile.UserProfile.attributes field.\r\n\r\nSo just the last role is accessible."}}
{"actor":{"display_login":"lrozenblyum"}}