Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update config to include KEYCLOAK_ADMIN_CLIENT_SECRET #213

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions common-services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ services:
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
KEYCLOAK_HOST: ${KEYCLOAK_HOST}
KEYCLOAK_USER: ${KEYCLOAK_USER}
KEYCLOAK_PASSWORD: ${KEYCLOAK_PASSWORD}
KEYCLOAK_ADMIN_CLIENT_SECRET: ${KEYCLOAK_ADMIN_CLIENT_SECRET}
depends_on:
shogun-postgis:
condition: service_healthy
Expand Down
3 changes: 3 additions & 0 deletions setEnvironment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ KEYCLOAK_HOST=$(ip route get 1 | awk '{gsub("^.*src ",""); print $1; exit}')
KEYCLOAK_USER=admin
# The Keycloak admin password
KEYCLOAK_PASSWORD=shogun
# The secret of the admin-cli client
KEYCLOAK_ADMIN_CLIENT_SECRET=supersecret

# The ID of the host user the GS image should run as
USER_ID=$(id -u)
Expand Down Expand Up @@ -107,6 +109,7 @@ if [ "$MODE" = "create" ]; then
echo "KEYCLOAK_HOST=${KEYCLOAK_HOST}" >> $SCRIPT_DIR/$ENV_FILE
echo "KEYCLOAK_USER=${KEYCLOAK_USER}" >> $SCRIPT_DIR/$ENV_FILE
echo "KEYCLOAK_PASSWORD=${KEYCLOAK_PASSWORD}" >> $SCRIPT_DIR/$ENV_FILE
echo "KEYCLOAK_ADMIN_CLIENT_SECRET=${KEYCLOAK_ADMIN_CLIENT_SECRET}" >> $SCRIPT_DIR/$ENV_FILE

echo "UID=${USER_ID}" >> $SCRIPT_DIR/$ENV_FILE
echo "GID=${GROUP_ID}" >> $SCRIPT_DIR/$ENV_FILE
Expand Down
9 changes: 5 additions & 4 deletions shogun-boot/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,15 @@ spring:
keycloak:
enabled: true
server-url: https://${KEYCLOAK_HOST:shogun-keycloak}/auth
username: ${KEYCLOAK_USER}
password: ${KEYCLOAK_PASSWORD}
master-realm: master
master-realm: SHOGun
admin-client-id: admin-cli
admin-client-secret: ${KEYCLOAK_ADMIN_CLIENT_SECRET}
realm: SHOGun
client-id: shogun-boot
principal-attribute: preferred_username
disableHostnameVerification: true
disable-hostname-verification: true
extract-roles-from-resource: true
extract-roles-from-realm: false

controller:
applications:
Expand Down