added workspace check

This commit is contained in:
Marco Lettere 2021-11-22 17:10:19 +01:00
parent 88868587e5
commit 13c8d6ee44
1 changed files with 35 additions and 0 deletions

View File

@ -15,6 +15,9 @@
"root_vo": "{{ root_vo }}", "root_vo": "{{ root_vo }}",
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}", "keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}", "keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
"storagehub" : "{{ storagehub }}",
"workspace" : "{{ workspace }}",
"workspace_group" : "{{ workspace_group }}",
"id" : "${workflow.input.client_id}", "id" : "${workflow.input.client_id}",
"secret" : "${workflow.input.client_secret}", "secret" : "${workflow.input.client_secret}",
"description" : "${workflow.input.description}", "description" : "${workflow.input.description}",
@ -144,6 +147,38 @@
}, },
"body" : "${to_array.output.resultList}" "body" : "${to_array.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",
"Authorization" : "Bearer ${authorize_on_realm.output.body.access_token}"
},
"body" : {
"audience" : "${init.input.root_vo}",
"grant_type" : "urn:ietf:params:oauth:grant-type:uma-ticket",
"client_id" : "${workflow.input.client_id}",
"client_secret" : "${init.output.result.client_secret}"
}
}
},
{
"name" : "pyrest",
"taskReferenceName" : "check_workspace",
"type" : "SIMPLE",
"inputParameters" : {
"url" : "${init.input.storagehub}/workspace",
"method" : "GET",
"headers" : {
"Accept" : "application/json",
"Authorization" : "Bearer ${authorize_with_uma_rpt.output.body.access_token}"
}
}
} }
] ]
} }