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

Commit 4a1f835

Browse files
author
Billy Clark
committed
configs were missing to test expirycheck logic.
1 parent d154413 commit 4a1f835

File tree

4 files changed

+59
-6
lines changed

4 files changed

+59
-6
lines changed

development/idp2/authsources.php

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,42 @@
11
<?php
22
$config = [
3-
'admin' => [
4-
'core:AdminPassword',
3+
'example-userpass' => [
4+
'exampleauth:UserPass',
5+
'distant_future:a' => [
6+
'eduPersonPrincipalName' => ['[email protected]'],
7+
'eduPersonTargetID' => ['11111111-1111-1111-1111-111111111111'],
8+
'sn' => ['Future'],
9+
'givenName' => ['Distant'],
10+
'mail' => ['[email protected]'],
11+
'employeeNumber' => ['11111'],
12+
'cn' => ['DISTANT_FUTURE'],
13+
'schacExpiryDate' => [
14+
gmdate('YmdHis\Z', strtotime('+6 months')), // Distant future
15+
],
16+
],
17+
'near_future:b' => [
18+
'eduPersonPrincipalName' => ['[email protected]'],
19+
'eduPersonTargetID' => ['22222222-2222-2222-2222-222222222222'],
20+
'sn' => ['Future'],
21+
'givenName' => ['Near'],
22+
'mail' => ['[email protected]'],
23+
'employeeNumber' => ['22222'],
24+
'cn' => ['NEAR_FUTURE'],
25+
'schacExpiryDate' => [
26+
gmdate('YmdHis\Z', strtotime('+1 day')), // Very soon
27+
],
28+
],
29+
'already_past:c' => [
30+
'eduPersonPrincipalName' => ['[email protected]'],
31+
'eduPersonTargetID' => ['33333333-3333-3333-3333-333333333333'],
32+
'sn' => ['Past'],
33+
'givenName' => ['Already'],
34+
'mail' => ['[email protected]'],
35+
'employeeNumber' => ['33333'],
36+
'cn' => ['ALREADY_PAST'],
37+
'schacExpiryDate' => [
38+
gmdate('YmdHis\Z', strtotime('-1 day')), // In the past
39+
],
40+
],
541
],
6-
];
42+
];

development/idp2/enable

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
used to enable simplesaml modules.
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
<?php
2+
use Sil\PhpEnv\Env;
3+
use Sil\Psr3Adapters\Psr3SamlLogger;
4+
25
$metadata['http://ssp-hub-idp2.local:8086'] = [
36
'host' => '__DEFAULT__',
47
'privatekey' => 'ssp-hub-idp2.pem',
58
'certificate' => 'ssp-hub-idp2.crt',
6-
'auth' => 'admin',
7-
];
9+
'auth' => 'example-userpass',
10+
'authproc' => [
11+
10 => [
12+
'class' => 'expirychecker:ExpiryDate',
13+
'accountNameAttr' => 'cn',
14+
'expiryDateAttr' => 'schacExpiryDate',
15+
'changePwdUrl' => Env::get('CHANGE_PWD_URL'),
16+
'warnDaysBefore' => 14,
17+
'dateFormat' => 'Y-m-d',
18+
'loggerClass' => Psr3SamlLogger::class,
19+
]
20+
]
21+
];

docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ services:
3939
SECRET_SALT: "8yC5mb4wqANaU+Rxrl4DHkfKzikeieXkltfFd+YDzx8="
4040
IDP_NAME: "Idp 1"
4141
idp2:
42-
image: silintl/ssp-base:develop
42+
image: silintl/ssp-base:feature_add-expirychecker-0-1-0
4343
volumes:
4444
- ./development/idp2/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
45+
- ./development/idp2/enable:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/enable
4546
- ./development/idp2/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
4647
- ./development/idp2/saml20-idp-hosted.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-hosted.php
4748
- ./development/idp2/saml20-sp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-sp-remote.php
@@ -58,3 +59,4 @@ services:
5859
SECRET_SALT: "edI4GGkYfkzD6/OXFvHBHb9Meu9hdKXQpNFg4q/GGfY="
5960
IDP_NAME: "Idp 2"
6061
ANALYTICS_ID: "UA-XXXX-Y"
62+
CHANGE_PWD_URL: "http://example.org"

0 commit comments

Comments
 (0)