From a70a85a5dcc9d52d2449d9c7ac0560a44592bfbd Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 24 Jul 2023 16:35:54 +0200 Subject: [PATCH] sso ci: better login check Signed-off-by: Robin Appelman --- .github/workflows/smb-kerberos.yml | 5 +++-- apps/files_external/tests/start-apache.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smb-kerberos.yml b/.github/workflows/smb-kerberos.yml index 3a89b00682664..6b5d4fa56bdc2 100644 --- a/.github/workflows/smb-kerberos.yml +++ b/.github/workflows/smb-kerberos.yml @@ -64,9 +64,10 @@ jobs: chmod 0777 /tmp/shared/cookies echo "SAML login" - ./client-cmd.sh ${{ env.DC_IP }} curl -i -c /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login?originalUrl=success - cat /tmp/shared/cookies/jar + LOGIN_CONTENT=$(./client-cmd.sh ${{ env.DC_IP }} curl -i -c /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login?originalUrl=success) echo "Check we are logged in" + [[ "$LOGIN_CONTENT" =~ "Location: success" ]] + echo "Getting test file" CONTENT=$(./client-cmd.sh ${{ env.DC_IP }} curl -i -b /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt) echo $CONTENT CONTENT=$(echo $CONTENT | head -n 1 | tr -d '[:space:]') diff --git a/apps/files_external/tests/start-apache.sh b/apps/files_external/tests/start-apache.sh index 2c3e178e2efeb..b5c8ab70f35b0 100755 --- a/apps/files_external/tests/start-apache.sh +++ b/apps/files_external/tests/start-apache.sh @@ -2,8 +2,9 @@ docker rm -f apache 2>/dev/null > /dev/null -docker run -d --name apache -v $2:/var/www/html -v /tmp/shared:/shared --dns $1 --hostname httpd.domain.test icewind1991/samba-krb-test-apache 1>&2 +docker run -d --name apache -v $2:/var/www/html -v /var/www/html/data -v /var/www/html/config -v /tmp/shared:/shared --dns $1 --hostname httpd.domain.test icewind1991/samba-krb-test-apache 1>&2 APACHE_IP=$(docker inspect apache --format '{{.NetworkSettings.IPAddress}}') +docker exec apache chown 33 /var/www/html/config /var/www/html/data # add the dns record for apache docker exec dc samba-tool dns add krb.domain.test domain.test httpd A $APACHE_IP -U administrator --password=passwOrd1 1>&2