straight-lizard-48774
12/30/2024, 11:46 AMSECRETS_CIPHER
and the SECRETS_COOKIE
?brief-egg-61061
12/30/2024, 11:46 AMbrief-egg-61061
12/30/2024, 11:46 AMSECRETS_CIPHER
and SECRETS_COOKIE
are handled. According to the [Kubernetes Helm Chart documentation](https://www.ory.sh/docs/hydra/self-hosted/kubernetes-helm-chart), you can use a command to generate a cryptographically secure secret for the system secret. Here's an example of how you can do this: helm install \ --set 'hydra.config.secrets.system={'$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32)'}' \ ... ory/hydra
While this example is for Hydra, the same principle applies to Kratos. You can use a similar approach to generate a secret for Kratos' default secret. Alternatively, you can create a Kubernetes Secret beforehand and reference it in your Helm installation, as shown in this example: kubectl create secret generic my-secure-secret --from-literal=dsn=<postgres://foo:bar@baz:1234/db> \ --from-literal=secretsCookie=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32) \ --from-literal=secretsSystem=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32) helm install \ ... --set 'hydra.existingSecret=my-secure-secret' \ ... ory/hydra
Again, while this example is for Hydra, you can adapt it for Kratos by creating a secret with the appropriate keys for Kratos and referencing it in your Helm installation. Remember that these secrets should be cryptographically secure and at least 32 characters long. It's also important to set up proper [secret key rotation](https://www.ory.sh/docs/kratos/guides/secret-key-rotation) for production environments.straight-lizard-48774
12/30/2024, 11:48 AMbrief-egg-61061
12/30/2024, 11:48 AMbrief-egg-61061
12/30/2024, 11:48 AMkratos.existingSecret
and kratos.config.secrets.default
. The documentation doesn't explicitly state the relationship between these two configuration options for Kratos. However, I can provide some relevant information based on similar concepts in the Hydra Helm chart, which might apply to Kratos as well: According to the [Kubernetes Helm Chart documentation](https://www.ory.sh/docs/hydra/self-hosted/kubernetes-helm-chart), when you use an existing secret, you don't need to set the secrets directly in the configuration. The documentation states: Alternatively, you can use an existing Kubernetes Secret instead of letting the Helm Chart create one for you: kubectl create secret generic my-secure-secret --from-literal=dsn=<postgres://foo:bar@baz:1234/db> \ --from-literal=secretsCookie=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32) \ --from-literal=secretsSystem=$(LC_ALL=C tr -dc 'A-Za-z0-9' < /dev/urandom | base64 | head -c 32) helm install \ ... --set 'hydra.existingSecret=my-secure-secret' \ ... ory/hydra
If Kratos follows a similar pattern, setting kratos.existingSecret
should indeed mean that you don't need to set kratos.config.secrets.default
separately. The existing secret would contain all the necessary secret values. However, to be absolutely certain about this for Kratos, you would need to refer to Kratos-specific documentation or consult with the Ory support team, as the provided knowledge sources don't contain this level of detail for Kratos Helm chart configuration.straight-lizard-48774
12/30/2024, 1:27 PMbrief-egg-61061
12/30/2024, 1:27 PMbrief-egg-61061
12/30/2024, 1:27 PMtoYaml
in Go templates, it typically only renders the first level of an object by default. 2. To render nested values, you might need to use a combination of range and nested field access. For example, instead of: {{ .spec.parameter.methods | toYaml }}
You might need to iterate through the methods and their nested values: {{- range $key, $value := .spec.parameter.methods }} {{ $key }}: {{- range $subKey, $subValue := $value }} {{ $subKey }}: {{ $subValue }} {{- end }} {{- end }}
However, this is a general approach and may not be exactly what you need for your specific Ory configuration. For the most accurate and up-to-date information on how to handle this in Ory Kratos configurations, I recommend: 1. Checking the official Ory Kratos documentation for any specific templating guidelines. 2. Reaching out to the Ory community on their [Slack channel](https://slack.ory.sh/) for more specific assistance. 3. Opening an issue on the [Ory Kratos GitHub repository](https://github.com/ory/kratos) if you believe this is a bug or limitation in the templating system.