From 027b4dba82e14671de190a296c8c6ecf15bf2d15 Mon Sep 17 00:00:00 2001
From: Mark <mark@openappstack.net>
Date: Mon, 29 Jun 2020 17:30:06 +0200
Subject: [PATCH] Adjust local testing environment

---
 docker-compose.yml            | 9 +++++----
 test/create-hydra-client.bash | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/docker-compose.yml b/docker-compose.yml
index 8ed729d..260a412 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,7 +13,7 @@ services:
       - "4445:4445" # Admin port
       - "5555:5555" # Port for hydra token user
     command:
-        serve all --dangerous-force-http --dangerous-allow-insecure-redirect-urls "http://127.0.0.1:13337/callback, http://localhost:3000/callback"
+        serve all --dangerous-force-http --dangerous-allow-insecure-redirect-urls "http://127.0.0.1:13337/login/sso/authorized, http://localhost:3000/login/sso/authorized"
     environment:
       - URLS_SELF_ISSUER=http://localhost:4444/
       - URLS_CONSENT=http://localhost:5001/consent
@@ -25,7 +25,8 @@ services:
       - OIDC_SUBJECT_TYPES_SUPPORTED=public,pairwise
       - OIDC_SUBJECT_TYPE_PAIRWISE_SALT=youReallyNeedToChangeThis
       - SERVE_PUBLIC_CORS_DEBUG=true
-      - LOG_LEVEL="debug"
+      - LOG_LEVEL=debug
+      - LOG_LEAK_SENSITIVE_VALUES=true
     restart: unless-stopped
   consent:
     build: consent_provider/
@@ -76,8 +77,8 @@ services:
       - OAUTHLIB_INSECURE_TRANSPORT=true
       - FLASK_ENV=development
     # with this settings run:
-    # `bash test/create-127.0.0.1-client.bash testapp clientsecret http://localhost:4445 http://127.0.0.1:13337/callback
-    # to register a corresponding oauth client with hydra
+    ## `bash test/create-hydra-client.bash testapp clientsecret http://localhost:4445 http://127.0.0.1:13337/login/sso/authorized
+    ## to register a corresponding oauth client with hydra
     ports:
       - "13337:13337"
     command: flask run --port 13337 --host "0.0.0.0"
diff --git a/test/create-hydra-client.bash b/test/create-hydra-client.bash
index 1d0fc27..8b4c78f 100755
--- a/test/create-hydra-client.bash
+++ b/test/create-hydra-client.bash
@@ -13,5 +13,5 @@ SCOPES="openid profile email openappstack_roles"
 
 curl --header "Content-Type: application/json" \
     --request POST \
-    --data "{\"client_id\": \"$KEY\", \"client_name\": \"$KEY\", \"client_secret\": \"$SECRET\", \"redirect_uris\": [\"$REDIRECT_URI\"], \"scope\": \"$SCOPES\", \"grant_types\": [\"authorization_code\",\"refresh_token\"], \"response_types\": [\"code\"], \"token_endpoint_auth_method\": \"client_secret_post\"}" \
+    --data "{\"client_id\": \"$KEY\", \"client_name\": \"$KEY\", \"client_secret\": \"$SECRET\", \"redirect_uris\": [\"$REDIRECT_URI\"], \"scope\": \"$SCOPES\", \"grant_types\": [\"authorization_code\",\"refresh_token\"], \"response_types\": [\"code\"], \"token_endpoint_auth_method\": \"client_secret_basic\"}" \
     $HOST_URL/clients
-- 
GitLab