forked from perforce/helix-authentication-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
209 lines (206 loc) · 6.47 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
version: '3.7'
#
# Container names have a domain-like naming scheme to facilitate dnsmasq usage.
# By ending in .doc, which is not a valid TLD, we can easily configure dnsmasq
# to resolve these names to the docker machine. This allows the containers to
# use the same names to refer to each other as the host does when resolving the
# container names.
#
services:
auth-svc1.doc:
build:
context: .
dockerfile: containers/auth-svc/Dockerfile
image: auth-svc:latest
container_name: auth-svc1.doc
environment:
DEBUG: "1"
DEBUG_PROXY: "1"
SVC_BASE_URI: "https://authen.doc"
PORT: 3001
PROTOCOL: "http"
TRUST_PROXY: 'true'
CLIENT_CERT_HEADER: 'X-SSL-Client-Cert'
CLIENT_CERT_FP: '39:65:C1:9A:2F:9A:66:B6:57:54:F5:05:8D:F4:2F:3B:53:BB:7D:3E:C6:C0:36:D4:10:4D:F8:A4:0C:8B:56:9E'
REDIS_URL: 'rediss://rediss.doc:6389'
OIDC_CLIENT_ID: client_id
OIDC_CLIENT_SECRET: client_secret
OIDC_ISSUER_URI: "https://oidc.doc:8843"
DEFAULT_PROTOCOL: "saml"
# allow the self-signed certs installed on shibboleth container
NODE_TLS_REJECT_UNAUTHORIZED: "0"
SAML_IDP_METADATA_URL: "https://shibboleth.doc:4443/idp/shibboleth"
SAML_NAMEID_FORMAT: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SAML_SP_ENTITY_ID: "urn:example:sp"
OAUTH_JWKS_URI: 'http://jwt.doc:3000/.well-known/jwks.json'
OAUTH_AUDIENCE: 'api://25b17cdb-4c8d-434c-9a21-86d67ac501d1'
OAUTH_ISSUER: 'http://jwt.doc:3000/'
OAUTH_ALGORITHM: 'RS256'
OAUTH_TENANT_ID: '719d88f3-f957-44cf-9aa5-0a1a3a44f7b9'
networks:
- authen
ports:
- "3001:3001"
depends_on:
- redis.doc
auth-svc2.doc:
image: auth-svc:latest
container_name: auth-svc2.doc
environment:
DEBUG: "1"
DEBUG_PROXY: "1"
SVC_BASE_URI: "https://authen.doc"
PORT: 3002
PROTOCOL: "http"
TRUST_PROXY: 'true'
CLIENT_CERT_HEADER: 'X-SSL-Client-Cert'
CLIENT_CERT_FP: '39:65:C1:9A:2F:9A:66:B6:57:54:F5:05:8D:F4:2F:3B:53:BB:7D:3E:C6:C0:36:D4:10:4D:F8:A4:0C:8B:56:9E'
REDIS_URL: 'rediss://rediss.doc:6389'
OIDC_CLIENT_ID: client_id
OIDC_CLIENT_SECRET: client_secret
OIDC_ISSUER_URI: "https://oidc.doc:8843"
DEFAULT_PROTOCOL: "saml"
# allow the self-signed certs installed on shibboleth container
NODE_TLS_REJECT_UNAUTHORIZED: "0"
SAML_IDP_METADATA_URL: "https://shibboleth.doc:4443/idp/shibboleth"
SAML_NAMEID_FORMAT: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress"
SAML_SP_ENTITY_ID: "urn:example:sp"
OAUTH_JWKS_URI: 'http://jwt.doc:3000/.well-known/jwks.json'
OAUTH_AUDIENCE: 'api://25b17cdb-4c8d-434c-9a21-86d67ac501d1'
OAUTH_ISSUER: 'http://jwt.doc:3000/'
OAUTH_ALGORITHM: 'RS256'
OAUTH_TENANT_ID: '719d88f3-f957-44cf-9aa5-0a1a3a44f7b9'
networks:
- authen
ports:
- "3002:3002"
depends_on:
- auth-svc1.doc
ldap.doc:
build:
context: containers/ldap
container_name: ldap.doc
networks:
- authen
ports:
- "389:389"
- "636:636"
authen.doc:
build:
context: .
dockerfile: containers/haproxy/Dockerfile
container_name: authen.doc
networks:
- authen
ports:
- "443:443"
depends_on:
- auth-svc1.doc
- auth-svc2.doc
jwt.doc:
# https://github.com/foobert/jwtdummy
#
# This container issues and validates RFC 7519 JSON Web Tokens which are
# used for testing the "client-sso" feature of the extension and service.
#
# visit http://jwt.doc:3000 for usage instructions
#
# This image only knows how to bind to port 3000, changing this would
# require forking the repo and fixing it.
image: foobert/jwtdummy
container_name: jwt.doc
networks:
- authen
ports:
- "3000:3000"
oidc.doc:
build:
context: containers/oidc
container_name: oidc.doc
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: https://+:8843;http://+:80
ASPNETCORE_Kestrel__Certificates__Default__Password: oidc-server-mock-pwd
ASPNETCORE_Kestrel__Certificates__Default__Path: /https/aspnetapp.pfx
API_RESOURCES_INLINE: |
[]
USERS_CONFIGURATION_INLINE: |
[
{
"SubjectId": "408616",
"Username": "janedoe",
"Password": "Passw0rd!",
"Claims": [
{ "Type": "name", "Value": "Jane Doe" },
{ "Type": "given_name", "Value": "Jane" },
{ "Type": "family_name", "Value": "Doe" },
{ "Type": "email", "Value": "[email protected]" },
{ "Type": "email_verified", "Value": "true" }
]
},
{
"SubjectId": "408727",
"Username": "johndoe",
"Password": "Passw0rd!",
"Claims": [
{ "Type": "name", "Value": "John Doe" },
{ "Type": "given_name", "Value": "John" },
{ "Type": "family_name", "Value": "Doe" },
{ "Type": "email", "Value": "[email protected]" },
{ "Type": "email_verified", "Value": "true" }
]
}
]
CLIENTS_CONFIGURATION_INLINE: |
[
{
"ClientId": "client_id",
"ClientSecrets": [ "client_secret" ],
"Description": "Client for client credentials flow",
"AllowedGrantTypes": [ "authorization_code" ],
"AllowAccessTokensViaBrowser": true,
"RedirectUris": [
"https://authen.doc/oidc/callback",
"https://authen.doc"
],
"AllowedScopes": [ "openid", "profile", "email" ],
"IdentityTokenLifetime": 3600,
"AccessTokenLifetime": 3600
}
]
networks:
- authen
ports:
- "8843:8843"
# p4d.doc is in the extension repository
redis.doc:
image: valkey/valkey:unstable
container_name: redis.doc
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
networks:
- authen
ports:
- "6379:6379"
rediss.doc:
build:
context: containers/redis
container_name: rediss.doc
networks:
- authen
ports:
- "6389:6389"
shibboleth.doc:
build:
context: containers/shibboleth
container_name: shibboleth.doc
depends_on:
ldap.doc:
condition: service_healthy
networks:
- authen
ports:
- "4443:4443"
networks:
authen:
name: auth-service