Skip to content

Commit

Permalink
Allow password authentication to be used with other authentication types
Browse files Browse the repository at this point in the history
When a Trino cluster is configured to work with multiple authentication types through server.config.authenticationType key (e.g PASSWORD,OAUTH2), the password-authenticator.properties key is not configured in coordinator configmap because its template expects that authenticationType must equals to 'PASSWORD'. This prevents password authentication type to work and cluster coordinator to start.
  • Loading branch information
florianMalbranque committed Jan 30, 2024
1 parent 2e09d21 commit 820d547
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/trino/templates/configmap-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ data:
{{ $configValue }}
{{- end }}

{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
{{- if contains "PASSWORD" .Values.server.config.authenticationType }}
password-authenticator.properties: |
password-authenticator.name=file
file.password-file={{ .Values.server.config.path }}/auth/password.db
Expand Down
4 changes: 2 additions & 2 deletions charts/trino/templates/deployment-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
configMap:
name: trino-resource-groups-volume-coordinator
{{- end }}
{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
{{- if contains "PASSWORD" .Values.server.config.authenticationType }}
- name: password-volume
secret:
{{- if and .Values.auth .Values.auth.passwordAuthSecret }}
Expand Down Expand Up @@ -126,7 +126,7 @@ spec:
- name: {{ .name }}
mountPath: {{ .path }}
{{- end }}
{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
{{- if contains "PASSWORD" .Values.server.config.authenticationType }}
- mountPath: {{ .Values.server.config.path }}/auth
name: password-volume
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/trino/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.server.config.authenticationType "PASSWORD" }}
{{- if contains "PASSWORD" .Values.server.config.authenticationType }}
{{- if .Values.auth.passwordAuth -}}
apiVersion: v1
kind: Secret
Expand Down

0 comments on commit 820d547

Please sign in to comment.