Process value received from jwt-role-claim-key #4060
-
In a project were we currently work on and use PostgREST 12.2 and PostgreSQL 17 we receive the role in a "weird" format from the clients IDP. I see that the supported formats are either What would be the appropriate way to only use the first part until the first ","? Would the recent addition of #3813 help us here? Do we need to use db-pre-request and process the value "manually" for each request? Thank you in advance for any hint! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@yobottehg Can you share which service sends that string? Would like to know how generally useful would be adding this capability. I don't think #3813 is enough, but maybe @taimoorzaeem can clarify? |
Beta Was this translation helpful? Give feedback.
-
The client uses Ping identity as a facade for their active directory. I guess these "a=b, c=d, ..." entries are coming from the AD. In the mean while we requested the client to adapt the output to omit these params and everything is working now. |
Beta Was this translation helpful? Give feedback.
We support roles given in a JSON format and
jwt-role-claim-key
just extracts the role from the JSON. #3813 just provides a feature in which we compare the strings in JSON list when extracting role throughjwt-role-claim-key
. I am not familiar with the "weird" format above. @yobottehg Could you share more about the format perhaps we can find some workaround?