diff --git a/templates/add_workspace_client_to_context.json.j2 b/templates/add_workspace_client_to_context.json.j2 index 2761bc0..65beed7 100644 --- a/templates/add_workspace_client_to_context.json.j2 +++ b/templates/add_workspace_client_to_context.json.j2 @@ -162,6 +162,40 @@ }, "body" : "${roles_to_assign.output.resultList}" } + }, + { + "name" : "pyrest", + "taskReferenceName" : "authorize_with_uma_rpt", + "type" : "SIMPLE", + "inputParameters" : { + "url" : "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token", + "method" : "POST", + "headers" : { + "Accept" : "application/json" + }, + "body" : { + "audience" : "${init.input.root_vo}", + "grant_type" : "urn:ietf:params:oauth:grant-type:uma-ticket", + "client_id" : "orchestrator", + "client_secret" : "{{ keycloak_auth_master }}", + } + } + }, + { + "name" : "pyrest", + "taskReferenceName" : "workspace_to_vre_folder", + "type" : "SIMPLE", + "inputParameters" : { + "url" : "${init.input.storagehub}/workspace/groups/${shubify_context_name.output.result.shubified_context_name}/users", + "method" : "PUT", + "body" : { + "userId" : "${get_service_account_user.output.body.username}" + }, + "headers" : { + "Accept" : "application/json", + "Authorization" : "Bearer ${authorize_with_uma_rpt.output.body.access_token}" + } + } } ] }