From 0379af76b82b1bb92ccf03d79f3e0d3ccdb762d6 Mon Sep 17 00:00:00 2001 From: jhh Date: Mon, 29 Jun 2020 12:31:25 -0500 Subject: [POLICY] add env passwords to api/pap/xacml/dist keystore and truststore passwords are now stored as secrets to be accessed by environment variables. Issue-ID: POLICY-2575 Signed-off-by: jhh Change-Id: I5831f5c7bc040d036c38c321b5cc87848e80ca48 --- .../charts/policy-xacml-pdp/templates/deployment.yaml | 5 +++++ kubernetes/policy/charts/policy-xacml-pdp/values.yaml | 13 +++++++++++++ 2 files changed, 18 insertions(+) (limited to 'kubernetes/policy/charts/policy-xacml-pdp') diff --git a/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml index bd126b810b..eb2c776f0d 100644 --- a/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml +++ b/kubernetes/policy/charts/policy-xacml-pdp/templates/deployment.yaml @@ -63,6 +63,11 @@ spec: imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} command: ["/opt/app/policy/pdpx/bin/policy-pdpx.sh"] args: ["/opt/app/policy/pdpx/etc/mounted/config.json"] + env: + - name: KEYSTORE_PASSWD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }} + - name: TRUSTSTORE_PASSWD + {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }} ports: - containerPort: {{ .Values.service.internalPort }} # disable liveness probe when breakpoints set in debugger diff --git a/kubernetes/policy/charts/policy-xacml-pdp/values.yaml b/kubernetes/policy/charts/policy-xacml-pdp/values.yaml index c9ced1fc13..e3feeab950 100644 --- a/kubernetes/policy/charts/policy-xacml-pdp/values.yaml +++ b/kubernetes/policy/charts/policy-xacml-pdp/values.yaml @@ -45,6 +45,16 @@ secrets: login: '{{ .Values.apiServer.user }}' password: '{{ .Values.apiServer.password }}' passwordPolicy: required + - uid: keystore-password + type: password + externalSecret: '{{ tpl (default "" .Values.certStores.keyStorePasswordExternalSecret) . }}' + password: '{{ .Values.certStores.keyStorePassword }}' + passwordPolicy: required + - uid: truststore-password + type: password + externalSecret: '{{ tpl (default "" .Values.certStores.trustStorePasswordExternalSecret) . }}' + password: '{{ .Values.certStores.trustStorePassword }}' + passwordPolicy: required ################################################################# # Application configuration defaults. @@ -68,6 +78,9 @@ restServer: apiServer: user: healthcheck password: zb!XztG34 +certStores: + keyStorePassword: Pol1cy_0nap + trustStorePassword: Pol1cy_0nap # default number of instances replicaCount: 1 -- cgit