From debef2b479f1283b69bde9aba994f70fef57db73 Mon Sep 17 00:00:00 2001 From: "m.lettere" Date: Wed, 30 Jun 2021 16:37:40 +0200 Subject: [PATCH] need first to authorize on d4science realm --- .../add_all_system_services_to_vre.json.j2 | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/templates/add_all_system_services_to_vre.json.j2 b/templates/add_all_system_services_to_vre.json.j2 index 4d1a102..984d591 100644 --- a/templates/add_all_system_services_to_vre.json.j2 +++ b/templates/add_all_system_services_to_vre.json.j2 @@ -20,17 +20,17 @@ }, { "name" : "pyrest", - "taskReferenceName" : "authorize", + "taskReferenceName" : "authorize_on_realm", "type" : "SIMPLE", "inputParameters" : { - "url" : "{{ keycloak }}/master/protocol/openid-connect/token", + "url" : "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token", "method" : "POST", "headers" : { "Accept" : "application/json" }, "body" : { "client_id" : "orchestrator", - "client_secret" : "{{ keycloak_auth_master }}", + "client_secret" : "{{ keycloak_auth }}", "grant_type" : "client_credentials" } } @@ -47,6 +47,23 @@ "Authorization" : "Bearer ${authorize.output.body.access_token}" } } - } + }, + { + "name" : "pyrest", + "taskReferenceName" : "authorize", + "type" : "SIMPLE", + "inputParameters" : { + "url" : "{{ keycloak }}/master/protocol/openid-connect/token", + "method" : "POST", + "headers" : { + "Accept" : "application/json" + }, + "body" : { + "client_id" : "orchestrator", + "client_secret" : "{{ keycloak_auth_master }}", + "grant_type" : "client_credentials" + } + } + }, ] }