-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3624 from uselagoon/keycloak-21-realm-import
refactor: upgrade keycloak to 21 and support initial realm import
- Loading branch information
Showing
12 changed files
with
4,926 additions
and
2,445 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,7 @@ services: | |
ports: | ||
- '8088:8080' | ||
environment: | ||
- KEYCLOAK_FRONTEND_URL=http://localhost:8088/auth/ | ||
- [email protected] | ||
# Uncomment for local new relic tracking | ||
# - NEW_RELIC_LICENSE_KEY= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
20 changes: 19 additions & 1 deletion
20
services/keycloak/entrypoints/default-keycloak-entrypoint.sh
100644 → 100755
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
#!/bin/sh | ||
KEYCLOAK_USER=$KEYCLOAK_ADMIN_USER KEYCLOAK_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD /opt/jboss/tools/docker-entrypoint.sh "$@" | ||
export KC_DB=$DB_VENDOR | ||
export KC_DB_USERNAME=$DB_USER | ||
export KC_DB_PASSWORD=$DB_PASSWORD | ||
export KC_DB_URL=jdbc:mariadb://$DB_ADDR:3306/$DB_DATABASE | ||
|
||
export KC_PROXY=${KC_PROXY:-edge} | ||
export KC_HOSTNAME_STRICT=${KC_HOSTNAME_STRICT:-false} | ||
export KC_HOSTNAME_STRICT_HTTPS=${KC_HOSTNAME_STRICT_HTTPS:-false} | ||
export KC_HTTP_RELATIVE_PATH=${KC_HTTP_RELATIVE_PATH:-/auth} | ||
export KC_HOSTNAME_URL=${KEYCLOAK_FRONTEND_URL} | ||
|
||
# this may need to be changed to an optional override and only set for k3d testing so that it allows access to | ||
# the admin page in a k3d deployed environment locally | ||
export KC_HOSTNAME_ADMIN_URL=${KEYCLOAK_FRONTEND_URL} | ||
|
||
export KC_DB_POOL_MAX_SIZE=${KEYCLOAK_DS_MAX_POOL_SIZE:-20} | ||
export KC_DB_POOL_MIN_SIZE=${KEYCLOAK_DS_MIN_POOL_SIZE:-0} | ||
|
||
KEYCLOAK_USER=$KEYCLOAK_ADMIN_USER KEYCLOAK_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD KEYCLOAK_ADMIN=$KEYCLOAK_ADMIN_USER /lagoon/kc-startup.sh "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
# Wrapper script as docker entrypoint to run initialize-my-realm.sh in parallel to actual kc.sh (the official entrypoint). | ||
|
||
set -e -u -o pipefail | ||
shopt -s failglob | ||
|
||
/opt/keycloak/startup-scripts/00-configure-lagoon.sh & disown | ||
|
||
/opt/keycloak/bin/kc.sh "$@" --features="scripts,token-exchange,admin-fine-grained-authz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// by default, grants any permission associated with this policy | ||
$evaluation.grant(); |
Oops, something went wrong.