fix(authelia): prevent encryption key resets

This commit is contained in:
Kjeld Schouten-Lebbing
2023-03-07 21:23:23 +01:00
parent b2b426eab5
commit 629f487dbf
2 changed files with 8 additions and 13 deletions
+3 -3
View File
@@ -3,11 +3,11 @@ appVersion: "4.37.5"
dependencies: dependencies:
- name: common - name: common
repository: https://library-charts.truecharts.org repository: https://library-charts.truecharts.org
version: 12.2.20 version: 12.2.24
- condition: redis.enabled - condition: redis.enabled
name: redis name: redis
repository: https://deps.truecharts.org repository: https://deps.truecharts.org
version: 6.0.11 version: 6.0.14
deprecated: false deprecated: false
description: Authelia is a Single Sign-On Multi-Factor portal for web apps description: Authelia is a Single Sign-On Multi-Factor portal for web apps
home: https://truecharts.org/charts/enterprise/authelia home: https://truecharts.org/charts/enterprise/authelia
@@ -36,7 +36,7 @@ sources:
- https://github.com/authelia/chartrepo - https://github.com/authelia/chartrepo
- https://github.com/authelia/authelia - https://github.com/authelia/authelia
type: application type: application
version: 15.0.5 version: 15.0.7
annotations: annotations:
truecharts.org/catagories: | truecharts.org/catagories: |
- security - security
@@ -9,14 +9,9 @@
enabled: true enabled: true
data: data:
{{- if $autheliaprevious }} {{- if $autheliaprevious }}
SESSION_ENCRYPTION_KEY: {{ index $autheliaprevious.data "SESSION_ENCRYPTION_KEY" }} SESSION_ENCRYPTION_KEY: {{ index $autheliaprevious.data "SESSION_ENCRYPTION_KEY" | b64dec }}
JWT_TOKEN: {{ index $autheliaprevious.data "JWT_TOKEN" }} JWT_TOKEN: {{ index $autheliaprevious.data "JWT_TOKEN" | b64dec }}
{{- if ( hasKey $autheliaprevious.data "ENCRYPTION_KEY" ) }} ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" | b64dec }}
ENCRYPTION_KEY: {{ index $autheliaprevious.data "ENCRYPTION_KEY" }}
{{- else }}
{{- $encryptionkey := randAlphaNum 100 }}
ENCRYPTION_KEY: {{ $encryptionkey }}
{{- end }}
{{- else }} {{- else }}
{{- $jwtsecret := randAlphaNum 50 }} {{- $jwtsecret := randAlphaNum 50 }}
{{- $sessionsecret := randAlphaNum 50 }} {{- $sessionsecret := randAlphaNum 50 }}
@@ -47,8 +42,8 @@ data:
{{- if $autheliaprevious }} {{- if $autheliaprevious }}
{{- if and ( hasKey $autheliaprevious.data "OIDC_PRIVATE_KEY" ) ( hasKey $autheliaprevious.data "OIDC_HMAC_SECRET" ) }} {{- if and ( hasKey $autheliaprevious.data "OIDC_PRIVATE_KEY" ) ( hasKey $autheliaprevious.data "OIDC_HMAC_SECRET" ) }}
OIDC_PRIVATE_KEY: {{ index $autheliaprevious.data "OIDC_PRIVATE_KEY" }} OIDC_PRIVATE_KEY: {{ index $autheliaprevious.data "OIDC_PRIVATE_KEY" | b64dec }}
OIDC_HMAC_SECRET: {{ index $autheliaprevious.data "OIDC_HMAC_SECRET" }} OIDC_HMAC_SECRET: {{ index $autheliaprevious.data "OIDC_HMAC_SECRET" | b64dec }}
{{- else }} {{- else }}
{{- $oidckey := genPrivateKey "rsa" }} {{- $oidckey := genPrivateKey "rsa" }}
{{- $oidcsecret := randAlphaNum 32 }} {{- $oidcsecret := randAlphaNum 32 }}