Skip to content

Commit

Permalink
fix that in Helm config jwtOnly=false will enabled pre-authenticati…
Browse files Browse the repository at this point in the history
…on in Ditto

* was not done by default before, so would have to be activated by default

Signed-off-by: Thomas Jäckle <thomas.jaeckle@beyonnex.io>
  • Loading branch information
thjaeckle committed Jul 19, 2023
1 parent 022dffe commit 4070aad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deployment/helm/ditto/templates/gateway-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deployment/helm/ditto/templates/swaggerui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4070aad

Please sign in to comment.