A resource server expects the groups
payload key inside the default WSO2 Identity Server JWT payload to be name roles
.
Current JWT response:
{
"at_hash": "SCqDJuV0gnNvb7r_IeI47Q",
"aud": "yfzRO7vHWHI76bN68a5ZqgczxlQa",
"c_hash": "gIKRlznsEe17AQ5GQoOfZg",
"sub": "admin",
"nbf": 1663741604,
"azp": "yfzRO7vHWHI76bN68a5ZqgczxlQa",
"amr": [
"BasicAuthenticator"
],
"iss": "https://identity.myorg.co.za/oauth2/token",
"groups": [
"Internal/admin",
"Internal/everyone",
"es:write:parties",
"Application/My Account",
"admin"
],
"exp": 1663745204,
"iat": 1663741604
}
I have tried the following:
Nothing seems to change it.
Is it possible to change the payload using configuration, or is a custom JWT generator needed.
I was able to achieve this with the following way.
roles
and mapped it into groups claim.Not sure whether this approach is correct. But it works. NOTE: Tried this with the IS 6.0.0 new console since it is very easier than the previous carbon console.