hook Member role of new VRE to Infrastructure-Member composite

This commit is contained in:
Marco Lettere 2021-11-02 11:30:38 +01:00
parent e37091f43d
commit caaf863f73
2 changed files with 59 additions and 13 deletions

View File

@ -222,6 +222,29 @@
}
}
},
{
"name": "jq_1",
"taskReferenceName": "to_array",
"type": "JSON_JQ_TRANSFORM",
"inputParameters": {
"role": "${get_back_role_member.output.body}",
"queryExpression" : "."
}
},
{
"name" : "pyrest",
"taskReferenceName" : "add_role_member_as_component_of_infrastructure_member",
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${init.input.keycloak_admin}/roles/Infrastructure-Member/composites",
"method" : "POST",
"headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}",
"Accept" : "application/json"
},
"body" : "${to_array.output.resultList}"
}
},
{
"name" : "pyrest",
"taskReferenceName" : "create_role_policy_member",

View File

@ -95,6 +95,29 @@
"Authorization" : "Bearer ${authorize.output.body.access_token}"
}
}
},
{
"name" : "pyrest",
"taskReferenceName" : "list_realm_components",
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${init.input.keycloak_admin}/components",
"method" : "GET",
"headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}",
"Accept" : "application/json"
}
}
},
{
"name": "LAMBDA_TASK",
"taskReferenceName": "find_component_by_type",
"type": "LAMBDA",
"inputParameters": {
"path" : "${init.output.result}",
"components" : "${list_realm_components}",
"scriptExpression": ""
}
},
]
}