ory / k8s

Kubernetes Helm Charts for the ORY ecosystem.
https://k8s.ory.sh/helm
Apache License 2.0
335 stars 258 forks source link

Unable to rotate secretsCookie in k8s helm chart #643

Closed AmiSMB closed 12 months ago

AmiSMB commented 1 year ago

Preflight checklist

Ory Network Project

No response

Describe the bug

When trying to supply the helm chart for Hydra with the same value I always end up with the secrets that have been created prefixed with [ and suffixed with ] as I am supplying a list which is correct as per the key rotation documentation. Looking at _helpers.tpl you can see the reason is that the value is not being handled in the same way as the secretsSystem.

Reproducing the bug

helm install \ --set 'hydra.config.secrets.system=["test","test1"]' \ --set 'hydra.config.secrets.cookie=["test","test1"]' \ --set 'hydra.config.dsn=memory' \ --set 'hydra.config.urls.self.issuer=https://my-hydra/' \ --set 'hydra.config.urls.login=https://my-idp/login' \ --set 'hydra.config.urls.consent=https://my-idp/consent' \ ory/hydra

kubectl get secrets/hydra --template={{.data.secretsSystem}} | base64 -d ; echo ["test","test1"] kubectl get secrets/hydra --template={{.data.secretsCookie}} | base64 -d ; echo [test [test1]]

Relevant log output

No response

Relevant configuration

No response

Version

v2.1.2 Hydra 0.36.0 Helm chart

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

Demonsthere commented 12 months ago

Thanks for the report :) I have unified the logic to handle the array better