From 8433545dc12b21eb92946809d50d2409f8e71b24 Mon Sep 17 00:00:00 2001 From: James Elliott Date: Wed, 5 May 2021 11:49:20 +1000 Subject: [PATCH] fix(authelia): make redis username actually optional (#51) This is so the username is only rendered if the username is not an empty string. Additionally it makes the default an empty string. This is so when users do not have the new redis v6 authentication enabled they can still use pre-v6 redis authentication. --- charts/authelia/Chart.yaml | 2 +- charts/authelia/templates/configMap.yaml | 4 +++- charts/authelia/values.local.yaml | 3 ++- charts/authelia/values.yaml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/charts/authelia/Chart.yaml b/charts/authelia/Chart.yaml index b63aed6..7e98589 100644 --- a/charts/authelia/Chart.yaml +++ b/charts/authelia/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: authelia -version: 0.3.16 +version: 0.3.17 kubeVersion: ">= 1.13.0-0" description: Authelia is a Single Sign-On Multi-Factor portal for web apps type: application diff --git a/charts/authelia/templates/configMap.yaml b/charts/authelia/templates/configMap.yaml index fbe23b1..43d4614 100644 --- a/charts/authelia/templates/configMap.yaml +++ b/charts/authelia/templates/configMap.yaml @@ -85,7 +85,9 @@ data: redis: host: {{ $session.redis.host }} port: {{ default 6379 $session.redis.port }} - username: {{ default "authelia" $session.redis.username }} + {{- if not (eq $session.redis.username "") }} + username: {{ $session.redis.username }} + {{- end }} maximum_active_connections: {{ default 8 $session.redis.maximum_active_connections }} minimum_idle_connections: {{ default 0 $session.redis.minimum_idle_connections }} {{- if $session.redis.tls.enabled }} diff --git a/charts/authelia/values.local.yaml b/charts/authelia/values.local.yaml index b83154f..07aad7a 100644 --- a/charts/authelia/values.local.yaml +++ b/charts/authelia/values.local.yaml @@ -728,7 +728,8 @@ configMap: port: 6379 ## Optional username to be used with authentication. - username: authelia + # username: authelia + username: "" ## This is the Redis DB Index https://redis.io/commands/select (sometimes referred to as database number, DB, etc). database_index: 0 diff --git a/charts/authelia/values.yaml b/charts/authelia/values.yaml index 249cbd8..f2582d4 100644 --- a/charts/authelia/values.yaml +++ b/charts/authelia/values.yaml @@ -726,7 +726,8 @@ configMap: port: 6379 ## Optional username to be used with authentication. - username: authelia + # username: authelia + username: "" ## This is the Redis DB Index https://redis.io/commands/select (sometimes referred to as database number, DB, etc). database_index: 0