Skip to content

Commit

Permalink
fix(authelia): forward auth address helper
Browse files Browse the repository at this point in the history
The forward auth address helper should use the fully qualified cluster svc name. Adjusted so it does this, will add a override for the cluster dns name later (already adjusted the helper to account for this).
  • Loading branch information
james-d-elliott committed Feb 25, 2021
1 parent 745b743 commit 0b3592d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/authelia/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: authelia
version: 0.2.6
version: 0.2.7
kubeVersion: ">= 1.13.0-0"
description: Authelia is a Single Sign-On Multi-Factor portal for web apps
type: application
Expand Down
8 changes: 6 additions & 2 deletions charts/authelia/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,17 @@ Returns the forwardAuth url
*/}}
{{- define "authelia.forwardAuthPath" -}}
{{- $scheme := "http" -}}
{{- $host := (include "authelia.name" .) -}}
{{- $host := printf "%s.%s" (include "authelia.name" .) .Release.Namespace -}}
{{- $cluster := "cluster.local" -}}
{{- if .Namespace -}}
{{- $host = printf "%s.%s" $host .Namespace -}}
{{- end -}}
{{- if .Cluster -}}
{{- $cluster := .Cluster -}}
{{- end -}}
{{- $path := (include "authelia.path" .) | trimSuffix "/" -}}
{{- $redirect := (include "authelia.ingressHostWithPath" .) -}}
{{- (printf "%s://%s%s/api/verify?https://%s/#/" $scheme $host $path $redirect) -}}
{{- (printf "%s://%s.svc.%s%s/api/verify?https://%s/#/" $scheme $host $cluster $path $redirect) -}}
{{- end -}}

{{/*
Expand Down

0 comments on commit 0b3592d

Please sign in to comment.