Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 29c57f5

Browse files
author
Steve Bagwell
committed
Use php8 ssp-base feature branch and get manual tests mostly passing
1 parent e14c8ff commit 29c57f5

4 files changed

Lines changed: 145 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ _Note: This nag only works once since choosing later will simply set the nag da
173173
1. Goto [SP 1](http://ssp-sp1.local:8082/module.php/core/authenticate.php?as=hub-discovery)
174174
1. Click **idp4** (third one)
175175
1. Login as a "totp" user: `username=`**has_totp** `password=`**a**
176+
1. You should see the form to enter a totp code.
176177
1. Set up an app using this secret, `JVRXKYTMPBEVKXLS`
177178
1. Enter code from app to verify
178179
1. Click **Logout**

development/idp4/authsources.php

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,127 @@
77
'core:AdminPassword',
88
],
99
'silauth' => ConfigManager::getSspConfig(),
10+
'example-userpass' => [
11+
'exampleauth:UserPass',
12+
'nag_for_mfa:a' => [
13+
'eduPersonPrincipalName' => ['NAG_FOR_MFA@ssp-hub-idp4.local'],
14+
'eduPersonTargetID' => ['2b2d424e-8cb0-49c7-8c0b-7f660340f5fa'],
15+
'sn' => ['Mfas'],
16+
'givenName' => ['No'],
17+
'mail' => ['nag_for_mfa@example.com'],
18+
'employeeNumber' => ['11111'],
19+
'cn' => ['NAG_FOR_MFA'],
20+
'schacExpiryDate' => [
21+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
22+
],
23+
],
24+
'must_set_up_mfa:a' => [
25+
'eduPersonPrincipalName' => ['MUST_SET_UP_MFA@ssp-hub-idp4.local'],
26+
'eduPersonTargetID' => ['ef960c92-09fc-44f4-aadf-2d3aea6e0dbd'],
27+
'sn' => ['Have'],
28+
'givenName' => ['Must'],
29+
'mail' => ['must_set_up_mfa@example.com'],
30+
'employeeNumber' => ['22222'],
31+
'cn' => ['MUST_SET_UP_MFA'],
32+
'schacExpiryDate' => [
33+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
34+
],
35+
],
36+
'has_backupcode:a' => [
37+
'eduPersonPrincipalName' => ['HAS_BACKUPCODE@ssp-hub-idp4.local'],
38+
'eduPersonTargetID' => ['ef960c92-09fc-44f4-aadf-2d3aea6e0dbd'],
39+
'sn' => ['BackupCode'],
40+
'givenName' => ['Has'],
41+
'mail' => ['has_backupcode@example.com'],
42+
'employeeNumber' => ['33333'],
43+
'cn' => ['HAS_BACKUPCODE'],
44+
'schacExpiryDate' => [
45+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
46+
],
47+
],
48+
'has_totp:a' => [
49+
'eduPersonPrincipalName' => ['HAS_TOTP@ssp-hub-idp4.local'],
50+
'eduPersonTargetID' => ['7bab90d3-9f54-4187-804d-7f6400021789'],
51+
'sn' => ['TOTP'],
52+
'givenName' => ['Has'],
53+
'mail' => ['has_totp@example.com'],
54+
'employeeNumber' => ['44444'],
55+
'cn' => ['HAS_TOTP'],
56+
'schacExpiryDate' => [
57+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
58+
],
59+
],
60+
'has_u2f:a' => [
61+
'eduPersonPrincipalName' => ['HAS_U2F@ssp-hub-idp4.local'],
62+
'eduPersonTargetID' => ['6b614606-bbe8-4793-b0db-ca862295c661'],
63+
'sn' => ['U2F'],
64+
'givenName' => ['Has'],
65+
'mail' => ['has_u2f@example.com'],
66+
'employeeNumber' => ['55555'],
67+
'cn' => ['HAS_U2F'],
68+
'schacExpiryDate' => [
69+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
70+
],
71+
],
72+
'has_webauthn:a' => [
73+
'eduPersonPrincipalName' => ['HAS_WEBAUTHN@ssp-hub-idp4.local'],
74+
'eduPersonTargetID' => ['c818d44a-a322-45f4-a1d0-6afc3c2a54e9'],
75+
'sn' => ['Webauthn'],
76+
'givenName' => ['Has'],
77+
'mail' => ['has_webauthn@example.com'],
78+
'employeeNumber' => ['66666'],
79+
'cn' => ['HAS_WEBAUTHN'],
80+
'schacExpiryDate' => [
81+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
82+
],
83+
],
84+
'has_all_legacy:a' => [
85+
'eduPersonPrincipalName' => ['HAS_ALL_LEGACY@ssp-hub-idp4.local'],
86+
'eduPersonTargetID' => ['7c695eac-dbca-45d0-b3dc-2df2e1d2294c'],
87+
'sn' => ['All'],
88+
'givenName' => ['Has'],
89+
'mail' => ['has_all_legacy@example.com'],
90+
'employeeNumber' => ['77777'],
91+
'cn' => ['HAS_ALL_LEGACY'],
92+
'schacExpiryDate' => [
93+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
94+
],
95+
],
96+
'has_all:a' => [
97+
'eduPersonPrincipalName' => ['HAS_ALL@ssp-hub-idp4.local'],
98+
'eduPersonTargetID' => ['7c695eac-dbca-45d0-b3dc-2df2e1d2294c'],
99+
'sn' => ['All'],
100+
'givenName' => ['Has'],
101+
'mail' => ['has_all@example.com'],
102+
'employeeNumber' => ['77778'],
103+
'cn' => ['HAS_ALL'],
104+
'schacExpiryDate' => [
105+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
106+
],
107+
],
108+
'needs_review:a' => [
109+
'eduPersonPrincipalName' => ['NEEDS_REVIEW@ssp-hub-idp4.local'],
110+
'eduPersonTargetID' => ['7c695eac-dbca-45d0-b3dc-123jkhf23bql'],
111+
'sn' => ['Needed'],
112+
'givenName' => ['Review'],
113+
'mail' => ['needs_review@example.com'],
114+
'employeeNumber' => ['88888'],
115+
'cn' => ['NEEDS_REVIEW'],
116+
'schacExpiryDate' => [
117+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
118+
],
119+
],
120+
'nag_for_method:a' => [
121+
'eduPersonPrincipalName' => ['NAG_FOR_METHOD@ssp-hub-idp4.local'],
122+
'eduPersonTargetID' => ['7c695eac-dbca-45d0-b3dc-123jkhf23bbq'],
123+
'sn' => ['For_Method'],
124+
'givenName' => ['Nag'],
125+
'mail' => ['nag_for_method@example.com'],
126+
'employeeNumber' => ['99999'],
127+
'cn' => ['NAG_FOR_METHOD'],
128+
'schacExpiryDate' => [
129+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
130+
],
131+
],
132+
],
10133
];

development/idp4/saml20-idp-hosted.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
'authproc' => [
1010
10 => [
1111
'class' => 'mfa:Mfa',
12+
'idpDomainName' => 'idp4',
1213
'employeeIdAttr' => 'employeeNumber',
1314
'idBrokerAccessToken' => Env::get('ID_BROKER_ACCESS_TOKEN'),
1415
'idBrokerAssertValidIp' => Env::get('ID_BROKER_ASSERT_VALID_IP'),

docker-compose.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '2.0'
22

33
services:
44
hub1:
5-
image: silintl/ssp-base:develop
5+
image: silintl/ssp-base:featurephp8
66
volumes:
77
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
88
- ./development/hub1/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -35,7 +35,7 @@ services:
3535
ANALYTICS_ID: "UA-XXXX-Y"
3636

3737
idp1: # used for basic testing
38-
image: silintl/ssp-base:develop
38+
image: silintl/ssp-base:featurephp8
3939
volumes:
4040
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
4141
- ./development/idp1/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -57,7 +57,7 @@ services:
5757
IDP_DISPLAY_NAME: "IdP 1"
5858

5959
idp2: # used for expiry testing
60-
image: silintl/ssp-base:develop
60+
image: silintl/ssp-base:featurephp8
6161
volumes:
6262
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
6363
- ./development/idp2/enable:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/enable
@@ -87,7 +87,7 @@ services:
8787
PASSWORD_FORGOT_URL: "https://example.org/forgot"
8888

8989
idp4: # used for mfa testing (as well as some helpful links)
90-
image: silintl/ssp-base:develop
90+
image: silintl/ssp-base:featurephp8
9191
volumes:
9292
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
9393
- ./development/idp4/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -140,7 +140,7 @@ services:
140140
MYSQL_PASSWORD: "pass"
141141

142142
broker:
143-
image: silintl/idp-id-broker:develop
143+
image: silintl/idp-id-broker:latest
144144
volumes:
145145
- ./development/idp4/m991231_235959_insert_mfa_test_users.php:/data/console/migrations/m991231_235959_insert_mfa_test_users.php
146146
ports:
@@ -167,6 +167,17 @@ services:
167167
API_ACCESS_KEYS: "test-cli-abc123"
168168
APP_ENV: "dev"
169169
MIGRATE_PW_FROM_LDAP: "false"
170+
# The first is the actual url, the second is based on the idpDomainName in the saml20-idp-hosted.php file
171+
RP_ORIGINS: "https://idp-4.local,https://idp4"
172+
MFA_TOTP_apiBaseUrl: "http://totpbackend.org/"
173+
MFA_TOTP_apiKey: "abc"
174+
MFA_TOTP_apiSecret: "abcd"
175+
MFA_WEBAUTHN_apiBaseUrl: "http://webauthnbackend.org/"
176+
MFA_WEBAUTHN_apiKey: "abc"
177+
MFA_WEBAUTHN_apiSecret: "abcd"
178+
MFA_WEBAUTHN_appId: "idp4"
179+
MFA_WEBAUTHN_rpDisplayName: "IdP4"
180+
MFA_WEBAUTHN_rpId: "idp4"
170181
command: ["bash", "-c", "whenavail brokerDb 3306 60 ./yii migrate --interactive=0 && ./run.sh"]
171182

172183
brokerDb:
@@ -191,7 +202,7 @@ services:
191202
PMA_PASSWORD: "pass"
192203

193204
hub2: # used for announcement testing
194-
image: silintl/ssp-base:develop
205+
image: silintl/ssp-base:featurephp8
195206
volumes:
196207
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
197208
- ./development/hub2/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -221,7 +232,7 @@ services:
221232
IDP_DISPLAY_NAME: "Hub 2"
222233

223234
idp3: # used for announcement testing
224-
image: silintl/ssp-base:develop
235+
image: silintl/ssp-base:featurephp8
225236
volumes:
226237
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
227238
- ./development/idp3/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -248,7 +259,7 @@ services:
248259
IDP_DISPLAY_NAME: "IdP 3"
249260

250261
sp1:
251-
image: silintl/ssp-base:develop
262+
image: silintl/ssp-base:featurephp8
252263
volumes:
253264
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
254265
- ./development/sp1/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
@@ -269,7 +280,7 @@ services:
269280
IDP_DISPLAY_NAME: "SP 1"
270281

271282
sp2: # used for announcement testing
272-
image: silintl/ssp-base:develop
283+
image: silintl/ssp-base:featurephp8
273284
volumes:
274285
- ./development/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
275286
- ./development/sp2/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php

0 commit comments

Comments
 (0)