Skip to content

Commit

Permalink
sso ci: better login check
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jul 24, 2023
1 parent 5829339 commit a70a85a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/smb-kerberos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: --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 [email protected]: --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 [email protected]: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt)
echo $CONTENT
CONTENT=$(echo $CONTENT | head -n 1 | tr -d '[:space:]')
Expand Down
3 changes: 2 additions & 1 deletion apps/files_external/tests/start-apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a70a85a

Please sign in to comment.