fix encoding of rootvo

This commit is contained in:
Marco Lettere 2021-10-13 15:20:35 +02:00
parent 41c7ead616
commit bd5f59d5c9
2 changed files with 19 additions and 17 deletions

View File

@ -1,21 +1,21 @@
--- ---
workflows: workflows:
- create-user-add-to-vre # - create-user-add-to-vre
- group_deleted # - group_deleted
- user-group_created # - user-group_created
- user-group-role_created # - user-group-role_created
- group_created # - group_created
- invitation-accepted # - invitation-accepted
- user-group_deleted # - user-group_deleted
- user-group-role_deleted # - user-group-role_deleted
- delete-user-account - delete-user-account
- role_deleted # - role_deleted
- role_created # - role_created
- add_role_policy_permission # - add_role_policy_permission
- add_all_member_roles # - add_all_member_roles
- create_system_service # - create_system_service
- delete_system_service # - delete_system_service
- add_all_system_services_to_vre # - add_all_system_services_to_vre
keycloak_host: "https://accounts.dev.d4science.org/auth" keycloak_host: "https://accounts.dev.d4science.org/auth"
keycloak: "{{ keycloak_host }}/realms" keycloak: "{{ keycloak_host }}/realms"
keycloak_realm: "d4science" keycloak_realm: "d4science"

View File

@ -18,7 +18,7 @@
"liferay": "{{ liferay }}", "liferay": "{{ liferay }}",
"liferay_auth": "{{ liferay_auth }}", "liferay_auth": "{{ liferay_auth }}",
"keycloak_userid" : "${workflow.input.userid}", "keycloak_userid" : "${workflow.input.userid}",
"scriptExpression": "return { 'decoded_root_vo' : $.root_vo.replace('%2F','/')}" "scriptExpression": "return { 'decoded_root_vo' : $.root_vo.replace('%2F','/'), 'encoded_root_vo' : encodeURIComponent($.root_vo)}"
} }
}, },
{ {
@ -163,7 +163,7 @@
"taskReferenceName" : "get_rootvo", "taskReferenceName" : "get_rootvo",
"type" : "SIMPLE", "type" : "SIMPLE",
"inputParameters" : { "inputParameters" : {
"url" : "${init.input.keycloak_admin}/clients?clientId=${init.input.root_vo}", "url" : "${init.input.keycloak_admin}/clients?clientId=${init.output.result.encoded_root_vo}",
"method" : "GET", "method" : "GET",
"headers" : { "headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}", "Authorization" : "Bearer ${authorize.output.body.access_token}",
@ -178,6 +178,7 @@
"inputParameters" : { "inputParameters" : {
"url" : "${init.input.keycloak_admin}/clients/${get_rootvo.output.body[0].id}/roles", "url" : "${init.input.keycloak_admin}/clients/${get_rootvo.output.body[0].id}/roles",
"method" : "GET", "method" : "GET",
"expect" : [200, 404],
"headers" : { "headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}", "Authorization" : "Bearer ${authorize.output.body.access_token}",
"Accept" : "application/json" "Accept" : "application/json"
@ -191,6 +192,7 @@
"inputParameters" : { "inputParameters" : {
"url" : "${init.input.keycloak_admin}/clients/${get_rootvo.output.body[0].id}/roles/Infrastructure-Manager/users", "url" : "${init.input.keycloak_admin}/clients/${get_rootvo.output.body[0].id}/roles/Infrastructure-Manager/users",
"method" : "GET", "method" : "GET",
"expect" : [200, 404],
"headers" : { "headers" : {
"Authorization" : "Bearer ${authorize.output.body.access_token}", "Authorization" : "Bearer ${authorize.output.body.access_token}",
"Accept" : "application/json" "Accept" : "application/json"