Skip to content

Commit 32af94e

Browse files
committed
ci fixes
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 62cd0db commit 32af94e

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

.github/workflows/smb-kerberos.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818

1919
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
2020

21-
name: smb-kerberos-sso
22-
2321
steps:
2422
- name: Checkout server
2523
uses: actions/checkout@v3
@@ -62,8 +60,6 @@ jobs:
6260

6361
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
6462

65-
name: smb-kerberos-sso
66-
6763
steps:
6864
- name: Checkout server
6965
uses: actions/checkout@v3
@@ -74,7 +70,7 @@ jobs:
7470
with:
7571
repository: nextcloud/user_saml
7672
path: apps/user_saml
77-
ref: event-dispatcher
73+
ref: stable27
7874
- name: Pull images
7975
run: |
8076
docker pull ghcr.io/icewind1991/samba-krb-test-dc
@@ -86,6 +82,7 @@ jobs:
8682
- name: Setup AD-DC
8783
run: |
8884
DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
85+
sleep 1
8986
apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD -v $PWD/apps/files_external/tests/sso-setup/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
9087
echo "DC_IP=$DC_IP" >> $GITHUB_ENV
9188
- name: Set up Nextcloud
@@ -106,8 +103,6 @@ jobs:
106103

107104
if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
108105

109-
name: smb-kerberos-sso
110-
111106
steps:
112107
- name: Checkout server
113108
uses: actions/checkout@v3
@@ -118,7 +113,7 @@ jobs:
118113
with:
119114
repository: nextcloud/user_saml
120115
path: apps/user_saml
121-
ref: event-dispatcher
116+
ref: stable27
122117
- name: Pull images
123118
run: |
124119
docker pull ghcr.io/icewind1991/samba-krb-test-dc
@@ -130,6 +125,7 @@ jobs:
130125
- name: Setup AD-DC
131126
run: |
132127
DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
128+
sleep 1
133129
apps/files_external/tests/sso-setup/start-apache.sh $DC_IP $PWD -v $PWD/apps/files_external/tests/sso-setup/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
134130
echo "DC_IP=$DC_IP" >> $GITHUB_ENV
135131
- name: Set up Nextcloud

apps/files_external/tests/sso-setup/apache-session.conf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@
1414
require valid-user
1515
</Location>
1616

17+
<Location /index.php>
18+
AuthType Kerberos
19+
AuthName "Kerberos authenticated intranet"
20+
KrbAuthRealms DOMAIN.TEST
21+
KrbServiceName HTTP/httpd.domain.test
22+
Krb5Keytab /shared/httpd.keytab
23+
KrbMethodNegotiate On
24+
KrbMethodK5Passwd On
25+
KrbSaveCredentials On
26+
require valid-user
27+
</Location>
28+
1729
ErrorLog /shared/apache-error.log
1830
CustomLog /shared/apache-access.log combined
1931
</VirtualHost>

apps/files_external/tests/sso-setup/run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ set -e
33

44
SCRIPT_DIR="${0%/*}"
55

6-
DC_IP=$(apps/files_external/tests/sso-setup/start-dc.sh)
7-
apps/files_external/tests/sso-setup/start-apache.sh "$DC_IP" "$PWD" -v "$PWD/$SCRIPT_DIR"/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
8-
apps/files_external/tests/sso-setup/setup-sso-nc.sh smb::kerberos_sso_session
6+
DC_IP=$("$SCRIPT_DIR"/start-dc.sh)
7+
"$SCRIPT_DIR"/start-apache.sh "$DC_IP" "$PWD" -v "$PWD/$SCRIPT_DIR"/apache-session.conf:/etc/apache2/sites-enabled/000-default.conf
8+
"$SCRIPT_DIR"/setup-sso-nc.sh smb::kerberos_sso_session
99

10-
apps/files_external/tests/sso-setup/test-sso-smb-session.sh "$DC_IP"
10+
"$SCRIPT_DIR"/test-sso-smb-session.sh "$DC_IP"

apps/files_external/tests/sso-setup/start-dc.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ docker run -dit --name dc -v /tmp/shared:/shared --hostname krb.domain.test --ca
2727

2828
waitContainer dc
2929

30+
sleep 5
31+
3032
docker inspect dc --format '{{.NetworkSettings.IPAddress}}'

apps/files_external/tests/sso-setup/test-sso-smb-session.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ else
1313
exit 1
1414
fi
1515

16+
"$SCRIPT_DIR/client-cmd.sh" "$DC_IP" curl -s -b /shared/cookie -c /shared/cookie --negotiate -u testuser@DOMAIN.TEST: --delegation always http://httpd.domain.test/index.php
17+
1618
echo -n "Getting test with session file: "
1719
CONTENT=$("$SCRIPT_DIR/client-cmd.sh" "$DC_IP" curl -s -b /shared/cookie 'http://httpd.domain.test/remote.php/webdav/smb/test.txt?XDEBUG_SESSION_START=1')
1820
CONTENT=$(echo "$CONTENT" | head -n 1 | tr -d '[:space:]')

0 commit comments

Comments
 (0)