-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoidc_frontend_backend.conf
59 lines (48 loc) · 1.78 KB
/
oidc_frontend_backend.conf
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
# -----------------------------------------------------------------------------#
# #
# Sample Configuration: Frontend Site, Backend App #
# (for Open ID Connect workflow) #
# #
# -----------------------------------------------------------------------------#
# Custom log format to include the 'sub' claim in the REMOTE_USER field.
#
log_format oidc_jwt '$remote_addr - $jwt_claim_sub [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" "$http_user_agent" '
'"$http_x_forwarded_for"';
# Sample upstream server for the frontend site.
#
upstream my_frontend_site {
zone my_frontend_site 64k;
server 127.0.0.1:9091;
}
# Sample upstream server for the backend app.
#
upstream my_backend_app {
zone my_backend_app 64k;
server 127.0.0.1:9092;
}
# Sample frontend/api server - to test multi IdPs per server
#
server {
listen 30443 ssl;
server_name nginx.oidc-multi-idps.test;
# sample frontend/backend configuration for OIDC workflow
include conf.d/oidc_common_frontend_backend.conf;
}
## <LB> --- dev.xxx.com -> Amozon-cognito
## prod.xxx.com -> Keycloak
## first proxy: dev server
server {
listen 31443 ssl;
server_name dev.xxx.com;
# sample frontend/backend configuration for OIDC workflow
include conf.d/oidc_common_frontend_backend.conf;
}
## first proxy: production server
server {
listen 32443 ssl;
server_name prod.xxx.com;
# sample frontend/backend configuration for OIDC workflow
include conf.d/oidc_common_frontend_backend.conf;
}
# vim: syntax=nginx