From 5e53f7c112d76c85571724aed7caee77e225fa51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20J=C3=A4ckle?= Date: Wed, 19 Jul 2023 10:41:49 +0200 Subject: [PATCH] fix that in Helm config `jwtOnly=false` will enabled pre-authentication in Ditto MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * was not done by default before, so would have to be activated by default Signed-off-by: Thomas Jäckle --- deployment/helm/ditto/Chart.yaml | 2 +- deployment/helm/ditto/templates/gateway-deployment.yaml | 2 +- deployment/helm/ditto/templates/swaggerui-deployment.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/helm/ditto/Chart.yaml b/deployment/helm/ditto/Chart.yaml index 69ec776958..247250d8f5 100644 --- a/deployment/helm/ditto/Chart.yaml +++ b/deployment/helm/ditto/Chart.yaml @@ -16,7 +16,7 @@ description: | A digital twin is a virtual, cloud based, representation of his real world counterpart (real world “Things”, e.g. devices like sensors, smart heating, connected cars, smart grids, EV charging stations etc). type: application -version: 3.3.4 # chart version is effectively set by release-job +version: 3.3.5 # chart version is effectively set by release-job appVersion: 3.3.4 keywords: - iot-chart diff --git a/deployment/helm/ditto/templates/gateway-deployment.yaml b/deployment/helm/ditto/templates/gateway-deployment.yaml index 51f6536124..7e28022557 100644 --- a/deployment/helm/ditto/templates/gateway-deployment.yaml +++ b/deployment/helm/ditto/templates/gateway-deployment.yaml @@ -154,7 +154,7 @@ spec: value: "{{ .Values.global.prometheus.port }}" {{- end }} - name: ENABLE_PRE_AUTHENTICATION - value: "{{ .Values.gateway.config.authentication.enablePreAuthentication }}" + value: "{{ or .Values.gateway.config.authentication.enablePreAuthentication (not .Values.global.jwtOnly) }}" - name: DEVOPS_SECURED value: "{{ .Values.gateway.config.authentication.devops.secured }}" - name: DEVOPS_AUTHENTICATION_METHOD diff --git a/deployment/helm/ditto/templates/swaggerui-deployment.yaml b/deployment/helm/ditto/templates/swaggerui-deployment.yaml index e6854da2df..360e13fcb2 100644 --- a/deployment/helm/ditto/templates/swaggerui-deployment.yaml +++ b/deployment/helm/ditto/templates/swaggerui-deployment.yaml @@ -59,7 +59,7 @@ spec: echo "removing Google auth from ditto-api-2.yml" sed --in-place "/- Google:/,+1d" /usr/share/nginx/html/openapi/ditto-api-2.yml sed --in-place "/ Google:/,+9d" /usr/share/nginx/html/openapi/ditto-api-2.yml - {{- if not .Values.gateway.config.authentication.enablePreAuthentication }} + {{- if or (not .Values.gateway.config.authentication.enablePreAuthentication) .Values.global.jwtOnly }} echo "removing NginxBasic auth from ditto-api-2.yml" sed --in-place "/- NginxBasic: \[]/d" /usr/share/nginx/html/openapi/ditto-api-2.yml sed --in-place "/ NginxBasic:/,+3d" /usr/share/nginx/html/openapi/ditto-api-2.yml