From 66ee50016a7a877ee3e375858c92fdab3f2cbec7 Mon Sep 17 00:00:00 2001
From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de>
Date: Wed, 16 Sep 2020 11:52:52 +0000
Subject: [PATCH 1/2] Update .gitlab-ci.yml

---
 .gitlab-ci.yml | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 80cb7c29..583e6b40 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,7 @@
-pages-testing:    
+deploy-testing:    
   stage: deploy
   script:
+    - cat $configfiledev > ./config/config.js
     - npm install
     - "pm2 delete --silent account || :"
     - pm2 start ./app.js --name=account
@@ -9,4 +10,16 @@ pages-testing:
     - testing
   only: 
     - testing
-    - test_logoutbutton
\ No newline at end of file
+
+deploy-master:    
+  stage: deploy
+  script:
+    - cat $configfileprod > ./config/config.js
+    - npm install
+    - "pm2 delete --silent account || :"
+    - pm2 start ./app.js --name=account
+    - pm2 save
+  tags: 
+    - production
+  only: 
+    - master
\ No newline at end of file
-- 
GitLab


From f582ea0d6e5108258c7b30a512ae4e2ea0d43472 Mon Sep 17 00:00:00 2001
From: Wolfgang Knopki <wolfgang.knopki@hft-stuttgart.de>
Date: Wed, 16 Sep 2020 11:56:30 +0000
Subject: [PATCH 2/2] Update config.js, removed credentials

---
 config/config.js | 46 ++++++++++++++++++++++------------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/config/config.js b/config/config.js
index 1535c914..eaab8764 100644
--- a/config/config.js
+++ b/config/config.js
@@ -9,28 +9,28 @@ module.exports = {
       strategy: 'saml',
       saml: {
         path: process.env.SAML_PATH || '/saml/SSO',
-        entryPoint: process.env.SAML_ENTRY_POINT || 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SSOService.php',
-        issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata
-        logoutUrl: 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php'
+        entryPoint: process.env.SAML_ENTRY_POINT || 'Saml Entry Point',
+        issuer: 'SAML issuer', //local metadata
+        logoutUrl: 'SAML logout URL'
       }
     },
     database: {
       host: 'localhost',      	  // DB host
-      user: 'DBManager',          // DB username
-      password: 'Stuttgart2019',  // DB password
+      user: 'usernamedb',          // DB username
+      password: 'passworddb',  // DB password
       port: 3306,                 // MySQL port
       dbUser: 'userdb',           // User DB
       host_project: 'localhost', // DB host project db
-      dbProject: 'projectDB'     // Project DB
+      dbProject: 'projectdb'     // Project DB
     },
     mailer: {
-      host: 'mail.hft-stuttgart.de',  // hostname
+      host: 'mailhost',  // hostname
       secureConnection: false,        // TLS requires secureConnection to be false
       port: 587,                      // port for secure SMTP
-      authUser: 'ad\\support-transfer',
-      authPass: '6laumri2',
+      authUser: 'mailuser',
+      authPass: 'mailpass',
       tlsCiphers: 'SSLv3',
-      from: 'support-transfer@hft-stuttgart.de',
+      from: 'mailfrom',
     }
   },
   testing: {
@@ -43,30 +43,28 @@ module.exports = {
       strategy: 'saml',
       saml: {
         path: process.env.SAML_PATH || '/saml/SSO',
-        entryPoint: process.env.SAML_ENTRY_POINT || 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SSOService.php',
-        //issuer: 'sp-account.m4lab.hft-stuttgart.de', //local metadata
-        issuer: 'sp-account-testing.m4lab.hft-stuttgart.de', //testing metadata
-        //issuer: 'sp-account-prod.m4lab.hft-stuttgart.de', //production metadata
-        logoutUrl: 'https://m4lab.hft-stuttgart.de/idp/saml2/idp/SingleLogoutService.php'
+        entryPoint: process.env.SAML_ENTRY_POINT || 'saml entry point',
+        issuer: 'SAML issuer', //testing metadata
+        logoutUrl: 'SAML logout URL'
       }
     },
     database: {
-      host: 'transfer.hft-stuttgart.de',      	  // DB host
-      user: 'DBManager',          // DB username
-      password: 'Stuttgart2019',  // DB password
+      host: 'dbhost',      	  // DB host
+      user: 'dbuser',          // DB username
+      password: 'dbpass',  // DB password
       port: 3306,                 // MySQL port
       dbUser: 'userdb',           // User DB
-      host_project: 'm4lab.hft-stuttgart.de', // DB host project db
-      dbProject: 'projectDB'     // Project DB
+      host_project: 'dbhost', // DB host project db
+      dbProject: 'projectdb'     // Project DB
     },
     mailer: {
-      host: 'mail.hft-stuttgart.de',  // hostname
+      host: 'mailhost',  // hostname
       secureConnection: false,        // TLS requires secureConnection to be false
       port: 587,                      // port for secure SMTP
-      authUser: 'ad\\support-transfer',
-      authPass: '6laumri2',
+      authUser: 'mailuser',
+      authPass: 'mailpass',
       tlsCiphers: 'SSLv3',
-      from: 'support-transfer@hft-stuttgart.de',
+      from: 'mailfrom',
     }
   }
 }
\ No newline at end of file
-- 
GitLab