Skip to content

Commit

Permalink
fix: multiple issues (#234)
Browse files Browse the repository at this point in the history
This fixes an issue where the client secret would not properly be rendered when included as a raw value. This also fixes an issue where the sticky service value for Traefik was not correctly indented.
  • Loading branch information
james-d-elliott authored May 1, 2024
1 parent 6fb885b commit 45db959
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 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.9.0-beta2
version: 0.9.0-beta3
kubeVersion: ">= 1.13.0-0"
description: Authelia is a Single Sign-On Multi-Factor portal for web apps
type: application
Expand Down
8 changes: 5 additions & 3 deletions charts/authelia/templates/_oidc.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ Returns the OpenID Connect 1.0 clients token endpoint authentication method.
Returns the OpenID Connect 1.0 clients secret.
*/}}
{{- define "authelia.config.oidc.client.client_secret" -}}
{{- if or .public (and (not .client_secret) (not .client_secret.value) (not .client_secret.path)) }}
{{- if .public }}
{{- "" }}
{{- else if hasKey .client_secret "value" }}
{{- else if kindIs "string" .client_secret }}
{{- .client_secret }}
{{- else if and (kindIs "map" .client_secret) (hasKey .client_secret "value") }}
{{- .client_secret.value }}
{{- end }}
{{- end }}
Expand All @@ -26,7 +28,7 @@ Returns the OpenID Connect 1.0 clients secret.
{{- if and (not (kindIs "string" .client_secret)) .client_secret.path }}
{{- printf "'{{ secret \"%s\" }}'" .client_secret.path }}
{{- else }}
{{- (include "authelia.config.oidc.client.client_secret.value" .) | squote }}
{{- (include "authelia.config.oidc.client.client_secret" .) | squote }}
{{- end }}
{{- end }}
{{- end -}}
Expand Down
32 changes: 16 additions & 16 deletions charts/authelia/templates/traefikCRD/ingressRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ spec:
weight: {{ $.Values.ingress.traefikCRD.weight | default 10 }}
responseForwarding:
flushInterval: {{ $.Values.ingress.traefikCRD.responseForwardingFlushInterval | default "100ms" }}
{{- if $.Values.ingress.traefikCRD.sticky }}
sticky:
cookie:
httpOnly: true
name: {{ $.Values.ingress.traefikCRD.stickyCookieNameOverride | default (printf "%s_traefik_lb" (include "authelia.name" $)) }}
secure: true
sameSite: None
{{- end }}
{{- if $.Values.ingress.traefikCRD.sticky }}
sticky:
cookie:
httpOnly: true
name: {{ $.Values.ingress.traefikCRD.stickyCookieNameOverride | default (printf "%s_traefik_lb" (include "authelia.name" $)) }}
secure: true
sameSite: None
{{- end }}
{{- end }}
{{- else }}
{{- range $cookie := .Values.configMap.session.cookies }}
Expand All @@ -63,14 +63,14 @@ spec:
weight: {{ $.Values.ingress.traefikCRD.weight | default 10 }}
responseForwarding:
flushInterval: {{ $.Values.ingress.traefikCRD.responseForwardingFlushInterval | default "100ms" }}
{{- if $.Values.ingress.traefikCRD.sticky }}
sticky:
cookie:
httpOnly: true
name: {{ $.Values.ingress.traefikCRD.stickyCookieNameOverride | default (printf "%s_traefik_lb" (include "authelia.name" $)) }}
secure: true
sameSite: None
{{- end }}
{{- if $.Values.ingress.traefikCRD.sticky }}
sticky:
cookie:
httpOnly: true
name: {{ $.Values.ingress.traefikCRD.stickyCookieNameOverride | default (printf "%s_traefik_lb" (include "authelia.name" $)) }}
secure: true
sameSite: None
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.ingress.tls.enabled }}
Expand Down

0 comments on commit 45db959

Please sign in to comment.