From 1e5efc87160c129aede961c1e842485c11a5d627 Mon Sep 17 00:00:00 2001 From: Jean-Michel Crepel Date: Wed, 22 Jan 2025 10:15:19 +0100 Subject: [PATCH] add config for sp and gateway to reach maelstro-frontend --- georchestra/.envs-hosts | 1 + ...d-security-proxy-config-to-host-mael.patch | 49 ++++++++++++------- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/georchestra/.envs-hosts b/georchestra/.envs-hosts index ea11b68..e41bb34 100644 --- a/georchestra/.envs-hosts +++ b/georchestra/.envs-hosts @@ -22,3 +22,4 @@ CONSOLE_URL=http://${CONSOLE_HOST}:8080 ELASTICSEARCH_HOSTS=http://${ES_HOST}:${ES_PORT} MAELSTRO_HOST=maelstro-back +MAELSTRO_FRONT_HOST=maelstro-front diff --git a/georchestra/0001-tweat-gateway-and-security-proxy-config-to-host-mael.patch b/georchestra/0001-tweat-gateway-and-security-proxy-config-to-host-mael.patch index 441c066..86e5a44 100644 --- a/georchestra/0001-tweat-gateway-and-security-proxy-config-to-host-mael.patch +++ b/georchestra/0001-tweat-gateway-and-security-proxy-config-to-host-mael.patch @@ -1,22 +1,22 @@ -From 7ffbad4355f6064cca15d2af234886c3b9cbdae3 Mon Sep 17 00:00:00 2001 +From 190d88ace0d5a4c40b986ba2a92b44edea7e6f40 Mon Sep 17 00:00:00 2001 From: Jean-Michel Crepel -Date: Tue, 21 Jan 2025 10:17:24 +0100 +Date: Wed, 22 Jan 2025 10:14:15 +0100 Subject: [PATCH] tweat gateway and security-proxy config to host maelstro backend service --- - gateway/gateway.yaml | 7 +++++++ - gateway/routes.yaml | 10 +++++++++- - security-proxy/security-mappings.xml | 1 + + gateway/gateway.yaml | 13 +++++++++++++ + gateway/routes.yaml | 16 +++++++++++++++- + security-proxy/security-mappings.xml | 2 ++ security-proxy/security-proxy.properties | 2 +- - security-proxy/targets-mapping.properties | 1 + - 5 files changed, 19 insertions(+), 2 deletions(-) + security-proxy/targets-mapping.properties | 2 ++ + 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/gateway/gateway.yaml b/gateway/gateway.yaml -index 607a7f9..18bc18d 100644 +index 607a7f9..d42d129 100644 --- a/gateway/gateway.yaml +++ b/gateway/gateway.yaml -@@ -84,3 +84,10 @@ georchestra: +@@ -84,3 +84,16 @@ georchestra: json-user: true geoserver: target: ${georchestra.gateway.services.geoserver.target} @@ -26,9 +26,15 @@ index 607a7f9..18bc18d 100644 + - intercept-url: /maelstro-backend/** + anonymous: false + allowed-roles: MAELSTRO ++ maelstro: ++ target: ${georchestra.gateway.services.maelstro.target} ++ access-rules: ++ - intercept-url: /maelstro/** ++ anonymous: false ++ allowed-roles: MAELSTRO + diff --git a/gateway/routes.yaml b/gateway/routes.yaml -index 86c25b9..3ca3c2f 100644 +index 86c25b9..884300a 100644 --- a/gateway/routes.yaml +++ b/gateway/routes.yaml @@ -10,7 +10,7 @@ spring: @@ -40,7 +46,7 @@ index 86c25b9..3ca3c2f 100644 - id: header uri: ${georchestra.gateway.services.header.target} predicates: -@@ -59,6 +59,13 @@ spring: +@@ -59,6 +59,18 @@ spring: uri: ${georchestra.gateway.services.ogc-api-records.target} predicates: - Path=/ogc-api-records/** @@ -50,24 +56,32 @@ index 86c25b9..3ca3c2f 100644 + - Path=/maelstro-backend/** + filters: + - RewritePath=/maelstro-backend/(?.*),/$\{segment} -+ ++ - id: maelstro ++ uri: ${georchestra.gateway.services.maelstro.target} ++ predicates: ++ - Path=/maelstro/** ++ filters: ++ - RewritePath=/maelstro/(?.*),/$\{segment} georchestra.gateway.services: console.target: http://${CONSOLE_HOST}:8080/console/ -@@ -71,3 +78,4 @@ georchestra.gateway.services: +@@ -71,3 +83,5 @@ georchestra.gateway.services: import.target: http://${IMPORT_HOST}:80/ mapstore.target: http://${MAPSTORE_HOST}:8080/mapstore/ ogc-api-records.target: http://${OGC_API_RECORDS_HOST}:8080/ogc-api-records/ + maelstro-back.target: http://${MAELSTRO_HOST}:8000/ ++ maelstro.target: http://${MAELSTRO_FRONT_HOST}:8080/ +\ No newline at end of file diff --git a/security-proxy/security-mappings.xml b/security-proxy/security-mappings.xml -index 72274be..ab6dff0 100644 +index 72274be..f43fba1 100644 --- a/security-proxy/security-mappings.xml +++ b/security-proxy/security-mappings.xml -@@ -31,5 +31,6 @@ +@@ -31,5 +31,7 @@ + ++ diff --git a/security-proxy/security-proxy.properties b/security-proxy/security-proxy.properties @@ -84,14 +98,15 @@ index d42ef7a..6a23907 100644 # Connection pool settings for the logger appender that inserts OGC request stats on the database diff --git a/security-proxy/targets-mapping.properties b/security-proxy/targets-mapping.properties -index 1bccb4f..eadd82b 100644 +index 1bccb4f..75d71f8 100644 --- a/security-proxy/targets-mapping.properties +++ b/security-proxy/targets-mapping.properties -@@ -9,3 +9,4 @@ datafeeder=http://${DATAFEEDER_HOST}:8080/datafeeder/ +@@ -9,3 +9,5 @@ datafeeder=http://${DATAFEEDER_HOST}:8080/datafeeder/ import=http://${IMPORT_HOST}:80/ datahub=http://${DATAHUB_HOST}:80/datahub/ ogc-api-records=http://${OGC_API_RECORDS_HOST}:8080/ogc-api-records/ +maelstro-backend=http://${MAELSTRO_HOST}:8000/ ++maelstro=http://${MAELSTRO_FRONT_HOST}:8080/ \ No newline at end of file -- 2.34.1