switched to dynamic fork
This commit is contained in:
parent
33b2df507e
commit
25bf4e537d
|
@ -12,6 +12,7 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
|
"root_vo": "{{ root_vo }}",
|
||||||
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"clientId" : "${workflow.input.group}",
|
"clientId" : "${workflow.input.group}",
|
||||||
|
@ -35,6 +36,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name" : "fork_join",
|
||||||
|
"taskReferenceName" : "preliminary_fork",
|
||||||
|
"type" : "FORK_JOIN",
|
||||||
|
"forkTasks" : [
|
||||||
|
[
|
||||||
{
|
{
|
||||||
"name" : "pyrest",
|
"name" : "pyrest",
|
||||||
"taskReferenceName" : "create_client",
|
"taskReferenceName" : "create_client",
|
||||||
|
@ -143,6 +150,43 @@
|
||||||
"Accept" : "application/json"
|
"Accept" : "application/json"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name" : "pyrest",
|
||||||
|
"taskReferenceName" : "get_rootvo",
|
||||||
|
"type" : "SIMPLE",
|
||||||
|
"inputParameters" : {
|
||||||
|
"url" : "${init.input.keycloak_admin}/clients?clientId=${workflow.input.root_vo}",
|
||||||
|
"method" : "GET",
|
||||||
|
"headers" : {
|
||||||
|
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
||||||
|
"Accept" : "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "pyrest",
|
||||||
|
"taskReferenceName" : "get_rootvo_roles",
|
||||||
|
"type" : "SIMPLE",
|
||||||
|
"inputParameters" : {
|
||||||
|
"url" : "${init.input.keycloak_admin}/clients/${get_rootvo.output.body[0].id}/roles",
|
||||||
|
"method" : "GET",
|
||||||
|
"headers" : {
|
||||||
|
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
||||||
|
"Accept" : "application/json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "join",
|
||||||
|
"type" : "JOIN",
|
||||||
|
"taskReferenceName" : "preliminary_fork_join",
|
||||||
|
"joinOn": [ "create_permission", "get_rootvo_roles"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "fork_join",
|
"name" : "fork_join",
|
||||||
|
@ -304,524 +348,29 @@
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name" : "pyrest",
|
"name": "LAMBDA_TASK",
|
||||||
"taskReferenceName" : "create_role_accountingmanager",
|
"taskReferenceName": "build_add_role_tasks",
|
||||||
"type" : "SIMPLE",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
"roles" : "${get_rootvo_roles.output.body[?(@.name != \"uma_protection\" && @.name != \"Member\")]}",
|
||||||
"body" : {
|
"scriptExpression": "inputs={},tasks=[];for(var i=0;i<$.roles.length;i++)r=$.roles[i],k='add-'+r.name,tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'create_'+k}),inputs['create_'+k]={url:'${create_client.output.headers.location}/roles',body:{clientRole:true,name:r.name,description:r.description},method:'POST',headers:{Authorization:'Bearer ${authorize.output.body.access_token}','Content-Type':'application/json'}},tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'get_back'+k}),inputs['get_back_'+k]={url:'${create_role_accountingmanager.output.headers.location}',method:'GET',headers:{Authorization:'Bearer ${authorize.output.body.access_token}',Accept:'application/json'}},tasks.push({name:'pyrest',type:'SIMPLE',taskReferenceName:'create_role_policy_'+k}),inputs['create_role_policy_'+k]={url:'${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role',body:{name:r.name+'_policy',description:'',type:'role',logic:'POSITIVE',decisionStrategy:'UNANIMOUS',roles:[{id:r.id,required:true}]},method:'POST',headers:{Authorization:'Basic ${init.input.liferay_auth}',Accept:'application/json'}};return {tasks:Java.to(tasks,'java.util.Map[]'),inputs:inputs};"
|
||||||
"clientRole" : true, "name" : "Accounting-Manager", "description" : "Accounting-Manager for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "pyrest",
|
"name" : "fork_dynamic",
|
||||||
"taskReferenceName" : "get_back_role_accountingmanager",
|
"type" : "FORK_JOIN_DYNAMIC",
|
||||||
"type" : "SIMPLE",
|
"taskReferenceName" : "parallel_add_role",
|
||||||
"inputParameters" : {
|
"inputParameters" : {
|
||||||
"url" : "${create_role_accountingmanager.output.headers.location}",
|
"tasks" : "${build_add_role_tasks.output.result.tasks}",
|
||||||
"method" : "GET",
|
"inputs" : "${build_add_role_tasks.output.result.inputs}"
|
||||||
"headers" : {
|
},
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
"dynamicForkTasksParam": "tasks",
|
||||||
"Accept" : "application/json"
|
"dynamicForkTasksInputParamName": "inputs"
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name" : "pyrest",
|
"name" : "join",
|
||||||
"taskReferenceName" : "create_role_policy_accountingmanager",
|
"type" : "JOIN",
|
||||||
"type" : "SIMPLE",
|
"taskReferenceName" : "join_parallel_role_addition"
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "Accounting-Manager_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_accountingmanager.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_catalogueadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "Catalogue-Admin", "description" : "Catalogue-Admin for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_catalogueadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_catalogueadmin.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_catalogueadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "Catalogue-Admin_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_catalogueadmin.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_catalogueeditor",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "Catalogue-Editor", "description" : "Catalogue-Editor for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_catalogueeditor",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_catalogueeditor.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_catalogueeditor",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "Catalogue-Editor_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_catalogueeditor.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_datamanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "Data-Manager", "description" : "Data-Manager for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_datamanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_datamanager.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_datamanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "Data-Manager_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_datamanager.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_dataminermanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "Dataminer-Manager", "description" : "Dataminer-Manager for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_dataminermanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_dataminermanager.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_dataminermanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "DataMiner-Manager_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_dataminermanager.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_voadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "VO-Admin", "description" : "VO-Admin for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_voadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_voadmin.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_voadmin",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "VO-Admin_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_voadmin.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_vredesigner",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "VRE-Designer", "description" : "VRE-Designer for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_vredesigner",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_vredesigner.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_vredesigner",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "VRE-Designer_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_vredesigner.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_vremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "VRE-Manager", "description" : "VRE-Manager for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_vremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_vremanager.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_vremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "VRE-Manager_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_vremanager.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_infrastructuremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_client.output.headers.location}/roles",
|
|
||||||
"body" : {
|
|
||||||
"clientRole" : true, "name" : "Infrastructure-Manager", "description" : "Infrastructure-Manager for ${init.output.result.name}"
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "get_back_role_infrastructuremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${create_role_infrastructuremanager.output.headers.location}",
|
|
||||||
"method" : "GET",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name" : "pyrest",
|
|
||||||
"taskReferenceName" : "create_role_policy_infrastructuremanager",
|
|
||||||
"type" : "SIMPLE",
|
|
||||||
"inputParameters" : {
|
|
||||||
"url" : "${init.input.keycloak_admin}/clients/${extract_client_id.output.result.client_id}/authz/resource-server/policy/role",
|
|
||||||
"body" : {
|
|
||||||
"name": "Infrastructure-Manager_policy",
|
|
||||||
"description": "",
|
|
||||||
"type" : "role",
|
|
||||||
"logic": "POSITIVE",
|
|
||||||
"decisionStrategy": "UNANIMOUS",
|
|
||||||
"roles" : [
|
|
||||||
{
|
|
||||||
"id" : "${get_back_role_infrastructuremanager.output.body.id}",
|
|
||||||
"required" : true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"method" : "POST",
|
|
||||||
"headers" : {
|
|
||||||
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
||||||
"Content-Type" : "application/json",
|
|
||||||
"Accept" : "application/json"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -831,15 +380,7 @@
|
||||||
"taskReferenceName" : "join_role_creation",
|
"taskReferenceName" : "join_role_creation",
|
||||||
"type" : "JOIN",
|
"type" : "JOIN",
|
||||||
"joinOn" : [
|
"joinOn" : [
|
||||||
"create_role_policy_accountingmanager",
|
"join_parallel_role_addition",
|
||||||
"create_role_policy_catalogueadmin",
|
|
||||||
"create_role_policy_catalogueeditor",
|
|
||||||
"create_role_policy_datamanager",
|
|
||||||
"create_role_policy_dataminermanager",
|
|
||||||
"create_role_policy_voadmin",
|
|
||||||
"create_role_policy_vredesigner",
|
|
||||||
"create_role_policy_vremanager",
|
|
||||||
"create_role_policy_infrastructuremanager",
|
|
||||||
"assign_client_member_role_to_kc_group"
|
"assign_client_member_role_to_kc_group"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue