-
Notifications
You must be signed in to change notification settings - Fork 124
/
Copy pathdocker-compose.yml
371 lines (351 loc) · 12.1 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
services:
pg:
image: postgres:15
environment:
# To avoid the following error:
#
# Error: Database is uninitialized and superuser password is not
# specified. You must specify POSTGRES_PASSWORD for the superuser. Use
# "-e POSTGRES_PASSWORD=password" to set it in "docker run".
#
# You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all
# connections without a password. This is *not* recommended. See
# PostgreSQL documentation about "trust"
POSTGRES_HOST_AUTH_METHOD: trust
pg2:
image: postgres:15
environment:
# To avoid the following error:
#
# Error: Database is uninitialized and superuser password is not
# specified. You must specify POSTGRES_PASSWORD for the superuser. Use
# "-e POSTGRES_PASSWORD=password" to set it in "docker run".
#
# You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all
# connections without a password. This is *not* recommended. See
# PostgreSQL documentation about "trust"
POSTGRES_HOST_AUTH_METHOD: trust
audit:
image: postgres:15
environment:
# See description on `pg` service for use of POSTGRES_HOST_AUTH_METHOD
POSTGRES_HOST_AUTH_METHOD: trust
testdb:
image: postgres:15
environment:
# To avoid the following error:
#
# Error: Database is uninitialized and superuser password is not
# specified. You must specify POSTGRES_PASSWORD for the superuser. Use
# "-e POSTGRES_PASSWORD=password" to set it in "docker run".
#
# You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all
# connections without a password. This is *not* recommended. See
# PostgreSQL documentation about "trust"
POSTGRES_HOST_AUTH_METHOD: trust
testdb2:
image: postgres:15
environment:
# To avoid the following error:
#
# Error: Database is uninitialized and superuser password is not
# specified. You must specify POSTGRES_PASSWORD for the superuser. Use
# "-e POSTGRES_PASSWORD=password" to set it in "docker run".
#
# You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all
# connections without a password. This is *not* recommended. See
# PostgreSQL documentation about "trust"
POSTGRES_HOST_AUTH_METHOD: trust
conjur:
image: "conjur-test:${TAG}"
environment:
DATABASE_URL: postgres://postgres@pg/postgres
CONJUR_ADMIN_PASSWORD: ADmin123!!!!
CONJUR_ACCOUNT: cucumber
CONJUR_DATA_KEY:
RAILS_ENV: development
REQUIRE_SIMPLECOV: "true"
CONJUR_LOG_LEVEL: debug
CONJUR_AUTHENTICATORS: authn,authn-ldap/test,authn-ldap/secure,authn-oidc/keycloak,authn-oidc,authn-k8s/test,authn-azure/prod,authn-gcp,authn-jwt/raw,authn-jwt/keycloak,authn-oidc/keycloak2,authn-oidc/okta-2,authn-oidc/okta,authn-oidc/keycloak2-long-lived,authn-oidc/identity
LDAP_URI: ldap://ldap-server:389
LDAP_BASE: dc=conjur,dc=net
LDAP_FILTER: '(uid=%s)'
LDAP_BINDDN: cn=admin,dc=conjur,dc=net
LDAP_BINDPW: ldapsecret
WEB_CONCURRENCY: 0
RAILS_MAX_THREADS: 10
HTTPS_PROXY: ${HTTPS_PROXY:-}
https_proxy: ${https_proxy:-}
command: server
volumes:
- authn-local:/run/authn-local
# TODO: authenticators_oidc/test has a dep on this
- ./oauth/keycloak:/oauth/keycloak/scripts
- ./ldap-certs:/ldap-certs:ro
- log-volume:/opt/conjur-server/log
- ../coverage:/opt/conjur-server/coverage
expose:
- "80"
links:
- pg
- ldap-server
- keycloak
- tinyproxy
conjur2:
image: "conjur-test:${TAG}"
environment:
DATABASE_URL: postgres://postgres@pg2/postgres
CONJUR_ADMIN_PASSWORD: ADmin123!!!!
CONJUR_ACCOUNT: cucumber
CONJUR_DATA_KEY:
RAILS_ENV: development
REQUIRE_SIMPLECOV: "true"
CONJUR_LOG_LEVEL: debug
CONJUR_AUTHENTICATORS: authn-ldap/test,authn-ldap/secure,authn-oidc/keycloak,authn-oidc,authn-k8s/test,authn-azure/prod,authn-gcp,authn-jwt/raw,authn-jwt/keycloak,authn-oidc/keycloak2,authn-oidc/okta-2,authn-oidc/okta,authn-oidc/keycloak2-long-lived,authn-oidc/identity
LDAP_URI: ldap://ldap-server:389
LDAP_BASE: dc=conjur,dc=net
LDAP_FILTER: '(uid=%s)'
LDAP_BINDDN: cn=admin,dc=conjur,dc=net
LDAP_BINDPW: ldapsecret
WEB_CONCURRENCY: 0
RAILS_MAX_THREADS: 10
HTTPS_PROXY: ${HTTPS_PROXY:-}
https_proxy: ${https_proxy:-}
command: server
volumes:
# TODO: authenticators_oidc/test has a dep on this
- authn-local2:/run/authn-local
- ./oauth/keycloak:/oauth/keycloak/scripts
- ./ldap-certs:/ldap-certs:ro
- log-volume:/opt/conjur-server/log
- ../coverage:/opt/conjur-server/coverage
expose:
- "80"
links:
- pg2
- ldap-server
- keycloak
- tinyproxy
cucumber:
image: conjur-test:$TAG
entrypoint: bash
working_dir: /src/conjur-server
environment:
CONJUR_ACCOUNT: cucumber
AUDIT_DATABASE_URL:
RAILS_ENV: test
CONJUR_LOG_LEVEL: debug
CONJUR_DATA_KEY:
REPORT_ROOT:
CUCUMBER_NETWORK:
INFRAPOOL_CUCUMBER_FILTER_TAGS:
# TODO: Where should we be running rspec tests from, ideally?
# See https://github.com/DatabaseCleaner/database_cleaner#safeguards
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: "true"
volumes:
- ..:/src/conjur-server
- authn-local:/run/authn-local
- authn-local2:/run/authn-local2
- ./ldap-certs:/ldap-certs:ro
- log-volume:/src/conjur-server/log
- jwks-volume:/var/jwks
- ./oauth/keycloak:/oauth/keycloak/scripts
links:
- conjur
- conjur2
- pg
- pg2
- testdb
- testdb2
- keycloak
ldap-server:
image: osixia/openldap
command: --copy-service --loglevel debug
hostname: ldap-server
environment:
LDAP_ORGANISATION: CyberArk
LDAP_DOMAIN: conjur.net
LDAP_ADMIN_PASSWORD: ldapsecret
LDAP_TLS_DH_PARAM_FILENAME: "dhparam.pem"
LDAP_TLS_CA_CRT_FILENAME: "ca-chain.cert.pem"
LDAP_TLS_CRT_FILENAME: "ldap-server.cert.pem"
LDAP_TLS_KEY_FILENAME: "ldap-server.key.pem"
LDAP_TLS_VERIFY_CLIENT: try
volumes:
- ./test_suites/authenticators_ldap/ldap-data:/container/service/slapd/assets/config/bootstrap/ldif/custom
- ./ldap-certs:/container/service/slapd/assets/certs:ro
keycloak:
image: registry.tld/jboss/keycloak:4.3.0.Final
ulimits:
nofile:
soft: 6114
hard: 6114
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_APP_USER=alice
- KEYCLOAK_APP_USER_PASSWORD=alice
- KEYCLOAK_SECOND_APP_USER=bob.somebody
- KEYCLOAK_SECOND_APP_USER_PASSWORD=bob
- KEYCLOAK_NON_CONJUR_APP_USER=not_in_conjur
- KEYCLOAK_NON_CONJUR_APP_USER_PASSWORD=not_in_conjur
- KEYCLOAK_NON_CONJUR_APP_USER_EMAIL=not_in_conjur
- DB_VENDOR=H2
- KEYCLOAK_CLIENT_ID=conjurClient
- KEYCLOAK_REDIRECT_URI=http://conjur:3000/authn-oidc/keycloak2/cucumber/authenticate
- KEYCLOAK_CLIENT_SECRET=1234
- KEYCLOAK_SCOPE=openid
volumes:
# TODO: authenticators_oidc/test has a dep on this
- ./oauth/keycloak:/scripts
- ./oauth/keycloak/standalone.xml:/opt/jboss/keycloak/standalone/configuration/standalone.xml
tinyproxy:
image: travix/tinyproxy
volumes:
- ./test_suites/proxy/config/tinyproxy.conf:/etc/tinyproxy.conf
jwks:
image: nginx
networks:
default:
aliases:
- chained.mycompany.local
volumes:
- jwks-volume:/usr/share/nginx/html
- ./oauth/jwks/nginx.conf:/etc/nginx/conf.d/default.conf
- ./oauth/jwks:/tmp
entrypoint: sleep
command: infinity
jwks_py:
image: python:3
ports:
- 8090:8090
entrypoint:
- bash
- -c
command:
- |
pip install -r /usr/src/jwks/requirements.txt
python /usr/src/jwks/jwks_server.py -p 8090
volumes:
- ./jwt/:/usr/src/jwks/
# The following services are used to test IPv6 scenarios using 'host' network mode
pg_ipv6:
image: postgres:15
network_mode: host
environment:
# To avoid the following error:
#
# Error: Database is uninitialized and superuser password is not
# specified. You must specify POSTGRES_PASSWORD for the superuser. Use
# "-e POSTGRES_PASSWORD=password" to set it in "docker run".
#
# You may also use POSTGRES_HOST_AUTH_METHOD=trust to allow all
# connections without a password. This is *not* recommended. See
# PostgreSQL documentation about "trust"
POSTGRES_HOST_AUTH_METHOD: trust
conjur_ipv6:
image: "conjur-test:${TAG}"
network_mode: host
extra_hosts:
- keycloak_ipv6:${HOST_IPV6:-[::1]}
- pg:${HOST_IPV6:-[::1]}
- jwks_py:${HOST_IPV6:-[::1]}
environment:
DATABASE_URL: postgres://postgres@pg/postgres
CONJUR_ADMIN_PASSWORD: ADmin123!!!!
CONJUR_ACCOUNT: cucumber
CONJUR_DATA_KEY:
RAILS_ENV: development
REQUIRE_SIMPLECOV: "true"
CONJUR_LOG_LEVEL: debug
CONJUR_AUTHENTICATORS: authn,authn-oidc/keycloak,authn-oidc,authn-k8s/test,authn-jwt/raw,authn-jwt/keycloak,authn-oidc/keycloak2
WEB_CONCURRENCY: 0
RAILS_MAX_THREADS: 10
command: server
volumes:
- ..:/src/conjur-server
- authn-local:/run/authn-local
- jwks-volume:/var/jwks
- ./oauth/keycloak:/oauth/keycloak/scripts
- log-volume:/opt/conjur-server/log
depends_on:
- pg_ipv6
cucumber_ipv6:
image: conjur-test:$TAG
network_mode: host
extra_hosts:
- keycloak_ipv6:${HOST_IPV6:-[::1]}
- pg:${HOST_IPV6:-[::1]}
- conjur:127.0.0.1
- jwks_py:${HOST_IPV6:-[::1]}
entrypoint: bash
working_dir: /src/conjur-server
environment:
CONJUR_ACCOUNT: cucumber
RAILS_ENV: test
CONJUR_LOG_LEVEL: debug
CONJUR_DATA_KEY:
INFRAPOOL_CUCUMBER_FILTER_TAGS:
DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true
IPV6_ENABLED: true
volumes:
- ..:/src/conjur-server
- authn-local:/run/authn-local
- log-volume:/src/conjur-server/log
- ./oauth/keycloak:/oauth/keycloak/scripts
depends_on:
- conjur_ipv6
keycloak_ipv6:
image: registry.tld/jboss/keycloak:4.3.0.Final
network_mode: host
extra_hosts:
- conjur:127.0.0.1
ulimits:
nofile:
soft: 6114
hard: 6114
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=admin
- KEYCLOAK_APP_USER=alice
- KEYCLOAK_APP_USER_PASSWORD=alice
- KEYCLOAK_SECOND_APP_USER=bob.somebody
- KEYCLOAK_SECOND_APP_USER_PASSWORD=bob
- KEYCLOAK_NON_CONJUR_APP_USER=not_in_conjur
- KEYCLOAK_NON_CONJUR_APP_USER_PASSWORD=not_in_conjur
- KEYCLOAK_NON_CONJUR_APP_USER_EMAIL=not_in_conjur
- DB_VENDOR=H2
- KEYCLOAK_CLIENT_ID=conjurClient
- KEYCLOAK_REDIRECT_URI=http://conjur:3000/authn-oidc/keycloak2/cucumber/authenticate
- KEYCLOAK_CLIENT_SECRET=1234
- KEYCLOAK_SCOPE=openid
- JAVA_OPTS=-server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djava.net.preferIPv4Stack=false
volumes:
- ./oauth/keycloak:/scripts
- ./oauth/keycloak/standalone_ipv6.xml:/opt/jboss/keycloak/standalone/configuration/standalone.xml
jwks_py_ipv6:
image: python:3
network_mode: host
entrypoint:
- bash
- -c
command:
- |
pip install -r /usr/src/jwks/requirements.txt
python /usr/src/jwks/jwks_server.py -p 8090
volumes:
- ./jwt/:/usr/src/jwks/
curl_ipv6:
image: curlimages/curl:latest
network_mode: host
extra_hosts:
- jwks_py:${HOST_IPV6:-[::1]}
volumes:
authn-local:
authn-local2:
log-volume:
jwks-volume: