diff options
author | Robin Appelman <robin@icewind.nl> | 2023-01-23 17:30:17 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-01-23 18:21:47 +0100 |
commit | 3b577aa5b2bdacca287ad0de0ab0e628d3154105 (patch) | |
tree | bd65613cf40a9002c8430862680653d432d3f824 /.github | |
parent | 54973c3cf9471dbf6754f7bce23bb620393001e7 (diff) | |
download | nextcloud-server-3b577aa5b2bdacca287ad0de0ab0e628d3154105.tar.gz nextcloud-server-3b577aa5b2bdacca287ad0de0ab0e628d3154105.zip |
Update kerberos sso test setup to use new user_saml config system
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/smb-kerberos.yml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/.github/workflows/smb-kerberos.yml b/.github/workflows/smb-kerberos.yml index 22b8241d710..896d96e592c 100644 --- a/.github/workflows/smb-kerberos.yml +++ b/.github/workflows/smb-kerberos.yml @@ -16,7 +16,7 @@ jobs: smb-kerberos-tests: runs-on: ubuntu-latest - name: kerberos + name: smb-kerberos-sso steps: - name: Checkout server @@ -30,9 +30,12 @@ jobs: docker pull icewind1991/samba-krb-test-client - name: Setup AD-DC run: | + cp apps/files_external/tests/*.sh . mkdir data sudo chown -R 33 data apps config - apps/files_external/tests/setup-krb.sh + DC_IP=$(./start-dc.sh) + ./start-apache.sh $DC_IP $PWD + echo "DC_IP=$DC_IP" >> $GITHUB_ENV - name: Set up Nextcloud run: | docker exec --user 33 apache ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password @@ -41,7 +44,8 @@ jobs: # setup user_saml docker exec --user 33 apache ./occ app:enable user_saml --force docker exec --user 33 apache ./occ config:app:set user_saml type --value 'environment-variable' - docker exec --user 33 apache ./occ config:app:set user_saml general-uid_mapping --value REMOTE_USER + docker exec --user 33 apache ./occ saml:config:create + docker exec --user 33 apache ./occ saml:config:set 1 --general-uid_mapping=REMOTE_USER # setup external storage docker exec --user 33 apache ./occ app:enable files_external --force @@ -51,16 +55,12 @@ jobs: docker exec --user 33 apache ./occ files_external:list - name: Test SSO run: | - mkdir cookies - chmod 0777 cookies + mkdir /tmp/shared/cookies + chmod 0777 /tmp/shared/cookies - DC_IP=$(docker inspect dc --format '{{.NetworkSettings.IPAddress}}') echo "SAML login" - docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \ - curl -c /cookies/jar --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login + ./client-cmd.sh ${{ env.DC_IP }} curl -c /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php/apps/user_saml/saml/login echo "Check we are logged in" - CONTENT=$(docker run --rm --name client -v $PWD/cookies:/cookies -v /tmp/shared:/shared --dns $DC_IP --hostname client.domain.test icewind1991/samba-krb-test-client \ - curl -b /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 | tr -d '[:space:]') + CONTENT=$(./client-cmd.sh ${{ env.DC_IP }} curl -b /shared/cookies/jar -s --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/remote.php/webdav/smb/test.txt) + CONTENT=$(echo $CONTENT | head -n 1 | tr -d '[:space:]') [[ $CONTENT == "testfile" ]] |