2023-05-10 13:25:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o pipefail
|
|
|
|
|
2023-09-11 08:46:29 +00:00
|
|
|
echo "Executing federation-sssd-setup.sh to prepare SSSD and PAM"
|
|
|
|
quarkus/dist/src/main/content/bin/federation-sssd-setup.sh
|
2023-05-10 13:25:12 +00:00
|
|
|
|
|
|
|
if [[ "true" == "$1" ]]; then
|
|
|
|
echo "Adding users and groups for the test"
|
|
|
|
|
|
|
|
printf "%b" "password\n" | kinit admin
|
|
|
|
ipa group-add --desc='test group' testgroup
|
2023-07-03 07:44:53 +00:00
|
|
|
ipa user-add emily --first=Emily --last=Jones --email=Emily@jones.com --random
|
2023-05-10 13:25:12 +00:00
|
|
|
ipa group-add-member testgroup --users=emily
|
|
|
|
ipa user-add bart --first=bart --last=bart --email= --random
|
|
|
|
ipa user-add david --first=david --last=david --random
|
|
|
|
kdestroy
|
|
|
|
|
|
|
|
ldapmodify -D "cn=Directory Manager" -w password <<EOF
|
|
|
|
dn: uid=emily,cn=users,cn=accounts,dc=example,dc=test
|
|
|
|
changetype: modify
|
|
|
|
replace: userpassword
|
|
|
|
userpassword: emily123
|
|
|
|
|
|
|
|
dn: uid=bart,cn=users,cn=accounts,dc=example,dc=test
|
|
|
|
changetype: modify
|
|
|
|
replace: userpassword
|
|
|
|
userpassword: bart123
|
|
|
|
|
|
|
|
dn: uid=david,cn=users,cn=accounts,dc=example,dc=test
|
|
|
|
changetype: modify
|
|
|
|
replace: userpassword
|
|
|
|
userpassword: david123
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
printf "%b" "password\n" | kinit admin
|
|
|
|
ipa user-disable david
|
|
|
|
kdestroy
|
|
|
|
fi
|
|
|
|
|
2024-06-03 12:17:28 +00:00
|
|
|
echo "Installing jdk-21 in the container"
|
|
|
|
dnf install -y java-21-openjdk-devel
|
|
|
|
export JAVA_HOME=/etc/alternatives/java_sdk_21
|
2023-05-10 13:25:12 +00:00
|
|
|
|
|
|
|
echo "Building quarkus keyclok server with SSSD integration"
|
|
|
|
./mvnw install -nsu -B -e -pl testsuite/integration-arquillian/servers/auth-server/quarkus -Pauth-server-quarkus
|
|
|
|
|
|
|
|
echo "Executing SSSD tests"
|
2024-07-17 08:16:43 +00:00
|
|
|
./mvnw -f testsuite/integration-arquillian/tests/other/sssd/pom.xml test -Psssd-testing -Dlogin.theme.default=base -Pauth-server-quarkus
|