Details
-
Feature
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Current Situation
- When using the OIDC Identity Service, then JOC Cockpit expects the JSON response of an Identity Provider in OIDC standard format.
- Some users customize their Identity Provider to return extended JSON responses. Users would like JOC Cockpit to understand the JSON response and its extensions to the OIDC standard and to extract properties that are used for the mapping of OIDC groups and roles to JS7 roles.
Desired Behavior
- With the settings of an OIDC Identity Service configuration users can optionally specify a query that extracts the list of roles from the Identity Provider's response to an array of strings used for the mapping to JS7 roles.
- The jq, https://jqlang.org/ query language is offered for the purpose. JOC Cockpit makes use of the jackson-jq library that is available for some time with JS7 Agents and is used for example with JS7 - JITL REST API Jobs
Example
- Identity Provider response:
{ "first_name": "Andreas", "preferred_language": "en", "last_name": "", "given_name": "", "user_authorization": [ { "resource": "api.job-scheduler-api", "permissions": [ { "name": "JS7-ADMIN", "constraints": [] }, { "name": "JS7-USER", "constraints": [] } ] } ] } - jq query with OIDC Identity Service settings:
jq:[.user_authorization[] | select(.resource == "api.job-scheduler-api") | .permissions[].name] - resulting JSON of jq query:
[ "JS7-ADMIN", "JS7-VIEW" ]