summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/dgbuilder/resources/config
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2020-02-17 22:05:51 +0100
committerKrzysztof Opasiak <k.opasiak@samsung.com>2020-02-18 12:33:20 +0100
commitacdd90c7b8b2add7c885314563f678f05f09e20b (patch)
tree3b66e9b2b6e50e410016e35d646365015d260776 /kubernetes/common/dgbuilder/resources/config
parent4eddfbdf9caabe3ce30937d78b1bfe8aad72f8f9 (diff)
[COMMON] Use common secret template in dgbuilder
Taken into account how "easy" it would be to modify the dgbuilder which is written in JavaScript (which is not my mother tongue to say the least) let's try to remove hardcoded passwords from config files without modifying the application container itself. In order to achieve this: 1) Remove createReleaseDir.sh script from the container as it is never used and contains a ton of passwords 2) Replace all sensitive values in config files with references to respective environment variables 3) Introduce init container that will run envsubst command on config files and copy them from ConfigMap value to the new volume which is backed by tmpfs so that the plain text passwords are never written to the disk For now all the hardcoded values are still there to minimize the risk of breaking the deployment but step by step they will be removed in next commits. Issue-ID: OOM-2247 Change-Id: I5a428e3415713857084ba6aaa6be9b04a8eb8c0f Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'kubernetes/common/dgbuilder/resources/config')
-rw-r--r--kubernetes/common/dgbuilder/resources/config/customSettings.js59
-rw-r--r--kubernetes/common/dgbuilder/resources/config/svclogic.properties8
2 files changed, 63 insertions, 4 deletions
diff --git a/kubernetes/common/dgbuilder/resources/config/customSettings.js b/kubernetes/common/dgbuilder/resources/config/customSettings.js
new file mode 100644
index 0000000000..42c2e5728b
--- /dev/null
+++ b/kubernetes/common/dgbuilder/resources/config/customSettings.js
@@ -0,0 +1,59 @@
+/* Copyright © 2017 AT&T, 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.
+*/
+
+module.exports={
+ "name": "Release sdnc1.0",
+ "emailAddress": "dguser@onap.org",
+ "uiPort": 3100,
+ "mqttReconnectTime": 15000,
+ "serialReconnectTime": 15000,
+ "debugMaxLength": 1000,
+ "htmlPath": "releases/sdnc1.0/html/",
+ "xmlPath": "releases/sdnc1.0/xml/",
+ "flowFile": "releases/sdnc1.0/flows/flows.json",
+ "sharedDir": "releases/sdnc1.0/flows/shared",
+ "userDir": "releases/sdnc1.0",
+ "httpAuth": {
+ "user": "${HTTP_USER}",
+ "pass": "${HTTP_PASSWORD}"
+ },
+ "dbHost": "{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}",
+ "dbPort": "3306",
+ "dbName": "{{.Values.config.db.dbName}}",
+ "dbUser": "${DB_USER}",
+ "dbPassword": "${DB_PASSWORD}",
+ "gitLocalRepository": "",
+ "restConfUrl": "http://localhost:8181/restconf/operations/SLI-API:execute-graph",
+ "restConfUser": "${REST_CONF_USER}",
+ "restConfPassword": "${REST_CONF_PASSWORD}",
+ "formatXML": "Y",
+ "formatJSON": "Y",
+ "httpRoot": "/",
+ "disableEditor": false,
+ "httpAdminRoot": "/",
+ "httpAdminAuth": {
+ "user": "${HTTP_ADMIN_USER}",
+ "pass": "${HTTP_ADMIN_PASSWORD}"
+ },
+ "httpNodeRoot": "/",
+ "httpNodeAuth": {
+ "user": "${HTTP_NODE_USER}",
+ "pass": "${HTTP_NODE_PASSWORD}"
+ },
+ "uiHost": "0.0.0.0",
+ "version": "0.9.1",
+ "performGitPull": "N",
+ "enableHttps" : true
+}
diff --git a/kubernetes/common/dgbuilder/resources/config/svclogic.properties b/kubernetes/common/dgbuilder/resources/config/svclogic.properties
index b780cafbcd..28612a270b 100644
--- a/kubernetes/common/dgbuilder/resources/config/svclogic.properties
+++ b/kubernetes/common/dgbuilder/resources/config/svclogic.properties
@@ -13,7 +13,7 @@
# limitations under the License.
org.onap.ccsdk.sli.dbtype=jdbc
-org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}:3306/sdnctl
-org.onap.ccsdk.sli.jdbc.database=sdnctl
-org.onap.ccsdk.sli.jdbc.user=sdnctl
-org.onap.ccsdk.sli.jdbc.password={{.Values.config.dbSdnctlPassword}}
+org.onap.ccsdk.sli.jdbc.url=jdbc:mysql://{{.Values.config.dbServiceName}}.{{ include "common.namespace" . }}:3306/{{.Values.config.db.dbName}}
+org.onap.ccsdk.sli.jdbc.database={{.Values.config.db.dbName}}
+org.onap.ccsdk.sli.jdbc.user=${DB_USER}
+org.onap.ccsdk.sli.jdbc.password=${DB_PASSWORD}