Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.4.6, 3.5.1
-
None
-
Unknown
Description
The JwtTokenSecurityContext class expects a tokenized string for the role claim. If the JWT contains an array of strings to represent the roles the role claim is incorrectly parsed.
The following line shows that it always first tokenize the array:
Here is a snippet of the sample JWT:
{{{}}
"sub": "myid",
"jti": "f42150ef-2743-4ca0-ae06-a23b307edaca",
"iss": "STS INT",
"roles": [
"READ",
"UPDATE"
],
"iat": 1649079679,
"nbf": 1649079679,
"exp": 1649086879,
"aud": [
"urn:mycompany:application:foo"
]
}
I propose to improve this logic thus both roles in tokenized string as well as a propery array list are properly parsed.
Here a snippet of the debugger. The above example ends-up with two roles "[READ" and " UPDATE]".
Attachments
Attachments
Issue Links
- links to