Skip to content

Commit b260d3d

Browse files
Jan Lieskovskypskopek
authored andcommitted
[CIAM-743] Explicitly add "org.keycloak.keycloak-model-infinispan"
module as a dependency to the definition of the Wildfly's "org.wildfly.clustering.infinispan.spi" module.xml Rationale: ---------- The "org.wildfly.clustering.infinispan.spi" module of vanilla Wildfly / EAP doesn't deploy RH-SSO server subsystem on top of Wildfly / EAP (thus doesn't require this dependency). But since the RH-SSO server overlay does, the "org.wildfly.clustering.infinispan.spi" requires explicitly to be equipped also with the "org.keycloak.keycloak-model-infinispan" module dependency, so the classes, defined within this RH-SSO module are properly found, when referenced Besides that, the JBoss EAP 7.4.0 image builder Maven repository got moved from candidates/ to released/. Update the path to that artifact appropriately Signed-off-by: Jan Lieskovsky <[email protected]>
1 parent a8f4241 commit b260d3d

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

modules/eap/setup/eap/modules/configure.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,3 +1057,36 @@ for dir in ${JBOSS_HOME} $DEPLOYMENTS_DIR; do
10571057
chmod -R g+rwX $dir
10581058
done
10591059
### End of: 'jboss.container.eap.final-setup' module
1060+
1061+
### CIAM-743 -- Start of RH-SSO add-on
1062+
1063+
# Explicitly add "org.keycloak.keycloak-model-infinispan" module as a
1064+
# dependency to the Wildfly's "org.wildfly.clustering.infinispan.spi"
1065+
# module
1066+
1067+
# Path to 'module.xml' file of "org.wildfly.clustering.infinispan.spi" module
1068+
readonly wildflyClusteringInfinispanSpiModuleXml="${JBOSS_HOME}/modules/system/layers/base/org/wildfly/clustering/infinispan/spi/main/module.xml"
1069+
1070+
# Respect the existing indentation of the underlying "module.xml" file
1071+
readonly fourSpaces=" "
1072+
1073+
# Form of "org.keycloak.keycloak-model-infinispan" dependency to be appended
1074+
# right before the end of </dependencies> section of the "module.xml" file of
1075+
# "org.wildfly.clustering.infinispan.spi" module
1076+
keycloakModelInfinispanDependency=$(cat <<- EOF
1077+
${fourSpaces}${fourSpaces}<!--
1078+
${fourSpaces}${fourSpaces} ~ CIAM-743: Explicitly add "org.keycloak.keycloak-model-infinispan" module as
1079+
${fourSpaces}${fourSpaces} ~ a dependency to the Wildfly's "org.wildfly.clustering.infinispan.spi" module
1080+
${fourSpaces}${fourSpaces} -->
1081+
${fourSpaces}${fourSpaces}<module name="org.keycloak.keycloak-model-infinispan" export="true" services="import"/>
1082+
EOF
1083+
)
1084+
1085+
# Escape all newlines in the value of 'keycloakModelInfinispanDependency'
1086+
keycloakModelInfinispanDependency="${keycloakModelInfinispanDependency//$'\n'/\\n}"
1087+
1088+
# Actually append the new "org.keycloak.keycloak-model-infinispan" dependency line
1089+
sed -i "s|${fourSpaces}</dependencies>|${keycloakModelInfinispanDependency}\n${fourSpaces}</dependencies>|" \
1090+
"${wildflyClusteringInfinispanSpiModuleXml}"
1091+
1092+
### CIAM-743 -- End of RH-SSO add-on

modules/eap/setup/eap/modules/module.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ artifacts:
3232
- name: eap-image-maven-repo
3333
target: maven-repo.zip
3434
md5: 244700ed92787ad537e360069d9ca9b1
35-
url: http://$DOWNLOAD_SERVER/devel/candidates/jboss/eap/JBEAP-7.4.0.GA-CR3/jboss-eap-7.4.0.GA-CR3-image-builder-maven-repository.zip
35+
url: http://$DOWNLOAD_SERVER/released/JBoss-middleware/eap7/7.4.0/jboss-eap-7.4.0-image-builder-maven-repository.zip
3636
# CIAM-711: Update RH-SSO server overlay to 'RH-SSO 7.5.0.CR4' build
3737
- name: keycloak-server-overlay.zip
3838
md5: 4150d09f7bf5d524b4173f8850a06617
Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
function prepareEnv() {
44
unset SSO_REALM
@@ -12,17 +12,13 @@ function configure() {
1212
}
1313

1414
function realm_import() {
15-
if [ -n "$SSO_REALM" ]; then
15+
if [ -n "${SSO_REALM}" ]; then
1616
sed -i "s|##REALM##|${SSO_REALM}|" "${IMPORT_REALM_FILE}"
17-
18-
if [ -n "$SSO_SERVICE_USERNAME" ]; then
19-
20-
if [ -n "$SSO_SERVICE_PASSWORD" ]; then
21-
$JBOSS_HOME/bin/add-user-keycloak.sh -r $SSO_REALM -u $SSO_SERVICE_USERNAME -p $SSO_SERVICE_PASSWORD --roles realm-management/realm-admin
17+
if [ -n "${SSO_SERVICE_USERNAME}" ]; then
18+
if [ -n "${SSO_SERVICE_PASSWORD}" ]; then
19+
"${JBOSS_HOME}/bin/add-user-keycloak.sh" -r "${SSO_REALM}" -u "${SSO_SERVICE_USERNAME}" -p "${SSO_SERVICE_PASSWORD}" --roles realm-management/realm-admin
2220
fi
2321
fi
24-
25-
SSO_IMPORT_FILE="$IMPORT_REALM_FILE"
22+
export SSO_IMPORT_FILE="${IMPORT_REALM_FILE}"
2623
fi
2724
}
28-

0 commit comments

Comments
 (0)