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