From ddc076021439c9215dd1cc4b4d0ffca004720bc1 Mon Sep 17 00:00:00 2001 From: Alex Grosu Date: Wed, 4 Dec 2024 12:06:30 +0200 Subject: [PATCH 1/6] Add trusted_domains env var --- charts/rs-server-station-secrets/templates/secret.yaml | 1 + charts/rs-server-station-secrets/values.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/charts/rs-server-station-secrets/templates/secret.yaml b/charts/rs-server-station-secrets/templates/secret.yaml index c5bbeac..05d79b2 100644 --- a/charts/rs-server-station-secrets/templates/secret.yaml +++ b/charts/rs-server-station-secrets/templates/secret.yaml @@ -33,4 +33,5 @@ data: RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__ID: {{ $value.authentication.client_id | b64enc | quote }} RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__SECRET: {{ $value.authentication.client_secret | b64enc | quote }} {{ if $value.authentication.authorization }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__AUTHORIZATION: {{ $value.authentication.authorization | b64enc | quote }}{{ end }} + {{ if $value.trusted_domains }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__TRUSTED_DOMAINS: {{ $value.trusted_domains | b64enc | quote }}{{ end }} {{- end }} diff --git a/charts/rs-server-station-secrets/values.yaml b/charts/rs-server-station-secrets/values.yaml index 22e0bbe..632fd10 100644 --- a/charts/rs-server-station-secrets/values.yaml +++ b/charts/rs-server-station-secrets/values.yaml @@ -35,6 +35,9 @@ app: client_id: client_id client_secret: client_secret authorization: Basic test + trusted_domains: + - trusted.domain1.eu + - trusted.domain2.eu adgs2: service: name: auxip From a9706c2f93cb6e53d29b15c123173659bfd61741 Mon Sep 17 00:00:00 2001 From: Julien Gaucher Date: Wed, 4 Dec 2024 14:51:14 +0100 Subject: [PATCH 2/6] feat: let eodag get the auth token --- charts/rs-server-adgs/values.yaml | 2 +- charts/rs-server-cadip/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rs-server-adgs/values.yaml b/charts/rs-server-adgs/values.yaml index 01b67f9..ac26743 100644 --- a/charts/rs-server-adgs/values.yaml +++ b/charts/rs-server-adgs/values.yaml @@ -38,7 +38,7 @@ app: eodagConfigFile: adgs_ws_config.yaml eodagConfigFileTokenModule: adgs_ws_config_token_module.yaml # -- The way the token for the external stations is loaded: own module or let eodag to do it (set it to false) - useTokenModule: true + useTokenModule: false station: adgs: endpoint: diff --git a/charts/rs-server-cadip/values.yaml b/charts/rs-server-cadip/values.yaml index 3bd9de5..afe6f69 100644 --- a/charts/rs-server-cadip/values.yaml +++ b/charts/rs-server-cadip/values.yaml @@ -38,7 +38,7 @@ app: eodagConfigFileTokenModule: cadip_ws_config_token_module.yaml # -- The method for loading the token for external stations: use the custom module or # -- allow EODAG to handle it (set it to false for EODAG). - useTokenModule: true + useTokenModule: false station: # -- CADIP station name cadip: From 391c738629ab8bf90b00e29f3647dcee4809ead0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Dec 2024 13:53:14 +0000 Subject: [PATCH 3/6] update Helm documentation --- charts/rs-server-adgs/README.md | 2 +- charts/rs-server-cadip/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rs-server-adgs/README.md b/charts/rs-server-adgs/README.md index 21c8a13..17548c3 100644 --- a/charts/rs-server-adgs/README.md +++ b/charts/rs-server-adgs/README.md @@ -24,7 +24,7 @@ RS SERVER ADGS | app.station.adgs2.endpoint.url | string | `"http://mockup-station-adgs2-svc.processing.svc.cluster.local:8080/Products"` | ADGS2 URL | | app.stationConfigFile | string | `"stations_cfg.json"` | Station configuration file for the application | | app.uacURL | string | `"http://apikeymanager.processing.svc.cluster.local:8000/auth/check_key"` | URL of the API Key Manager service | -| app.useTokenModule | bool | `true` | The way the token for the external stations is loaded: own module or let eodag to do it (set it to false) | +| app.useTokenModule | bool | `false` | The way the token for the external stations is loaded: own module or let eodag to do it (set it to false) | | app.workDir | string | `"/app"` | Working directory for the application | | auth.secret.cookie_secret | string | `""` | Random string used to encode cookie-based HTTP sessions in SessionMiddleware | | auth.secret.oidc_client_id | string | `""` | OIDC CLient ID | diff --git a/charts/rs-server-cadip/README.md b/charts/rs-server-cadip/README.md index 102345a..2b18db6 100644 --- a/charts/rs-server-cadip/README.md +++ b/charts/rs-server-cadip/README.md @@ -23,7 +23,7 @@ RS SERVER CADIP | app.station.cadip | object | `{"endpoint":{"url":{"odata":"http://mockup-station-cadip-cadip-svc.processing.svc.cluster.local:8080","token":"http://mockup-station-cadip-cadip-svc.processing.svc.cluster.local:8080/oauth2/token"}}}` | CADIP station name | | app.station.cadip.endpoint.url | object | `{"odata":"http://mockup-station-cadip-cadip-svc.processing.svc.cluster.local:8080","token":"http://mockup-station-cadip-cadip-svc.processing.svc.cluster.local:8080/oauth2/token"}` | CADIP station URL | | app.uacURL | string | `"http://apikeymanager.processing.svc.cluster.local:8000/auth/check_key"` | URL of the API Key Manager service | -| app.useTokenModule | bool | `true` | allow EODAG to handle it (set it to false for EODAG). | +| app.useTokenModule | bool | `false` | allow EODAG to handle it (set it to false for EODAG). | | app.workDir | string | `"/app"` | Working directory for the application | | auth.secret.cookie_secret | string | `""` | Random string used to encode cookie-based HTTP sessions in SessionMiddleware | | auth.secret.oidc_client_id | string | `""` | OIDC CLient ID | From 59dc37cfbf6ea4ecc4ed93ed53fdcb16f31b2e49 Mon Sep 17 00:00:00 2001 From: Alex Grosu Date: Wed, 4 Dec 2024 17:02:37 +0200 Subject: [PATCH 4/6] Fix the env var TRUSTEDDOMAINS --- charts/rs-server-station-secrets/templates/secret.yaml | 2 +- charts/rs-server-station-secrets/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/rs-server-station-secrets/templates/secret.yaml b/charts/rs-server-station-secrets/templates/secret.yaml index 05d79b2..ad7c2a1 100644 --- a/charts/rs-server-station-secrets/templates/secret.yaml +++ b/charts/rs-server-station-secrets/templates/secret.yaml @@ -33,5 +33,5 @@ data: RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__ID: {{ $value.authentication.client_id | b64enc | quote }} RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__SECRET: {{ $value.authentication.client_secret | b64enc | quote }} {{ if $value.authentication.authorization }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__AUTHORIZATION: {{ $value.authentication.authorization | b64enc | quote }}{{ end }} - {{ if $value.trusted_domains }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__TRUSTED_DOMAINS: {{ $value.trusted_domains | b64enc | quote }}{{ end }} + {{ if $value.trusteddomains | toJson }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__TRUSTEDDOMAINS: {{ (printf "[%s]" ($value.trusteddomains | join ", ")) | b64enc | quote}} {{ end }} {{- end }} diff --git a/charts/rs-server-station-secrets/values.yaml b/charts/rs-server-station-secrets/values.yaml index 632fd10..9a4768b 100644 --- a/charts/rs-server-station-secrets/values.yaml +++ b/charts/rs-server-station-secrets/values.yaml @@ -35,7 +35,7 @@ app: client_id: client_id client_secret: client_secret authorization: Basic test - trusted_domains: + trusteddomains: - trusted.domain1.eu - trusted.domain2.eu adgs2: From da5dc61ef921fa2faac7adabea63c9380ca8b778 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Dec 2024 15:03:52 +0000 Subject: [PATCH 5/6] update Helm documentation --- charts/rs-server-station-secrets/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/rs-server-station-secrets/README.md b/charts/rs-server-station-secrets/README.md index dd60382..cd174d0 100644 --- a/charts/rs-server-station-secrets/README.md +++ b/charts/rs-server-station-secrets/README.md @@ -26,6 +26,8 @@ RS SERVER STATION SECRETS | app.stations.adgs.domain | string | `"mockup-station-adgs-svc.processing.svc.cluster.local"` | | | app.stations.adgs.service.name | string | `"auxip"` | | | app.stations.adgs.service.url | string | `"http://mockup-station-adgs-svc.processing.svc.cluster.local:8080"` | | +| app.stations.adgs.trusteddomains[0] | string | `"trusted.domain1.eu"` | | +| app.stations.adgs.trusteddomains[1] | string | `"trusted.domain2.eu"` | | | app.stations.adgs2.authentication.auth_type | string | `"oauth2"` | | | app.stations.adgs2.authentication.authorization | string | `"Basic test"` | | | app.stations.adgs2.authentication.client_id | string | `"client_id"` | | From e6fabe169d2e077300d38e90823323cec3df0ed9 Mon Sep 17 00:00:00 2001 From: Alex Grosu Date: Wed, 4 Dec 2024 17:28:20 +0200 Subject: [PATCH 6/6] Remove toJson --- charts/rs-server-station-secrets/templates/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/rs-server-station-secrets/templates/secret.yaml b/charts/rs-server-station-secrets/templates/secret.yaml index ad7c2a1..ab0de99 100644 --- a/charts/rs-server-station-secrets/templates/secret.yaml +++ b/charts/rs-server-station-secrets/templates/secret.yaml @@ -33,5 +33,5 @@ data: RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__ID: {{ $value.authentication.client_id | b64enc | quote }} RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__CLIENT__SECRET: {{ $value.authentication.client_secret | b64enc | quote }} {{ if $value.authentication.authorization }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__AUTHENTICATION__AUTHORIZATION: {{ $value.authentication.authorization | b64enc | quote }}{{ end }} - {{ if $value.trusteddomains | toJson }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__TRUSTEDDOMAINS: {{ (printf "[%s]" ($value.trusteddomains | join ", ")) | b64enc | quote}} {{ end }} + {{ if $value.trusteddomains }}RSPY__TOKEN__{{ $value.service.name | upper }}__{{ $key | upper }}__TRUSTEDDOMAINS: {{ (printf "[%s]" ($value.trusteddomains | join ", ")) | b64enc | quote}} {{ end }} {{- end }}