2021-10-07 15:50:57 +02:00
|
|
|
{
|
2021-10-07 18:54:25 +02:00
|
|
|
"ownerApp" : "Orchestrator",
|
2021-10-07 15:50:57 +02:00
|
|
|
"name" : "delete_system_service",
|
|
|
|
"createBy" : "Marco Lettere",
|
|
|
|
"description": "Delete a system service from KC and IS",
|
|
|
|
"version" : 1,
|
|
|
|
"ownerEmail" : "marco.lettere@nubisware.com",
|
|
|
|
"inputParameters" : ["client_id"],
|
|
|
|
"tasks" : [
|
|
|
|
{
|
|
|
|
"name": "LAMBDA_TASK",
|
|
|
|
"taskReferenceName": "init",
|
|
|
|
"type": "LAMBDA",
|
|
|
|
"inputParameters": {
|
|
|
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
2021-10-07 15:55:17 +02:00
|
|
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
|
|
|
"scriptExpression" : "1 == 1"
|
2021-10-07 15:50:57 +02:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name" : "pyrest",
|
|
|
|
"taskReferenceName" : "authorize",
|
|
|
|
"type" : "SIMPLE",
|
|
|
|
"inputParameters" : {
|
|
|
|
"url" : "${init.input.keycloak}/protocol/openid-connect/token",
|
|
|
|
"method" : "POST",
|
|
|
|
"headers" : {
|
|
|
|
"Accept" : "application/json"
|
|
|
|
},
|
|
|
|
"body" : {
|
|
|
|
"client_id" : "orchestrator",
|
|
|
|
"client_secret" : "{{ keycloak_auth }}",
|
|
|
|
"grant_type" : "client_credentials"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name" : "pyrest",
|
|
|
|
"taskReferenceName" : "lookup_client",
|
|
|
|
"type" : "SIMPLE",
|
|
|
|
"inputParameters" : {
|
|
|
|
"url" : "${init.input.keycloak_admin}/clients",
|
|
|
|
"params" : { "clientId" : "${workflow.input.client_id}"},
|
|
|
|
"method" : "GET",
|
|
|
|
"headers" : {
|
|
|
|
"Authorization" : "Bearer ${authorize.output.body.access_token}",
|
|
|
|
"Accept" : "application/json"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"name" : "pyrest",
|
|
|
|
"taskReferenceName" : "delete_client",
|
|
|
|
"type" : "SIMPLE",
|
|
|
|
"inputParameters" : {
|
|
|
|
"url" : "${init.input.keycloak_admin}/clients/${lookup_client.output.body[0].id}",
|
|
|
|
"method" : "DELETE",
|
|
|
|
"headers" : {
|
|
|
|
"Authorization" : "Bearer ${authorize.output.body.access_token}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|