From c047ba5afbe06f09df24ed21194ad1882f4800c1 Mon Sep 17 00:00:00 2001 From: MLenterman Date: Mon, 21 Oct 2024 15:20:45 +0200 Subject: [PATCH] fix: generate localUsers.yml from localUsers in values.yaml (#33) --- charts/ff-common/Chart.yaml | 2 +- charts/ff-common/templates/_configmap.env.yaml | 3 +++ charts/ff-common/templates/_configmap.tomcat-users.yaml | 4 ++++ charts/ff-common/templates/_container.yaml | 4 ++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/ff-common/Chart.yaml b/charts/ff-common/Chart.yaml index c573c5e..c1902f1 100644 --- a/charts/ff-common/Chart.yaml +++ b/charts/ff-common/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: ff-common description: ff-common chart building components and helpers for the Frank!Framework -version: 0.1.23 +version: 0.1.24 appVersion: "8.0" type: library home: https://frankframework.org diff --git a/charts/ff-common/templates/_configmap.env.yaml b/charts/ff-common/templates/_configmap.env.yaml index c5376f6..7d6df13 100644 --- a/charts/ff-common/templates/_configmap.env.yaml +++ b/charts/ff-common/templates/_configmap.env.yaml @@ -40,6 +40,9 @@ data: # Reverse proxy/ingress should be used for https application.security.http.transportGuarantee: "NONE" {{- if .Values.frank.security.http.authentication }} + {{- if .Values.frank.security.http.localUsers }} + application.security.console.authentication.type: "YML" + {{- end }} {{- with .Values.frank.security.http.activeDirectory.enabled }} application.security.http.authenticators: AdAuthenticator application.security.http.authenticators.AdAuthenticator.type: AD diff --git a/charts/ff-common/templates/_configmap.tomcat-users.yaml b/charts/ff-common/templates/_configmap.tomcat-users.yaml index f753a9c..3bea6bf 100644 --- a/charts/ff-common/templates/_configmap.tomcat-users.yaml +++ b/charts/ff-common/templates/_configmap.tomcat-users.yaml @@ -25,6 +25,10 @@ data: {{- end }} + + localUsers.yml: |- + users: + {{- toYaml .Values.frank.security.http.localUsers | nindent 4 }} {{- end -}} {{- end -}} {{- define "ff-common.configmap.tomcat-users" -}} diff --git a/charts/ff-common/templates/_container.yaml b/charts/ff-common/templates/_container.yaml index 35ebd7d..c330543 100644 --- a/charts/ff-common/templates/_container.yaml +++ b/charts/ff-common/templates/_container.yaml @@ -33,6 +33,10 @@ volumeMounts: mountPath: /usr/local/tomcat/conf/tomcat-users.xml subPath: tomcat-users.xml readOnly: true + - name: {{ template "ff-common.fullname" . }}-tomcat-users + mountPath: /opt/frank/resources/localUsers.yml + subPath: localUsers.yml + readOnly: true {{- end }} {{- if .Values.frank.security.http.activeDirectory.enabled }} - name: {{ template "ff-common.fullname" . }}-ldap-role-mapping