[SO] Remove so-secret component 67/114367/9
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Wed, 28 Oct 2020 15:55:18 +0000 (16:55 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 2 Nov 2020 15:30:57 +0000 (16:30 +0100)
SO secret was used to give truststore to SO components.
As we're using dynamic certificate retrieval, it's not needed anymore.

Issue-ID: OOM-2534
Issue-ID: SO-3348
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I0eb2e052096923fc69bf5f1a1876d9a76a22102b

22 files changed:
kubernetes/so/components/so-appc-orchestrator/templates/deployment.yaml
kubernetes/so/components/so-bpmn-infra/templates/deployment.yaml
kubernetes/so/components/so-catalog-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-cnf-adapter/templates/deployment.yaml
kubernetes/so/components/so-etsi-nfvo-ns-lcm/resources/config/overrides/override.yaml
kubernetes/so/components/so-etsi-nfvo-ns-lcm/templates/deployment.yaml
kubernetes/so/components/so-nssmf-adapter/templates/deployment.yaml
kubernetes/so/components/so-openstack-adapter/templates/deployment.yaml
kubernetes/so/components/so-request-db-adapter/templates/deployment.yaml
kubernetes/so/components/so-sdc-controller/templates/deployment.yaml
kubernetes/so/components/so-sdnc-adapter/templates/deployment.yaml
kubernetes/so/components/so-secrets/Chart.yaml [deleted file]
kubernetes/so/components/so-secrets/requirements.yaml [deleted file]
kubernetes/so/components/so-secrets/resources/certs/org.onap.so.trust.jks [deleted file]
kubernetes/so/components/so-secrets/templates/secrets.yaml [deleted file]
kubernetes/so/components/so-secrets/values.yaml [deleted file]
kubernetes/so/components/so-vfc-adapter/templates/deployment.yaml
kubernetes/so/components/so-vnfm-adapter/resources/config/overrides/override.yaml
kubernetes/so/components/so-vnfm-adapter/templates/deployment.yaml
kubernetes/so/components/soHelpers/templates/_certificates.tpl
kubernetes/so/requirements.yaml
kubernetes/so/templates/deployment.yaml

index 50d42ca..24592ba 100644 (file)
@@ -58,7 +58,7 @@ spec:
             export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
             export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
             {{- if .Values.global.security.aaf.enabled }}
-            export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+            export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
             {{- end }}
             {{- end }}
             /app/start-app.sh
index e7cb3aa..108b928 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index d58fd86..b532515 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index 63e36a6..8c894ad 100755 (executable)
@@ -105,9 +105,6 @@ spec:
             - name: config
               mountPath: /app/config
               readOnly: true
-            - name: {{ include "common.fullname" . }}-truststore
-              mountPath: /app/client
-              readOnly: true
             - name: encoder
               mountPath: /input
           livenessProbe:
@@ -129,8 +126,5 @@ spec:
         - name: encoder
           emptyDir:
             medium: Memory
-        - name:  {{ include "common.fullname" . }}-truststore
-          secret:
-            secretName: {{ include "common.release" . }}-so-truststore-secret
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"
index c9aa582..7b85b44 100644 (file)
@@ -58,7 +58,7 @@ etsi-catalog-manager:
   http:
     client:
       ssl:
-        trust-store: ${TRUSTSTORE}
+        trust-store: file:${TRUSTSTORE}
         trust-store-password: ${TRUSTSTORE_PASSWORD}
   {{- else }}
     endpoint: http://modeling-etsicatalog.{{ include "common.namespace" . }}:8806/api
index 9408c1f..bf770bb 100644 (file)
@@ -41,9 +41,8 @@ spec:
               {{- if .Values.global.aafEnabled }}
               export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
               export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
-              export TRUSTSTORE="file:/${TRUSTSTORE}"
               {{- if .Values.global.security.aaf.enabled }}
-              export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+              export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
               {{- end }}
               {{- end }}
               ./start-app.sh
@@ -83,9 +82,6 @@ spec:
             - name: config
               mountPath: /app/config
               readOnly: true
-            - name: {{ include "common.fullname" . }}-truststore
-              mountPath: /app/client
-              readOnly: true
           livenessProbe:
             tcpSocket:
               port: {{ index .Values.livenessProbe.port }}
@@ -100,8 +96,5 @@ spec:
         - name: config
           configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-        - name: {{ include "common.fullname" . }}-truststore
-          secret:
-            secretName: {{ include "common.release" . }}-so-truststore-secret
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"
index f1ec31a..50bb9ce 100755 (executable)
@@ -57,7 +57,7 @@ spec:
               export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
               export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
               {{- if .Values.global.security.aaf.enabled }}
-              export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+              export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
               {{- end }}
               {{- end }}
               ./start-app.sh
@@ -102,9 +102,6 @@ spec:
             - name: config
               mountPath: /app/config
               readOnly: true
-            - name: {{ include "common.fullname" . }}-truststore
-              mountPath: /app/client
-              readOnly: true
           livenessProbe:
             httpGet:
               path: {{ index .Values.livenessProbe.path}}
@@ -121,8 +118,5 @@ spec:
         - name: config
           configMap:
             name: {{ include "common.fullname" . }}
-        - name:  {{ include "common.fullname" . }}-truststore
-          secret:
-            secretName: {{ include "common.release" . }}-so-truststore-secret
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"
index e7cb3aa..108b928 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index d58fd86..b532515 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index e7cb3aa..108b928 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index 5797007..6d440fe 100755 (executable)
@@ -53,7 +53,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
diff --git a/kubernetes/so/components/so-secrets/Chart.yaml b/kubernetes/so/components/so-secrets/Chart.yaml
deleted file mode 100644 (file)
index d96245d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright © 2018 AT&T USA
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-apiVersion: v1
-description: A Helm chart for so  secrets
-name: so-secrets
-version: 6.0.0
diff --git a/kubernetes/so/components/so-secrets/requirements.yaml b/kubernetes/so/components/so-secrets/requirements.yaml
deleted file mode 100755 (executable)
index 2eb32d0..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright © 2017 Amdocs, Bell Canada
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-dependencies:
-  - name: common
-    version: ~6.x-0
-    # local reference to common chart, as it is
-    # a part of this chart's package and will not
-    # be published independently to a repo (at this point)
-    repository: '@local'
diff --git a/kubernetes/so/components/so-secrets/resources/certs/org.onap.so.trust.jks b/kubernetes/so/components/so-secrets/resources/certs/org.onap.so.trust.jks
deleted file mode 100644 (file)
index 31ea6ba..0000000
Binary files a/kubernetes/so/components/so-secrets/resources/certs/org.onap.so.trust.jks and /dev/null differ
diff --git a/kubernetes/so/components/so-secrets/templates/secrets.yaml b/kubernetes/so/components/so-secrets/templates/secrets.yaml
deleted file mode 100644 (file)
index 9388ecb..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-{{/*
-# Copyright © 2018 AT&T USA
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-*/}}
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ .Release.Name }}-so-client-certs-secret
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-  trustStorePassword: {{ .Values.global.client.certs.trustStorePassword }}
-  keyStorePassword: {{ .Values.global.client.certs.keyStorePassword}}
-type: Opaque
----
-apiVersion: v1
-kind: Secret
-metadata:
-  name: {{ include "common.release" . }}-so-truststore-secret
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/certs/*").AsSecrets . | indent 2 }}
diff --git a/kubernetes/so/components/so-secrets/values.yaml b/kubernetes/so/components/so-secrets/values.yaml
deleted file mode 100644 (file)
index 602ea79..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright (c) 2020 Orange
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  client:
-    certs:
-      trustStorePassword: LHN4Iy5DKlcpXXdWZ0pDNmNjRkhJIzpI
index a85ce0c..d5c6157 100755 (executable)
@@ -67,7 +67,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}
index 7fc4b95..9d98803 100755 (executable)
@@ -30,14 +30,14 @@ server:
   port: {{ index .Values.containerPort }}
   ssl:
     key-alias: so@so.onap.org
-    key--store-password: 'ywsqCy:EEo#j}HJHM7z^Rk[L'
-    key-store: classpath:so-vnfm-adapter.p12
+    key-store-password: ${KEYSTORE_PASSWORD}
+    key-store: file:${KEYSTORE}
     key-store-type: PKCS12
 http:
   client:
     ssl:
-      trust-store: classpath:org.onap.so.trust.jks
-      trust-store-password: ',sx#.C*W)]wVgJC6ccFHI#:H'
+      trust-store: file:${TRUSTSTORE}
+      trust-store-password: ${TRUSTSTORE_PASSWORD}
 mso:
   key: {{ .Values.mso.key }}
   site-name: localSite
@@ -60,7 +60,7 @@ etsi-catalog-manager:
   http:
     client:
       ssl:
-        trust-store: ${TRUSTSTORE}
+        trust-store: file:${TRUSTSTORE}
         trust-store-password: ${TRUSTSTORE_PASSWORD}
   {{- else }}
     endpoint: http://modeling-etsicatalog.{{ include "common.namespace" . }}:8806/api/vnfpkgm/v1
index 4f73fb3..24dd3d6 100755 (executable)
@@ -52,9 +52,8 @@ spec:
         - |
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
-          {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
-          {{- end }}
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
+          export KEYSTORE="{{ .Values.soHelpers.certInitializer.credsPath }}/org.onap.so.p12"
           /app/start-app.sh
         {{- end }}
         env:
@@ -69,9 +68,6 @@ spec:
         - name: config
           mountPath: /app/config
           readOnly: true
-        - name: {{ include "common.fullname" . }}-truststore
-          mountPath: /app/client
-          readOnly: true
         livenessProbe:
           tcpSocket:
             port: {{ index .Values.livenessProbe.port }}
@@ -89,8 +85,5 @@ spec:
       - name: config
         configMap:
             name: {{ include "common.fullname" . }}-app-configmap
-      - name:  {{ include "common.fullname" . }}-truststore
-        secret:
-          secretName: {{ include "common.release" . }}-so-truststore-secret
       imagePullSecrets:
         - name: "{{ include "common.namespace" . }}-docker-registry-key"
index ef3b076..98876e3 100644 (file)
@@ -56,7 +56,7 @@
   value: {{ $subchartDot.Values.certInitializer.credsPath }}/{{ $subchartDot.Values.aaf.trustore }}
 {{-     if $dot.Values.global.security.aaf.enabled }}
 - name: KEYSTORE
-  value: {{ $subchartDot.Values.certInitializer.credsPath }}/org.onap.so.jks
+  value: {{ $subchartDot.Values.certInitializer.credsPath }}/org.onap.so.p12
 {{-     end }}
 {{-   end }}
 {{- end -}}
index c982bff..637e701 100755 (executable)
@@ -77,9 +77,6 @@ dependencies:
     version: ~6.x-0
     repository: "file://components/so-sdnc-adapter"
     condition: so-sdnc-adapter.enabled
-  - name: so-secrets
-    version: ~6.x-0
-    repository: "file://components/so-secrets"
   - name: so-ve-vnfm-adapter
     version: ~6.x-0
     repository: "file://components/so-ve-vnfm-adapter"
index 1ff897e..79a3fea 100755 (executable)
@@ -68,7 +68,7 @@ spec:
           export $(grep '^c' {{ .Values.soHelpers.certInitializer.credsPath }}/mycreds.prop | xargs -0)
           export TRUSTSTORE_PASSWORD="${cadi_truststore_password}"
           {{- if .Values.global.security.aaf.enabled }}
-          export KEYSTORE_PASSWORD="${cadi_keystore_password}"
+          export KEYSTORE_PASSWORD="${cadi_keystore_password_p12}"
           {{- end }}
           /app/start-app.sh
         {{- end }}