From 4070aad398470a61157e8933d25ed583df5ffc80 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/templates/gateway-deployment.yaml | 2 +- deployment/helm/ditto/templates/swaggerui-deployment.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/helm/ditto/templates/gateway-deployment.yaml b/deployment/helm/ditto/templates/gateway-deployment.yaml index 51f6536124d..7e280225575 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 e6854da2dfa..360e13fcb24 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