Skip to content

Commit d834cef

Browse files
Jan Lieskovskypskopek
authored andcommitted
[CIAM-1975] Apply one-off patch for CIAM-1975
Add image prelaunch check to verify it's properly installed Signed-off-by: Jan Lieskovsky <[email protected]>
1 parent 37b7ec5 commit d834cef

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

modules/sso/apply/patches/apply-eap-rh-sso-one-off-patches.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ export JAVA_OPTS="${JAVA_OPTS} -Dorg.wildfly.patching.jar.invalidation=true"
88
# Do not use for cycle, it would faile if no such files are found
99
find "${SOURCES_DIR}" \( -name 'eap-one-off-*.zip' -o -name 'rh-sso-*.zip' \) | while read -r I; do
1010
echo "Applying patch: '$I' ..."
11-
"${JBOSS_HOME}"/bin/jboss-cli.sh --command="patch apply $I"
11+
# CIAM-1975 Prevent any possible 'Conflicts detected:' error while applying
12+
# the patch by using the '--override-all' option of patch apply command
13+
"${JBOSS_HOME}"/bin/jboss-cli.sh --command="patch apply $I --override-all"
1214
done

modules/sso/apply/patches/module.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ description: Module to apply any possibly needed EAP / RH-SSO one-off patches vi
55
execute:
66
- script: apply-eap-rh-sso-one-off-patches.sh
77

8+
artifacts:
9+
# CIAM-1975
10+
- md5: 8f54d950472fb9abf34e2f965303a5fc
11+
name: rhsso-1974.zip
12+
target: eap-one-off-rhsso-1974.zip
13+
url: http://$DOWNLOAD_SERVER/devel/candidates/JBSSO/JBSSO-7.5.1-CIAM-1974-patch/rhsso-1974.zip
14+
815
# Note:
916
#
1017
# All EAP one-offs artifacts must be prefixed with "eap-one-off-" prefix and suffixed with ".zip".

modules/sso/sso-pre-launch-checks/added/sso_image_pre_launch_checks.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function postConfigure() {
1010
verify_CVE_2020_10695_fix_present
1111
verify_KEYCLOAK_16736_fix_present
1212
verify_CIAM_1757_fix_present
13+
verify_CIAM_1975_fix_present
1314
}
1415

1516
# KEYCLOAK-13585 / RH BZ#1817530 / CVE-2020-10695:
@@ -75,3 +76,17 @@ function verify_CIAM_1757_fix_present() {
7576
exit "${errorExitCode}"
7677
fi
7778
}
79+
80+
# CIAM-1975
81+
#
82+
# Verify one-off patch for CIAM-1975 got properly installed to the expected location
83+
#
84+
function verify_CIAM_1975_fix_present() {
85+
local -r errorExitCode="1"
86+
if ! find "${JBOSS_HOME}"/modules/system/layers -name '*-rhsso-1974.jar' 2> /dev/null | grep -q .
87+
then
88+
log_error "The CIAM-1975 one-off patch wasn't properly installed."
89+
log_error "Cannot start the '${JBOSS_IMAGE_NAME}', version '${JBOSS_IMAGE_VERSION}'!"
90+
exit "${errorExitCode}"
91+
fi
92+
}

0 commit comments

Comments
 (0)