diff --git a/charts/stable/authelia/Chart.yaml b/charts/stable/authelia/Chart.yaml index bcb53e3572f..bc4b95cd66f 100644 --- a/charts/stable/authelia/Chart.yaml +++ b/charts/stable/authelia/Chart.yaml @@ -38,7 +38,7 @@ sources: - https://github.com/authelia/chartrepo - https://github.com/authelia/authelia type: application -version: 8.0.12 +version: 8.0.13 annotations: truecharts.org/catagories: | - security diff --git a/charts/stable/authelia/templates/_secrets.tpl b/charts/stable/authelia/templates/_secrets.tpl index 42b3536ca55..2854c28fc79 100644 --- a/charts/stable/authelia/templates/_secrets.tpl +++ b/charts/stable/authelia/templates/_secrets.tpl @@ -15,9 +15,14 @@ metadata: {{- $encryptionkey := "" }} data: {{- if $autheliaprevious }} - ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" }} SESSION_ENCRYPTION_KEY: {{ index $autheliaprevious.data "SESSION_ENCRYPTION_KEY" }} JWT_TOKEN: {{ index $autheliaprevious.data "JWT_TOKEN" }} + {{- if ( hasKey $autheliaprevious.data "ENCRYPTION_KEY" ) }} + ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" }} + {{- else }} + {{- $encryptionkey := randAlphaNum 100 }} + ENCRYPTION_KEY: {{ $encryptionkey | b64enc | quote }} + {{- end }} {{- else }} {{- $jwtsecret := randAlphaNum 50 }} {{- $sessionsecret := randAlphaNum 50 }}