@@ -0,0 +1,95 @@
1+dex:
2+ ingress:
3+ enabled: true
4+ hosts:
5+ - dex.localtest.me
6+ grpc: false
7+ certs:
8+ grpc:
9+ create: false
10+ web:
11+ create: false
12+
13+ config:
14+ issuer: http://dex.localtest.me
15+ expiry:
16+ signingKeys: "4h"
17+ idTokens: "1h"
18+ staticClients:
19+ - id: oauth2-proxy
20+ redirectURIs:
21+ # These redirect URI points to the `--redirect-url` for OAuth2 proxy.
22+ - 'http://oauth2-proxy.localtest.me/oauth2/callback'
23+ name: 'OAuth2 Proxy'
24+ secret: "b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
25+ staticPasswords:
26+ - email: "admin@example.com"
27+ # bcrypt hash of the string "password"
28+ hash: "$2a$10$2b2cU8CPhOTaGrs1HRQuAueS7JTT5ZHsHSzYiFPm1leZck7Mc8T4W"
29+ username: "admin"
30+ userID: "08a8684b-db88-4b73-90a9-3cd1661f5466"
31+
32+oauth2-proxy:
33+ nameOverride: oauth2-proxy-sample
34+ ingress:
35+ enabled: true
36+ hosts:
37+ - oauth2-proxy.localtest.me
38+ annotations:
39+ nginx.ingress.kubernetes.io/server-snippet: |
40+ large_client_header_buffers 4 32k;
41+ # pick up client_id and client_secret from configFile as opposed to helm .Values.config.clientID and .Values.config.clientSecret
42+ proxyVarsAsSecrets: false
43+ config:
44+ configFile: |-
45+ cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
46+ cookie_domain=".localtest.me"
47+ whitelist_domains=[".localtest.me"]
48+ # only users with this domain will be let in
49+ email_domains=["example.com"]
50+
51+ client_id="oauth2-proxy"
52+ client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
53+ cookie_secure="false"
54+
55+ redirect_url="http://oauth2-proxy.localtest.me/oauth2/callback"
56+
57+ # we don't want to proxy anything so pick a non-existent directory
58+ upstreams = [ "file:///dev/null" ]
59+
60+ # return authenticated user to nginx
61+ set_xauthrequest = true
62+ # using http://dex.localtest.me/.well-known/openid-configuration oauth2-proxy will populate
63+ # login_url, redeem_url, and oidc_jwks_url
64+ provider="oidc"
65+ oidc_issuer_url="http://dex.localtest.me"
66+
67+httpbin:
68+ ingress:
69+ enabled: true
70+ hosts:
71+ - host: httpbin.localtest.me
72+ paths:
73+ - /
74+ annotations:
75+ nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
76+ # That's what will be used in REAL LIFE
77+ #nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy.localtest.me/oauth2/auth
78+ # but because of https://github.com/kubernetes/ingress-nginx/issues/3665
79+ nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
80+ nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email
81+
82+hello-world:
83+ ingress:
84+ enabled: true
85+ hosts:
86+ - host: hello-world.localtest.me
87+ paths:
88+ - /
89+ annotations:
90+ nginx.ingress.kubernetes.io/auth-signin: http://oauth2-proxy.localtest.me/oauth2/start
91+ # That's what will be used in REAL LIFE
92+ #nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy.localtest.me/oauth2/auth
93+ # but because of https://github.com/kubernetes/ingress-nginx/issues/3665
94+ nginx.ingress.kubernetes.io/auth-url: http://oauth2-proxy-example-oauth2-proxy-sample.default.svc.cluster.local/oauth2/auth
95+ nginx.ingress.kubernetes.io/auth-response-headers: X-Auth-Request-User,X-Auth-Request-Email