-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
462 lines (416 loc) · 16.7 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
services:
db:
image: mariadb:10
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: r00tp@ss!
MYSQL_DATABASE: silauth
MYSQL_USER: silauth
MYSQL_PASSWORD: silauth
dbadmin:
image: phpmyadmin
ports:
- "8080:80"
environment:
PMA_HOST: db
PMA_USER: silauth
PMA_PASSWORD: silauth
test:
build:
context: .
args:
COMPOSER_FLAGS: "--no-interaction --no-progress"
depends_on:
- ssp-hub.local
- ssp-idp1.local
- ssp-idp2.local
- ssp-idp3.local
- ssp-sp1.local
- ssp-sp2.local
- ssp-sp3.local
- pwmanager.local
- test-browser
environment:
MYSQL_HOST: db
MYSQL_DATABASE: silauth
MYSQL_USER: silauth
MYSQL_PASSWORD: silauth
PROFILE_URL_FOR_TESTS: http://pwmanager.local/module.php/core/authenticate.php?as=ssp-hub
ADMIN_PASS: b
SECRET_SALT: abc123
volumes:
- ./dockerbuild/run-integration-tests.sh:/data/run-integration-tests.sh
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh
- ./dockerbuild/run-tests.sh:/data/run-tests.sh
- ./dockerbuild/apply-dictionaries-overrides.php:/data/apply-dictionaries-overrides.php
- ./features:/data/features
- ./behat.yml:/data/behat.yml
- ./tests:/data/tests
- ./modules/mfa:/data/vendor/simplesamlphp/simplesamlphp/modules/mfa
- ./modules/expirychecker:/data/vendor/simplesamlphp/simplesamlphp/modules/expirychecker
- ./modules/profilereview:/data/vendor/simplesamlphp/simplesamlphp/modules/profilereview
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
command: [ "/data/run-tests.sh" ]
test-browser:
image: justinribeiro/chrome-headless:stable
platform: linux/amd64
ports:
- "9222:9222"
cap_add:
- SYS_ADMIN
composer:
build: .
volumes:
- ./composer.json:/data/composer.json
- ./composer.lock:/data/composer.lock
- ./installed-packages.json:/data/installed-packages.json
- ./development/update-composer-deps.sh:/data/update-composer-deps.sh
- ./vendor:/data/vendor
- composer-cache:/composer
env_file:
- ./local.env
environment:
COMPOSER_CACHE_DIR: /composer
ssp-hub.local:
build: .
volumes:
# Utilize custom certs
- ./development/hub/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/hub/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./dockerbuild/config/config.php:/data/vendor/simplesamlphp/simplesamlphp/config/config.php
- ./development/announcement.php:/data/vendor/simplesamlphp/simplesamlphp/announcement/announcement.php
# Utilize custom metadata
- ./development/hub/metadata:/data/vendor/simplesamlphp/simplesamlphp/metadata
# Enable checking our test metadata
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh
# Local modules
- ./modules/mfa:/data/vendor/simplesamlphp/simplesamlphp/modules/mfa
- ./modules/expirychecker:/data/vendor/simplesamlphp/simplesamlphp/modules/expirychecker
- ./modules/profilereview:/data/vendor/simplesamlphp/simplesamlphp/modules/profilereview
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
ports:
- "80:80"
environment:
ADMIN_PASS: "abc123"
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJ"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
THEME_COLOR_SCHEME: "orange-light_blue"
HUB_MODE: "true"
HELP_CENTER_URL: "https://example.org/help"
LOGGING_LEVEL: INFO
ssp-idp1.local: # using a database session store type ("sql")
build: .
depends_on:
- db
volumes:
# Utilize custom certs
- ./development/idp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/idp-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/announcement.php:/data/vendor/simplesamlphp/simplesamlphp/announcement/announcement.php
- ./development/enable-exampleauth.sh:/data/enable-exampleauth.sh
- ./development/logo_idp1.png:/data/vendor/simplesamlphp/simplesamlphp/public/logo.png
# Utilize custom metadata
- ./development/idp-local/metadata:/data/vendor/simplesamlphp/simplesamlphp/metadata
# Customized SSP code -- TODO: make a better solution that doesn't require hacking SSP code
- ./development/UserPass.php:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/src/Auth/Source/UserPass.php
# Enable checking our test metadata
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh
# Include the features folder (for the FakeIdBrokerClient class)
- ./features:/data/features
# Local modules
- ./modules/mfa:/data/vendor/simplesamlphp/simplesamlphp/modules/mfa
- ./modules/expirychecker:/data/vendor/simplesamlphp/simplesamlphp/modules/expirychecker
- ./modules/profilereview:/data/vendor/simplesamlphp/simplesamlphp/modules/profilereview
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
command: >
bash -c "whenavail db 3306 60 /data/vendor/simplesamlphp/simplesamlphp/modules/silauth/src/Auth/Source/yii migrate --interactive=0 &&
/data/enable-exampleauth.sh &&
/data/run.sh"
ports:
- "8085:80"
environment:
ADMIN_PASS: "a"
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJ"
IDP_DOMAIN_NAME: "mfaidp"
ID_BROKER_ACCESS_TOKEN: "dummy"
ID_BROKER_ASSERT_VALID_IP: "false"
ID_BROKER_BASE_URI: "dummy"
ID_BROKER_TRUSTED_IP_RANGES: "192.168.0.1/8"
MFA_SETUP_URL: "http://pwmanager.local/module.php/core/authenticate.php?as=ssp-hub-custom-port"
REMEMBER_ME_SECRET: "12345"
PROFILE_URL: "http://pwmanager.local/module.php/core/authenticate.php?as=ssp-hub-custom-port"
PROFILE_URL_FOR_TESTS: "http://pwmanager.local/module.php/core/authenticate.php?as=ssp-hub"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SESSION_STORE_TYPE: "sql"
MYSQL_HOST: "db"
MYSQL_DATABASE: "silauth"
MYSQL_USER: "silauth"
MYSQL_PASSWORD: "silauth"
BASE_URL_PATH: "http://ssp-idp1.local/" # change this to "http://ssp-idp1.local:8085" for manual browser testing
HELP_CENTER_URL: "https://example.org/help"
THEME_COLOR_SCHEME: "blue_grey-teal"
HUB_MODE: "false"
ssp-idp2.local:
build: .
depends_on:
- db
- broker
volumes:
# Utilize custom certs
- ./development/idp2-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/idp2-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/enable-exampleauth.sh:/data/enable-exampleauth.sh
- ./development/logo_idp2.png:/data/vendor/simplesamlphp/simplesamlphp/public/logo.png
# Utilize custom metadata
- ./development/idp2-local/metadata:/data/vendor/simplesamlphp/simplesamlphp/metadata
# Customized SSP code -- TODO: make a better solution that doesn't require hacking SSP code
- ./development/UserPass.php:/data/vendor/simplesamlphp/simplesamlphp/modules/exampleauth/src/Auth/Source/UserPass.php
# Local modules
- ./modules/mfa:/data/vendor/simplesamlphp/simplesamlphp/modules/mfa
- ./modules/expirychecker:/data/vendor/simplesamlphp/simplesamlphp/modules/expirychecker
- ./modules/profilereview:/data/vendor/simplesamlphp/simplesamlphp/modules/profilereview
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
command: bash -c "/data/enable-exampleauth.sh && /data/run.sh"
ports:
- "8086:80"
environment:
ADMIN_PASS: "b"
SECRET_SALT: "h57fjemb&dn^nsJFGNjweJ"
IDP_DOMAIN_NAME: "ssp-idp2.local"
ID_BROKER_ACCESS_TOKEN: "test-cli-abc123"
ID_BROKER_ASSERT_VALID_IP: "true"
ID_BROKER_BASE_URI: "http://broker"
ID_BROKER_TRUSTED_IP_RANGES: "10.20.38.0/24"
MYSQL_HOST: "db"
MYSQL_DATABASE: "silauth"
MYSQL_USER: "silauth"
MYSQL_PASSWORD: "silauth"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
THEME_COLOR_SCHEME: "red-teal"
HUB_MODE: "false"
ssp-idp3.local:
build: .
volumes:
# Utilize custom certs
- ./development/idp3-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/idp3-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
- ./development/logo_idp3.png:/data/vendor/simplesamlphp/simplesamlphp/public/logo.png
# Utilize custom metadata
- ./development/idp3-local/metadata:/data/vendor/simplesamlphp/simplesamlphp/metadata
# Local modules
- ./modules/mfa:/data/vendor/simplesamlphp/simplesamlphp/modules/mfa
- ./modules/expirychecker:/data/vendor/simplesamlphp/simplesamlphp/modules/expirychecker
- ./modules/profilereview:/data/vendor/simplesamlphp/simplesamlphp/modules/profilereview
- ./modules/silauth:/data/vendor/simplesamlphp/simplesamlphp/modules/silauth
- ./modules/sildisco:/data/vendor/simplesamlphp/simplesamlphp/modules/sildisco
- ./modules/material:/data/vendor/simplesamlphp/simplesamlphp/modules/material
ports:
- "8087:80"
env_file:
- local.env
environment:
ADMIN_PASS: "c"
SECRET_SALT: "h57fjem34fh*nsJFGNjweJ"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
THEME_COLOR_SCHEME: "orange-light_blue"
HUB_MODE: "false"
ssp-sp1.local:
image: silintl/ssp-base:9.3.0
platform: linux/amd64
volumes:
# Utilize custom certs
- ./development/sp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/sp-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
# Utilize custom metadata
- ./development/sp-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
# Enable checking our test metadata
- ./dockerbuild/run-metadata-tests.sh:/data/run-metadata-tests.sh
ports:
- "8081:80"
environment:
ADMIN_EMAIL: "[email protected]"
ADMIN_PASS: "sp1"
IDP_NAME: "NA"
SECRET_SALT: "not-secret-h57fjemb&dn^nsJFGNjweJz1"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"
ssp-sp2.local:
image: silintl/ssp-base:9.3.0
platform: linux/amd64
volumes:
# Utilize custom certs
- ./development/sp2-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/sp2-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
# Utilize custom metadata
- ./development/sp2-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
ports:
- "8082:80"
environment:
ADMIN_EMAIL: "[email protected]"
ADMIN_PASS: "sp2"
IDP_NAME: "NA"
SECRET_SALT: "h57fjemb&dn^nsJFGNjweJz2"
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"
ssp-sp3.local:
image: silintl/ssp-base:9.3.0
platform: linux/amd64
volumes:
# Utilize custom certs
- ./development/sp3-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/sp3-local/config/authsources.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
# Utilize custom metadata
- ./development/sp3-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
ports:
- "8083:80"
env_file:
- local.env
environment:
ADMIN_EMAIL: "[email protected]"
ADMIN_PASS: sp3
IDP_NAME: "NA"
SECRET_SALT: h57fjemb&dn^nsJFGNjweJz3
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"
pwmanager.local:
image: silintl/ssp-base:9.3.0
platform: linux/amd64
volumes:
# Utilize custom certs
- ./development/sp-local/cert:/data/vendor/simplesamlphp/simplesamlphp/cert
# Utilize custom configs
- ./development/sp-local/config/authsources-pwmanager.php:/data/vendor/simplesamlphp/simplesamlphp/config/authsources.php
# Utilize custom metadata
- ./development/sp-local/metadata/saml20-idp-remote.php:/data/vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
environment:
ADMIN_EMAIL: "[email protected]"
ADMIN_PASS: sp1
IDP_NAME: THIS VARIABLE IS REQUIRED BUT PROBABLY NOT USED
SECRET_SALT: NOT-a-secret-k49fjfkw73hjf9t87wjiw
SECURE_COOKIE: "false"
SHOW_SAML_ERRORS: "true"
SAML20_IDP_ENABLE: "false"
ADMIN_PROTECT_INDEX_PAGE: "false"
# the broker and brokerDb containers are used by the silauth module
broker:
image: silintl/idp-id-broker:latest
platform: linux/amd64
ports:
- "80"
depends_on:
- brokerDb
env_file:
- ./local.broker.env
environment:
IDP_NAME: "idp"
MYSQL_HOST: "brokerDb"
MYSQL_DATABASE: "broker"
MYSQL_USER: "user"
MYSQL_PASSWORD: "pass"
EMAIL_SERVICE_accessToken: "dummy"
EMAIL_SERVICE_assertValidIp: "false"
EMAIL_SERVICE_baseUrl: "dummy"
EMAILER_CLASS: Sil\SilIdBroker\Behat\Context\fakes\FakeEmailer
HELP_CENTER_URL: "https://example.org/help"
PASSWORD_FORGOT_URL: "https://example.org/forgot"
PASSWORD_PROFILE_URL: "https://example.org/profile"
SUPPORT_EMAIL: "[email protected]"
EMAIL_SIGNATURE: "one red pill, please"
API_ACCESS_KEYS: "test-cli-abc123"
APP_ENV: "prod"
RP_ORIGINS: "https://ssp-idp1.local,https://ssp-idp2.local,https://ssp-idp3.local"
HIBP_CHECK_ON_LOGIN: "false"
MFA_TOTP_apiBaseUrl: dummy
MFA_TOTP_apiKey: 10345678-1234-1234-1234-123456789012
MFA_TOTP_apiSecret: 11345678-1234-1234-1234-12345678
MFA_WEBAUTHN_apiBaseUrl: dummy
MFA_WEBAUTHN_apiKey: 10345678-1234-1234-1234-123456789012
MFA_WEBAUTHN_apiSecret: 11345678-1234-1234-1234-12345678
MFA_WEBAUTHN_appId: ourApp99
MFA_WEBAUTHN_rpDisplayName: Our App
MFA_WEBAUTHN_rpId: http://app99
volumes:
- ./development/m991231_235959_insert_test_users.php:/data/console/migrations/m991231_235959_insert_test_users.php
command: [ "bash", "-c", "whenavail brokerDb 3306 60 ./yii migrate --interactive=0 && ./run.sh" ]
brokerDb:
image: mariadb:10
ports:
- "3306"
environment:
MYSQL_ROOT_PASSWORD: "r00tp@ss!"
MYSQL_DATABASE: "broker"
MYSQL_USER: "user"
MYSQL_PASSWORD: "pass"
brokerpma:
image: phpmyadmin
ports:
- "8088:80"
environment:
PMA_HOST: brokerDb
PMA_USER: user
PMA_PASSWORD: pass
dynamo:
image: cnadiminti/dynamodb-local
platform: linux/amd64
command: "-sharedDb -inMemory"
hostname: dynamo
ports:
- "8000:8000"
environment:
reschedule: on-node-failure
init-dynamo:
image: garland/aws-cli-docker
platform: linux/amd64
command: "/init-dynamodb.sh"
volumes:
- ./development/init-dynamodb.sh:/init-dynamodb.sh
depends_on:
- dynamo
environment:
AWS_ACCESS_KEY_ID: 0
AWS_SECRET_ACCESS_KEY: 0
AWS_DEFAULT_REGION: us-east-1
AWS_DYNAMODB_ENDPOINT: http://dynamo:8000
node:
image: node:lts-alpine
volumes:
- ./package.json:/data/package.json
- ./package-lock.json:/data/package-lock.json
- ./node_modules:/data/node_modules
working_dir: /data
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.20.38.0/24
gateway: 10.20.38.1
volumes:
composer-cache: { }