added queries to IC proxy
This commit is contained in:
parent
517ced19c6
commit
ce66259343
|
@ -11,9 +11,10 @@
|
|||
"inputParameters": {
|
||||
"base_url": "{{is_url}}/resource-registry/contexts",
|
||||
"root_vo": "{{ root_vo }}",
|
||||
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||
"ctx": "${workflow.input.context}",
|
||||
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||
"ctx": "${workflow.input.context}",
|
||||
"ic_proxy" : "{{ ic_proxy }}",
|
||||
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))} if(e($.ctx)) throw('Context must not be empty'); var tree = $.ctx.split('%2F'); return { child : tree[tree.length - 1], parent : tree[tree.length-2], decoded_root_vo : $.root_vo.replace('%2F', '/') }"
|
||||
},
|
||||
"type": "LAMBDA",
|
||||
|
@ -27,21 +28,100 @@
|
|||
"asyncComplete": false,
|
||||
"loopOver": []
|
||||
},
|
||||
{
|
||||
"name" : "parallel_ic_proxy_queries",
|
||||
"taskReferenceName" : "parallel_ic_proxy_queries",
|
||||
"type" : "FORK_JOIN",
|
||||
"forkTasks" : [
|
||||
[
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "authorize_uma_rootvo",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak}/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 }}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "retrieve_infrastructure",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "{{ ic_proxy }}/icproxy/gcube/service/GenericResource/INFRASTRUCTURE",
|
||||
"method" : "GET",
|
||||
"headers" : {
|
||||
"Accept" : "application/xml",
|
||||
"Authorization" : "Bearer ${authorize_uma_rootvo.output.body.access_token}"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "authorize_uma_paarent_vo",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak}/protocol/openid-connect/token",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Accept" : "application/json"
|
||||
},
|
||||
"body" : {
|
||||
"audience" : "${init.input.root_vo}%2F${init.output.result.parent}",
|
||||
"grant_type" : "urn:ietf:params:oauth:grant-type:uma-ticket",
|
||||
"client_id" : "orchestrator",
|
||||
"client_secret" : "{{ keycloak_auth }}"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "retrieve_parent_vo",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "{{ ic_proxy }}/icproxy/gcube/service/GenericResource/VRE/${init.output.result.child}",
|
||||
"method" : "GET",
|
||||
"headers" : {
|
||||
"Accept" : "application/xml",
|
||||
"Authorization" : "Bearer ${authorize_uma_rootvo.output.body.access_token}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "notification_join",
|
||||
"taskReferenceName": "notification_join_ref",
|
||||
"type": "JOIN",
|
||||
"joinOn": ["retrieve_root_vo", "retrieve_parent_vo"]
|
||||
},
|
||||
{
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "authorize",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Accept" : "application/json"
|
||||
},
|
||||
"body" : {
|
||||
"client_id" : "orchestrator",
|
||||
"client_secret" : "{{ keycloak_auth }}",
|
||||
"grant_type" : "client_credentials"
|
||||
}
|
||||
"url" : "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Accept" : "application/json"
|
||||
},
|
||||
"body" : {
|
||||
"client_id" : "orchestrator",
|
||||
"client_secret" : "{{ keycloak_auth }}",
|
||||
"grant_type" : "client_credentials"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue