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

Commit 0e6746b

Browse files
Merge pull request #23 from silinternational/develop
Get announcements working properly
2 parents d6ca58a + 0b06a15 commit 0e6746b

21 files changed

+301
-174
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
start:
1+
start:
22
docker-compose up -d
33

4-
errors:
4+
errors:
55
docker-compose exec hub cat /var/log/apache2/error.log
66
docker-compose exec idp1 cat /var/log/apache2/error.log
77
docker-compose exec idp2 cat /var/log/apache2/error.log
88

99
clean:
1010
docker-compose kill
11-
docker-compose rm -f
11+
docker system prune -f

README.md

Lines changed: 88 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Update `/simplesamlphp/config/config.php`:
1414
'theme.use' => 'material:material'
1515
```
1616

17+
_[ssp-base](https://github.com/silinternational/ssp-base) provides a convenience by loading this config with whatever is in the environment variable `THEME_USE`._
18+
1719
### Google reCAPTCHA
1820
If a site key has been provided in `$this->data['recaptcha.siteKey']`, the
1921
username/password page may require the user prove his/her humanity.
@@ -25,8 +27,7 @@ Update `/simplesamlphp/config/config.php`:
2527
'theme.color-scheme' => ['indigo-purple'|'blue_grey-teal'|'red-teal'|'orange-light_blue']
2628
```
2729

28-
The login page will get its images from `/simplesamlphp/www/favicon.ico` and
29-
`/simplesamlphp/www/logo.png` which are **NOT** provided by default.
30+
The login page looks for `/simplesamlphp/www/logo.png` which is **NOT** provided by default.
3031

3132
### Analytics
3233
Update `/simplesamlphp/config/config.php`:
@@ -35,9 +36,18 @@ Update `/simplesamlphp/config/config.php`:
3536
'analytics.trackingId' => 'UA-some-unique-id-for-your-site'
3637
```
3738

39+
_[ssp-base](https://github.com/silinternational/ssp-base) provides a convenience by loading this config with whatever is in the environment variable `ANALYTICS_ID`._
40+
3841
### Announcements
39-
If something is found in `$this->data['announcement']` an alert will be shown to the user filled with the
40-
content of that announcement. HTML is supported.
42+
Update `/simplesamlphp/config/config.php`:
43+
44+
```
45+
'announcement' => 'Some <strong>important</strong> announcement'
46+
```
47+
48+
_[ssp-base](https://github.com/silinternational/ssp-base) provides a convenience by loading this config with whatever is returned by `/simplesamlphp/announcement/announcement.php`._
49+
50+
If configured, an alert will be shown to the user filled with the content of that announcement. HTML is supported.
4151

4252
## Testing theme
4353

@@ -46,61 +56,87 @@ content of that announcement. HTML is supported.
4656

4757
### Setup
4858

49-
1. Setup `localhost` aliases for `ssp-hub.local`, `ssp-hub-idp1.local`, and `ssp-hub-idp2.local`. This is typically done in `/etc/hosts`.
59+
1. Setup `localhost` aliases for `ssp-hub.local`, `ssp-hub2.local`, `ssp-hub-idp1.local`, and `ssp-hub-idp2.local`. This is typically done in `/etc/hosts`.
5060
2. Start test environment, e.g., `make` from the command line.
51-
3. Goto [http://ssp-hub.local](http://ssp-hub.local).
52-
4. Login as hub administrator, e.g., username=admin & password=abc123
53-
54-
### Hub
55-
1. Click **Authentication** tab
56-
2. Click **Test configured authentication sources**
57-
3. Click **hub-discovery**
58-
59-
### Error
60-
1. Click **Federation** tab
61-
2. Click either **Show metadata** link
62-
63-
### Logout
64-
1. Click **Authentication** tab
65-
2. Click **Test configured authentication sources**
66-
3. Click **admin**
67-
4. Click **Logout**
68-
69-
### Login
70-
1. Click **Authentication** tab
71-
2. Click **Test configured authentication sources**
72-
3. Click **hub-discovery**
73-
4. Click **Login with idp1** (NOTE: login page should NOT have material design)
74-
5. Login as idp1 administrator, e.g., username=admin & password=a
75-
6. Click **Logout**
76-
7. Goto [http://ssp-hub.local](http://ssp-hub.local)
77-
8. Click **Authentication** tab
78-
9. Click **Test configured authentication sources**
79-
10. Click **hub-discovery**
80-
11. Click **Login with idp2** (NOTE: login page should have material design)
81-
12. Login as an idp2 user, e.g., username=distant_future & password=a
82-
13. Click **Logout**
8361

84-
### Expiry
62+
### Hub page
63+
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
64+
2. Login as hub administrator, e.g., username=admin & password=abc123
65+
3. Click **Authentication** tab
66+
4. Click **Test configured authentication sources**
67+
5. Click **hub-discovery**
8568

86-
#### About to expire
69+
### Error page
8770
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
88-
2. Click **Authentication** tab
89-
3. Click **Test configured authentication sources**
90-
4. Click **hub-discovery**
91-
5. Click **Login with idp2**
92-
6. Login as an an "about to expire" user, e.g., username=near_future & password=b
93-
7. Click **Maybe later**
94-
8. Click **Logout**
71+
2. Login as hub administrator, e.g., username=admin & password=abc123
72+
3. Click **Federation** tab
73+
4. Click either **Show metadata** link
9574

96-
#### Expired
75+
### Logout page
9776
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
98-
2. Click **Authentication** tab
99-
3. Click **Test configured authentication sources**
100-
4. Click **hub-discovery**
101-
5. Click **Login with idp2**
102-
6. Login as an an "expired" user, e.g., username=already_past & password=c
77+
2. Login as hub administrator, e.g., username=admin & password=abc123
78+
3. Click **Authentication** tab
79+
4. Click **Test configured authentication sources**
80+
5. Click **admin**
81+
6. Click **Logout**
10382

83+
### Login page
84+
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
85+
2. Login as hub administrator, e.g., username=admin & password=abc123
86+
3. Click **Authentication** tab
87+
4. Click **Test configured authentication sources**
88+
5. Click **hub-discovery**
89+
6. Click **Login with idp1** (NOTE: login page should NOT have material design)
90+
7. Login as idp1 administrator, e.g., username=admin & password=a
91+
8. Click **Logout**
92+
9. Goto [http://ssp-hub.local](http://ssp-hub.local)
93+
10. Click **Authentication** tab
94+
11. Click **Test configured authentication sources**
95+
12. Click **hub-discovery**
96+
13. Click **Login with idp2** (NOTE: login page should have material design)
97+
14. Login as an idp2 user, e.g., username=distant_future & password=a
98+
15. Click **Logout**
99+
100+
### Forgot password functionality
101+
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
102+
2. Login as hub administrator, e.g., username=admin & password=abc123
103+
3. Click **Authentication** tab
104+
4. Click **Test configured authentication sources**
105+
5. Click **hub-discovery**
106+
6. Click **Login with idp2**
107+
7. Forgot password link should be visible
108+
109+
### Expiry functionality
110+
#### About to expire page
111+
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
112+
2. Login as hub administrator, e.g., username=admin & password=abc123
113+
3. Click **Authentication** tab
114+
4. Click **Test configured authentication sources**
115+
5. Click **hub-discovery**
116+
6. Click **Login with idp2**
117+
7. Login as an an "about to expire" user, e.g., username=near_future & password=b
118+
8. Click **Later**
119+
9. Click **Logout**
120+
121+
#### Expired page
122+
1. Goto [http://ssp-hub.local](http://ssp-hub.local)
123+
2. Login as hub administrator, e.g., username=admin & password=abc123
124+
3. Click **Authentication** tab
125+
4. Click **Test configured authentication sources**
126+
5. Click **hub-discovery**
127+
6. Click **Login with idp2**
128+
7. Login as an an "expired" user, e.g., username=already_past & password=c
129+
130+
### Announcements functionality
131+
1. Goto [http://ssp-hub2.local:8081](http://ssp-hub2.local:8081)
132+
2. The announcement should be displayed
133+
3. Login as hub2 administrator, e.g., username=admin & password=abc123
134+
4. Click **Authentication** tab
135+
5. Click **Test configured authentication sources**
136+
6. Click **hub-discovery**
137+
7. The announcement should be displayed
138+
8. Click **Login with idp3**
139+
9. The announcement should be displayed
104140

105141
## i18n support
106142
Translations are categorized by page in definition files located in the `dictionaries` directory.

development/hub/cert/ssp-hub.crt

Lines changed: 0 additions & 23 deletions
This file was deleted.

development/hub/cert/ssp-hub.pem

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22
$metadata['ssp-hub.local'] = [
33
'host' => 'ssp-hub.local',
4-
'privatekey' => 'ssp-hub.pem',
5-
'certificate' => 'ssp-hub.crt',
64
'auth' => 'hub-discovery',
7-
];
5+
];

development/hub2/authsources.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
$config = [
3+
'admin' => [
4+
'core:AdminPassword',
5+
],
6+
'hub-discovery' => [
7+
'saml:SP',
8+
'entityID' => 'ssp-hub2.local',
9+
'discoURL' => 'http://ssp-hub2.local:8081/module.php/sildisco/disco.php',
10+
],
11+
];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
$metadata['ssp-hub2.local'] = [
3+
'host' => 'ssp-hub2.local',
4+
'auth' => 'hub-discovery',
5+
];
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?php
2+
$metadata['http://ssp-hub-idp3.local:8087'] = [
3+
'enabled' => true,
4+
'metadata-set' => 'saml20-idp-remote',
5+
'entityid' => 'http://ssp-hub-idp3.local:8087',
6+
'name' => [
7+
'en' => 'IdP 3'
8+
],
9+
'SingleSignOnService' => 'http://ssp-hub-idp3.local:8087/saml2/idp/SSOService.php',
10+
'SingleLogoutService' => 'http://ssp-hub-idp3.local:8087/saml2/idp/SingleLogoutService.php',
11+
'certData' => 'MIIDzzCCAregAwIBAgIJAPlZYTAQSIbHMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJOQzEPMA0GA1UEBwwGV2F4aGF3MQwwCgYDVQQKDANTSUwxDTALBgNVBAsMBEdUSVMxDjAMBgNVBAMMBVN0ZXZlMSQwIgYJKoZIhvcNAQkBFhVzdGV2ZV9iYWd3ZWxsQHNpbC5vcmcwHhcNMTYxMDE3MTIzMTQ1WhcNMjYxMDE3MTIzMTQ1WjB+MQswCQYDVQQGEwJVUzELMAkGA1UECAwCTkMxDzANBgNVBAcMBldheGhhdzEMMAoGA1UECgwDU0lMMQ0wCwYDVQQLDARHVElTMQ4wDAYDVQQDDAVTdGV2ZTEkMCIGCSqGSIb3DQEJARYVc3RldmVfYmFnd2VsbEBzaWwub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArssOaeKbdOQFpN6bBolwSJ/6QFBXA73Sotg60anx9v6aYdUTmi+b7SVtvOmHDgsD5X8pN/6Z11QCZfTYg2nW3ZevGZsj8W/R6C8lRLHzWUr7e7DXKfj8GKZptHlUs68kn0ndNVt9r/+irJe9KBdZ+4kAihykomNdeZg06bvkklxVcvpkOfLTQzEqJAmISPPIeOXes6hXORdqLuRNTuIKarcZ9rstLnpgAs2TE4XDOrSuUg3XFnM05eDpFQpUb0RXWcD16mLCPWw+CPrGoCfoftD5ZGfll+W2wZ7d0kQ4TbCpNyxQH35q65RPVyVNPgSNSsFFkmdcqP9DsFqjJ8YC6wIDAQABo1AwTjAdBgNVHQ4EFgQUD6oyJKOPPhvLQpDCC3027QcuQwUwHwYDVR0jBBgwFoAUD6oyJKOPPhvLQpDCC3027QcuQwUwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAA6tCLHJQGfXGdFerQ3J0wUu8YDSLb0WJqPtGdIuyeiywR5ooJf8G/jjYMPgZArepLQSSi6t8/cjEdkYWejGnjMG323drQ9M1sKMUhOJF4po9R3t7IyvGAL3fSqjXA8JXH5MuGuGtChWxaqhduA0dBJhFAtAXQ61IuIQF7vSFxhTwCvJnaWdWD49sG5OqjCfgIQdY/mw70e45rLnR/bpfoigL67sTJxy+Kx2ogbvMR6lITByOEQFMt7BYpMtXrwvKUM7k9NOo1jREmJacC8PTx//jRhCWwzUj1RsfIri24BuITrawwqMsYl8DZiiwMpjUf9m4NPaf4E7+QRpzo+MCcg==',
12+
];
13+
$metadata['jaars-idp'] = [
14+
'enabled' => true,
15+
'metadata-set' => 'saml20-idp-remote',
16+
'entityid' => 'jaars-idp',
17+
'name' => [
18+
'en' => 'jaars'
19+
],
20+
'logoURL' => 'https://static.gtis.guru/idp-logo/jaars-logo.png'
21+
];
22+
$metadata['sil-idp'] = [
23+
'enabled' => true,
24+
'metadata-set' => 'saml20-idp-remote',
25+
'entityid' => 'sil-idp',
26+
'name' => [
27+
'en' => 'sil'
28+
],
29+
'logoURL' => 'https://static.gtis.guru/idp-logo/sil-logo.png'
30+
];
31+
$metadata['usa-idp'] = [
32+
'enabled' => true,
33+
'metadata-set' => 'saml20-idp-remote',
34+
'entityid' => 'usa-idp',
35+
'name' => [
36+
'en' => 'usa'
37+
],
38+
'logoURL' => 'https://static.gtis.guru/idp-logo/usa-logo.png'
39+
];
40+
$metadata['wga-idp'] = [
41+
'enabled' => true,
42+
'metadata-set' => 'saml20-idp-remote',
43+
'entityid' => 'wga-idp',
44+
'name' => [
45+
'en' => 'wga'
46+
],
47+
'logoURL' => 'https://static.gtis.guru/idp-logo/wga-logo.png'
48+
];
49+
$metadata['mock-jaars-idp'] = [
50+
'enabled' => false,
51+
'metadata-set' => 'saml20-idp-remote',
52+
'entityid' => 'mock-jaars-idp',
53+
'name' => [
54+
'en' => 'jaars'
55+
],
56+
'logoURL' => 'https://static.gtis.guru/idp-logo/jaars-logo.png'
57+
];
58+
$metadata['mock-sil-idp'] = [
59+
'enabled' => false,
60+
'metadata-set' => 'saml20-idp-remote',
61+
'entityid' => 'mock-sil-idp',
62+
'name' => [
63+
'en' => 'sil'
64+
],
65+
'logoURL' => 'https://static.gtis.guru/idp-logo/sil-logo.png'
66+
];
67+
$metadata['mock-usa-idp'] = [
68+
'enabled' => false,
69+
'metadata-set' => 'saml20-idp-remote',
70+
'entityid' => 'mock-usa-idp',
71+
'name' => [
72+
'en' => 'usa'
73+
],
74+
'logoURL' => 'https://static.gtis.guru/idp-logo/usa-logo.png'
75+
];
76+
$metadata['mock-wga-idp'] = [
77+
'enabled' => false,
78+
'metadata-set' => 'saml20-idp-remote',
79+
'entityid' => 'mock-wga-idp',
80+
'name' => [
81+
'en' => 'wga'
82+
],
83+
'logoURL' => 'https://static.gtis.guru/idp-logo/wga-logo.png'
84+
];

development/idp1/cert/ssp-hub-idp1.crt

Lines changed: 0 additions & 23 deletions
This file was deleted.

development/idp1/saml20-idp-hosted.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
$metadata['http://ssp-hub-idp1.local:8085'] = [
33
'host' => '__DEFAULT__',
44
'privatekey' => 'ssp-hub-idp1.pem',
5-
'certificate' => 'ssp-hub-idp1.crt',
65
'auth' => 'admin',
7-
];
6+
];

0 commit comments

Comments
 (0)