git.iko.soy/typeable/oauth2-proxy
on master help sign in
Add local environment that uses alpha configuration
commit5b683a7631877f2f3df1e4c54c27f5de6c869b47 authorJoel Speed <joel.speed@hotmail.co.uk> dateMon 9 Nov 2020, 20:19 (6 years ago) parentf36dfbb
4 files changed+54
contrib/local-environment/Makefile+8 contrib/local-environment/docker-compose-alpha-config.yaml+19 contrib/local-environment/oauth2-proxy-alpha-config.cfg+10 contrib/local-environment/oauth2-proxy-alpha-config.yaml+17
contrib/local-environment/Makefile+8
@@ -6,6 +6,14 @@ up:
66%:
77 docker-compose $*
88
9+.PHONY: alpha-config-up
10+alpha-config-up:
11+ docker-compose -f docker-compose.yaml -f docker-compose-alpha-config.yaml up -d
12+
13+.PHONY: alpha-config-%
14+alpha-config-%:
15+ docker-compose -f docker-compose.yaml -f docker-compose-nginx.yaml $*
16+
917.PHONY: nginx-up
1018nginx-up:
1119 docker-compose -f docker-compose.yaml -f docker-compose-nginx.yaml up -d
contrib/local-environment/docker-compose-alpha-config.yamlnew file+19
@@ -0,0 +1,19 @@
1+# This docker-compose file can be used to bring up an example instance of oauth2-proxy
2+# for manual testing and exploration of features.
3+# Alongside OAuth2-Proxy, this file also starts Dex to act as the identity provider,
4+# etcd for storage for Dex and HTTPBin as an example upstream.
5+# This file also uses alpha configuration when configuring OAuth2 Proxy.
6+#
7+# This file is an extension of the main compose file and must be used with it
8+# docker-compose -f docker-compose.yaml -f docker-compose-alpha-config.yaml <command>
9+# Alternatively:
10+# make alpha-config-<command> (eg make nginx-up, make nginx-down)
11+#
12+# Access http://localhost:4180 to initiate a login cycle
13+version: '3.0'
14+services:
15+ oauth2-proxy:
16+ command: --config /oauth2-proxy.cfg --alpha-config /oauth2-proxy-alpha-config.yaml
17+ volumes:
18+ - "./oauth2-proxy-alpha-config.cfg:/oauth2-proxy.cfg"
19+ - "./oauth2-proxy-alpha-config.yaml:/oauth2-proxy-alpha-config.yaml"
contrib/local-environment/oauth2-proxy-alpha-config.cfgnew file+10
@@ -0,0 +1,10 @@
1+http_address="0.0.0.0:4180"
2+cookie_secret="OQINaROshtE9TcZkNAm-5Zs2Pv3xaWytBmc5W7sPX7w="
3+provider="oidc"
4+email_domains="example.com"
5+oidc_issuer_url="http://dex.localhost:4190/dex"
6+client_secret="b2F1dGgyLXByb3h5LWNsaWVudC1zZWNyZXQK"
7+client_id="oauth2-proxy"
8+cookie_secure="false"
9+
10+redirect_url="http://localhost:4180/oauth2/callback"
contrib/local-environment/oauth2-proxy-alpha-config.yamlnew file+17
@@ -0,0 +1,17 @@
1+upstreams:
2+ - id: httpbin
3+ path: /
4+ uri: http://httpbin
5+injectRequestHeaders:
6+- name: X-Forwarded-Groups
7+ values:
8+ - claim: groups
9+- name: X-Forwarded-User
10+ values:
11+ - claim: user
12+- name: X-Forwarded-Email
13+ values:
14+ - claim: email
15+- name: X-Forwarded-Preferred-Username
16+ values:
17+ - claim: preferred_username