diff --git a/templates/group_created.json.j2 b/templates/group_created.json.j2 index 29b1e64..ee979b9 100644 --- a/templates/group_created.json.j2 +++ b/templates/group_created.json.j2 @@ -74,6 +74,27 @@ } } }, + { + "name": "LAMBDA_TASK", + "taskReferenceName": "extract_client_id", + "type": "LAMBDA", + "inputParameters": { + "client_location" : "${create_client.output.headers.location}", + "scriptExpression": "var client_id = $.client_location.split('/').pop(); return {'client_id' : client_id}" + }, + { + "name" : "pyrest", + "taskReferenceName" : "get_default_policies", + "type" : "SIMPLE", + "inputParameters" : { + "url" : "${init.input.keycloak_admin}/clients/${extract_client_id.result.client_id}/authz/policy", + "method" : "GET", + "headers" : { + "Authorization" : "Bearer ${authorize.output.body.access_token}", + "Accept" : "application/json" + } + } + }, { "name" : "fork_join", "taskReferenceName" : "fork_role_creation",