-
Hi all, I've got a question regarding UMA RPT tokens: According to the UMA specification it is possible to include multiple permissions in one RPT. In order to do so, the permission ticket request (using /host/rsrc_pr) should contain multiple resources. However, if I do this in Janssen, only one of the specified resources is included in the final RPT. Is is possible at all to have multiple permissions in one RPT or does Janssen not support this functionality? Here are my requests:
Response:
However, my expected response to the last request would be smth like this (both resources listed under permissions):
I also verified that the specified user is permitted to use both ressources by doing two seperate requests including only one permission. This is working as expected. Only when asking for two permissions in one single request I am experiencing the described unexpected behaviour. Therefore my question: Is this intended behaviour or am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 18 replies
-
Welcome @siedlejo to the Janssen discussions. Adding @yuriyz for comments. |
Beta Was this translation helpful? Give feedback.
-
AS authorizes all permissions associated with the ticket. So in scenario described above if permissions are valid both has to be present in RPT introspection. You can see how it's added here Is it possible that the other permission is expired? When RPT introspection response is build, AS filters out invalid permissions. See this line. If permission is not valid AS prints logs about it as you can see from link above. To better understand what is going on, the best is :
|
Beta Was this translation helpful? Give feedback.
-
I also got another issue. I tried to change the "sub" value in the generated access tokens to the name of the requesting user. In order to do so, I set the property value "openidSubAttribute" to "givenName". However, the value in the generated JWT token does not change at all. I also tried other values for the property such as "uid" or "inum" but the result I get is always the same string (which btw seems to be random to me). Maybe I should also mention that I installed Janssen following the docker compose installation instructions (https://docs.jans.io/v1.0.16/admin/install/docker-install/compose/) which reference the following docker image ghcr.io/janssenproject/jans/monolith:1.0.14_dev. Just to be sure that this is not an issue caused by a deprecated version. Here is an excerpt of the decoded payload of my access token:
|
Beta Was this translation helpful? Give feedback.
-
@yuriyz One last question: I want to include the 'sub' claim in the RPT as well. I have found the option to add an "UMA RPT Claims" script but I cannot find any documentation about how this script should look like. I have also seen the field 'RPT Modification Script' in the client settings under 'CIBA/PAT/UMA/' (in TUI). I guess this can be used to reference the RPT Modification Script. Can you tell me if there is any documentation or examples about how to do add the sub claim to the resulting RPT |
Beta Was this translation helpful? Give feedback.
-
UMA does not have a ton of adoption. I'd be curious to hear the use case. Or is this just academic? |
Beta Was this translation helpful? Give feedback.
Hmm, request looks good to me. It must be bug. As workaround simply run it one by one.
Opened bug report to invetigate and fix #5814