From 0a916e2c50b7e6a7d7254af035e41476ebfb8b63 Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Thu, 1 Jul 2021 10:41:15 +0200 Subject: [PATCH] retrieve system_services' useraccounts from KC --- templates/add_all_system_services_to_vre.json.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/add_all_system_services_to_vre.json.j2 b/templates/add_all_system_services_to_vre.json.j2 index f3f2d5a..fa573fd 100644 --- a/templates/add_all_system_services_to_vre.json.j2 +++ b/templates/add_all_system_services_to_vre.json.j2 @@ -135,9 +135,9 @@ "taskReferenceName": "build_get_system_services_useraccount_tasks", "type": "LAMBDA", "inputParameters": { - "url" : "${${init.input.keycloak_admin}/clients", + "url" : "${init.input.keycloak_admin}/clients", "services" : "${join_parallel_build_member_roles_assignment_tasks.output..body.*.id}", - "scriptExpression": "inputs = {}, tasks = [];for (var i = 0; i < $.services.length; i++){s = $.services[i].id;tasks.push({name: 'pyrest',type: 'SIMPLE',taskReferenceName: 'get_system_service_useraccount' + i});inputs['get_system_service_useraccount' + i] = {url: $.url + '/' + s + '/service-account-user',method: 'GET',headers: {Authorization: 'Bearer ${authorize.output.body.access_token}', Accept: 'application/json'}}};return {tasks: Java.to(tasks, 'java.util.Map[]'),inputs: inputs};" + "scriptExpression": "inputs = {}, tasks = [];for (var i = 0; i < $.services.length; i++){s = $.services[i];tasks.push({name: 'pyrest',type: 'SIMPLE',taskReferenceName: 'get_system_service_useraccount' + i});inputs['get_system_service_useraccount' + i] = {url: $.url + '/' + s + '/service-account-user',method: 'GET',headers: {Authorization: 'Bearer ${authorize.output.body.access_token}', Accept: 'application/json'}}};return {tasks: Java.to(tasks, 'java.util.Map[]'),inputs: inputs};" } }, {