use 5005 for keycloak and document how to start this thing

This commit is contained in:
burnettk 2022-07-01 10:30:01 -04:00
parent 4ef5a5f83c
commit 17846f1972
5 changed files with 12 additions and 5 deletions

View File

@ -625,7 +625,7 @@
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "client-secret",
"secret": "OAh6rkjXIiPJDtPOz4459i3VtdlxGcce",
"redirectUris": ["http://localhost:5000/*"],
"redirectUris": ["http://localhost:5005/*"],
"webOrigins": ["https://www.keycloak.org"],
"notBefore": 0,
"bearerOnly": false,

View File

@ -4,7 +4,7 @@
"auth_uri": "http://localhost:8080/realms/finance/protocol/openid-connect/auth",
"client_id": "myclient",
"client_secret": "OAh6rkjXIiPJDtPOz4459i3VtdlxGcce",
"redirect_uris": ["http://localhost:5000/*"],
"redirect_uris": ["http://localhost:5005/*"],
"userinfo_uri": "http://localhost:8080/realms/finance/protocol/openid-connect/userinfo",
"token_uri": "http://localhost:8080/realms/finance/protocol/openid-connect/token",
"token_introspection_uri": "http://localhost:8080/realms/finance/protocol/openid-connect/token/introspect"

View File

@ -1,5 +1,11 @@
# type: ignore
"""keycloak_test_server."""
# ./bin/start_keycloak # starts keycloak on 8080
# pip install flask_oidc
# pip install itsdangerous==2.0.1
# python ./bin/keycloak_test_server.py # starts flask on 5005
import json
import logging
@ -74,7 +80,7 @@ def hello_me():
return """{} your email is {} and your user_id is {}!
<ul>
<li><a href="/">Home</a></li>
<li><a href="//localhost:8080/auth/realms/finance/account?referrer=flask-app&referrer_uri=http://localhost:5000/private&">Account</a></li>
<li><a href="//localhost:8080/auth/realms/finance/account?referrer=flask-app&referrer_uri=http://localhost:5005/private&">Account</a></li>
</ul>""".format(
greeting,
email,
@ -97,4 +103,4 @@ def logout():
if __name__ == "__main__":
app.run()
app.run(port=5005)

View File

@ -7,7 +7,7 @@ function error_handler() {
trap 'error_handler ${LINENO} $?' ERR
set -o errtrace -o errexit -o nounset -o pipefail
docker run -p 8080:8080 -d --rm --name keycloak -e KEYCLOAK_LOGLEVEL=ALL -e ROOT_LOGLEVEL=ALL -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.0 start-dev
docker run -p 8080:8080 --rm --name keycloak -e KEYCLOAK_LOGLEVEL=ALL -e ROOT_LOGLEVEL=ALL -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:18.0.0 start-dev
# to export:
# /opt/keycloak/bin/kc.sh export --dir /tmp/hey --users realm_file

View File

@ -3,6 +3,7 @@ services:
db:
container_name: db
image: mysql:8.0.29
platform: linux/amd64
cap_add:
- SYS_NICE
restart: "${SPIFFWORKFLOW_BACKEND_DATABASE_DOCKER_RESTART_POLICY:-no}"