Skip to content

Commit d99a694

Browse files
authored
feat: support for forward auth locally (#1069)
* fix(deps): update oauth2-proxy redirect URL and forward-auth address Signed-off-by: Nikolai Emil Damm <nikolaiemildamm@icloud.com> * Update k8s/distributions/kind/infrastructure/controllers/coredns/deployment.yaml Signed-off-by: Nikolai Emil Damm <ned@devantler.tech> --------- Signed-off-by: Nikolai Emil Damm <nikolaiemildamm@icloud.com> Signed-off-by: Nikolai Emil Damm <ned@devantler.tech>
1 parent 8109cd7 commit d99a694

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

k8s/bases/infrastructure/controllers/oauth2-proxy/helm-release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ spec:
3030
github_users = ["devantler"]
3131
email_domains = [ "*" ]
3232
cookie_domains=[".${domain}"]
33+
redirect_url = "https://oauth2-proxy.${domain}/oauth2/callback"
3334
upstreams = [ "static://202" ]
3435
skip_provider_button = true
3536
reverse_proxy = true

k8s/bases/infrastructure/middlewares/forward-auth/forward-auth.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: traefik
66
spec:
77
forwardAuth:
8-
address: https://oauth2-proxy.${domain}/
8+
address: http://oauth2-proxy.oauth2-proxy.svc.cluster.local/
99
trustForwardHeader: true
1010
authResponseHeaders:
1111
- X-Auth-Request-Access-Token

k8s/distributions/kind/infrastructure/controllers/coredns/corefile-config-map.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: Fix dns to rewrite external domain names to internal service names
21
apiVersion: v1
32
kind: ConfigMap
43
metadata:
@@ -12,7 +11,7 @@ data:
1211
lameduck 5s
1312
}
1413
ready
15-
rewrite name regex (.*)\.${domain_regex} {2}.{2}.svc.cluster.local answer auto
14+
rewrite name regex (.*)\.${domain_regex} traefik.traefik.svc.cluster.local answer auto
1615
kubernetes cluster.local in-addr.arpa ip6.arpa {
1716
pods insecure
1817
fallthrough in-addr.arpa ip6.arpa

k8s/distributions/kind/infrastructure/controllers/coredns/deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO: Rework CoreDNS deployment into a helm-release
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:

k8s/distributions/kind/infrastructure/controllers/kustomization.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
33
kind: Kustomization
44
resources:
55
- ../../../../bases/infrastructure/controllers/
6-
# TODO: Add coredns to the kind distribution once the rewrite issue is resolved
7-
#- coredns/
6+
- coredns/
87
patches:
98
- target:
109
kind: HelmRelease

0 commit comments

Comments
 (0)