From 9e7741785722c2d6cac4dca621ac0a0deb09584d Mon Sep 17 00:00:00 2001 From: Ahmed yasser <26207361+1AhmedYasser@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:20:16 +0300 Subject: [PATCH] Fixed Data Mapper Host (#366) --- DSL/Ruuter/TEMPLATES/check-user-authority.yml | 10 ++++++---- constants.ini | 2 +- docker-compose.yml | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/DSL/Ruuter/TEMPLATES/check-user-authority.yml b/DSL/Ruuter/TEMPLATES/check-user-authority.yml index 7ee9d683..a335e50f 100644 --- a/DSL/Ruuter/TEMPLATES/check-user-authority.yml +++ b/DSL/Ruuter/TEMPLATES/check-user-authority.yml @@ -10,13 +10,15 @@ declaration: get_tara_info: template: tara requestType: templates - result: TARA + headers: + cookie: ${incoming.headers.cookie} + result: tara_res check_user_authority: switch: - - condition: ${TARA.response.body.authorities.includes("ROLE_ADMINISTRATOR")} + - condition: ${tara_res.authorities.includes("ROLE_ADMINISTRATOR")} next: return_authorized - - condition: ${TARA.response.body.authorities.includes("ROLE_SERVICE_MANAGER")} + - condition: ${tara_res.authorities.includes("ROLE_SERVICE_MANAGER")} next: return_authorized return_unauthorized: @@ -25,4 +27,4 @@ return_unauthorized: next: end return_authorized: - return: ${TARA.response.body} + return: ${tara_res} diff --git a/constants.ini b/constants.ini index b2fe7ba5..184f23a9 100644 --- a/constants.ini +++ b/constants.ini @@ -10,7 +10,7 @@ SERVICE_DOCKER_INT=http://host.docker.internal:8080 SERVICE_OPENSEARCH=http://opensearch:9200 -SERVICE_DMAPPER=http://data_mapper:3005 +SERVICE_DMAPPER=http://data-mapper:3005 SERVICE_TIM=http://tim:8085 diff --git a/docker-compose.yml b/docker-compose.yml index 9f1a8b53..442532fb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,9 @@ services: - application.DSL.processedFiletypes=.yml,.yaml,.tmp - application.openSearchConfiguration.url=http://host.docker.internal:9200 - application.openSearchConfiguration.index=ruuterlog + - application.logging.printStackTrace=true + - application.internalRequests.disabled=true + - application.internalRequests.allowedIPs=127.0.0.1 volumes: - ./DSL/Ruuter:/DSL - ./constants.ini:/app/constants.ini @@ -95,8 +98,8 @@ services: networks: - bykstack - data_mapper: - container_name: data_mapper + data-mapper: + container_name: data-mapper image: data-mapper environment: - PORT=3005 @@ -105,7 +108,6 @@ services: - ./DSL:/data - ./DSL/DMapper/hbs:/workspace/app/views/services - ./DSL/DMapper/js:/workspace/app/js/services - - ./DSL/DMapper/lib/helpers.js:/workspace/app/lib/helpers.js - ./secrets:/data/secrets ports: - 3005:3005