From 3b33a29e4a287d9b8fcc7dabfd6e5111d836bf2b Mon Sep 17 00:00:00 2001
From: jkuensem <jkuensem@physik.uni-bielefeld.de>
Date: Fri, 24 Jan 2020 17:02:00 +0100
Subject: [PATCH] TMSS-134: Change host ports to 3003, 5005, 8008 and 8088

---
 SAS/TMSS/docker/tmss-testenv/docker-compose.yml        |  6 +++---
 SAS/TMSS/docker/tmss-testenv/nginx.conf                | 10 +++++-----
 SAS/TMSS/src/tmss/settings.py                          |  6 +++---
 .../testprovider/fixtures.json                         |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/SAS/TMSS/docker/tmss-testenv/docker-compose.yml b/SAS/TMSS/docker/tmss-testenv/docker-compose.yml
index 8cd3fcfbad0..c80feb0c782 100644
--- a/SAS/TMSS/docker/tmss-testenv/docker-compose.yml
+++ b/SAS/TMSS/docker/tmss-testenv/docker-compose.yml
@@ -6,13 +6,13 @@ services:
       dockerfile: tmss_testenv_Dockerfile
     container_name: tmss_test
     ports:
-      - "8000:8000"
-      - "3000:3000"
+      - "8008:8000"
+      - "3003:3000"
   tmss_test_nginx:
     build:
       context: .
       dockerfile: tmss_nginx_Dockerfile
     container_name: tmss_test_nginx
     ports:
-      - "5000:5000"
+      - "5005:5000"
 
diff --git a/SAS/TMSS/docker/tmss-testenv/nginx.conf b/SAS/TMSS/docker/tmss-testenv/nginx.conf
index 6d54bdddd0f..e8f412387f5 100644
--- a/SAS/TMSS/docker/tmss-testenv/nginx.conf
+++ b/SAS/TMSS/docker/tmss-testenv/nginx.conf
@@ -18,26 +18,26 @@ http {
     }
 
     location @api_proxy {
-      proxy_pass http://tmss_test:8000$uri;
+      proxy_pass http://tmss_test:8008$uri;
       proxy_intercept_errors on;
 	  recursive_error_pages on;
 	  error_page 404 = @frontend_proxy;
     }
 
     location @frontend_proxy {
-      proxy_pass http://tmss_test:3000$uri;
+      proxy_pass http://tmss_test:3003$uri;
     }
 
     location /api/ {
-      proxy_pass http://tmss_test:8000;
+      proxy_pass http://tmss_test:8008;
     }
 
     location /frontend/ {
-      proxy_pass http://tmss_test:3000;
+      proxy_pass http://tmss_test:3003;
     }
 
     location /openid/ {
-      proxy_pass http://tmss_test:8000/openid;
+      proxy_pass http://tmss_test:8008/openid;
     }
 
   }
diff --git a/SAS/TMSS/src/tmss/settings.py b/SAS/TMSS/src/tmss/settings.py
index 61cbfd79808..a734abb34c1 100644
--- a/SAS/TMSS/src/tmss/settings.py
+++ b/SAS/TMSS/src/tmss/settings.py
@@ -236,9 +236,9 @@ OIDC_DRF_AUTH_BACKEND = 'mozilla_django_oidc.auth.OIDCAuthenticationBackend'
 # For talking to Mozilla Identity Provider:
 OIDC_RP_CLIENT_ID = os.environ.get('OIDC_RP_CLIENT_ID', '1')               # Secret, do not put real credentials on Git
 OIDC_RP_CLIENT_SECRET = os.environ.get('OIDC_RP_CLIENT_SECRET', 'secret')       # Secret, do not put real credentials on Git
-OIDC_OP_AUTHORIZATION_ENDPOINT="http://localhost:8080/openid/authorize"
-OIDC_OP_TOKEN_ENDPOINT="http://localhost:8080/openid/token"
-OIDC_OP_USER_ENDPOINT="http://localhost:8080/openid/userinfo"
+OIDC_OP_AUTHORIZATION_ENDPOINT="http://localhost:8088/openid/authorize"
+OIDC_OP_TOKEN_ENDPOINT="http://localhost:8088/openid/token"
+OIDC_OP_USER_ENDPOINT="http://localhost:8088/openid/userinfo"
 
 LOGIN_REDIRECT_URL = "/api/"
 LOGIN_REDIRECT_URL_FAILURE = "/api/"
diff --git a/SAS/TMSS/test/oidc/docker-test-mozilla-django-oidc/testprovider/fixtures.json b/SAS/TMSS/test/oidc/docker-test-mozilla-django-oidc/testprovider/fixtures.json
index 19e122b2722..dac97597a95 100644
--- a/SAS/TMSS/test/oidc/docker-test-mozilla-django-oidc/testprovider/fixtures.json
+++ b/SAS/TMSS/test/oidc/docker-test-mozilla-django-oidc/testprovider/fixtures.json
@@ -72,7 +72,7 @@
       "logo": "",
       "reuse_consent": true,
       "require_consent": true,
-      "_redirect_uris": "http://localhost:8000/oidc/callback/",
+      "_redirect_uris": ["http://localhost:5000/oidc/callback/", "http://localhost:5005/oidc/callback/", "http://localhost:8000/oidc/callback/" ,"http://localhost:8008/oidc/callback/"],
       "_post_logout_redirect_uris": "",
       "_scope": "",
       "response_types": [
@@ -97,7 +97,7 @@
       "logo": "",
       "reuse_consent": true,
       "require_consent": true,
-      "_redirect_uris": "http://localhost:8000/oidc/callback/",
+      "_redirect_uris": ["http://localhost:5000/oidc/callback/", "http://localhost:5005/oidc/callback/", "http://localhost:8000/oidc/callback/" ,"http://localhost:8008/oidc/callback/"],
       "_post_logout_redirect_uris": "",
       "_scope": "",
       "response_types": [
-- 
GitLab