enough-vase-33352
04/17/2025, 8:59 AMbrief-egg-61061
04/17/2025, 9:00 AMbrief-egg-61061
04/17/2025, 9:00 AMyaml secrets: default: - your-default-secret cookie: - your-cookie-secret cipher: - your-32-long-secret-key
These secrets should have high entropy (>= 256 bit) as mentioned in the [Secret and Key Rotation guide](https://www.ory.sh/docs/kratos/guides/secret-key-rotation). For AWS Secrets integration, you would typically: 1. Store your secrets in AWS Secrets Manager 2. During deployment, retrieve these secrets 3. Inject them into your Kratos configuration file or provide them as environment variables While the documentation doesn't specifically cover AWS Secrets integration, you could consider these approaches: 1. Use a deployment script that retrieves secrets from AWS Secrets Manager and generates/updates the kratos.yml file 2. Use environment variables instead of hardcoded secrets in the configuration file 3. Use a configuration management tool that supports AWS Secrets Manager integration For security best practices, remember to rotate your secrets periodically as described in the [Secret and Key Rotation guide](https://www.ory.sh/docs/kratos/guides/secret-key-rotation), where you would add new secrets to the top of the list while keeping old ones to maintain backward compatibility. If you need more specific guidance on AWS Secrets integration with Ory Kratos, you might want to check the Ory documentation for updates or reach out to the Ory community for best practices.enough-vase-33352
04/17/2025, 9:02 AMbrief-egg-61061
04/17/2025, 9:02 AMbrief-egg-61061
04/17/2025, 9:02 AMbash openssl rand -base64 22
2. Store these secrets in AWS Secrets Manager instead of in your kratos.yml file 3. During deployment, you could: - Use environment variables to override configuration values - Use a template for kratos.yml with placeholders that get replaced during deployment - Use a configuration management tool to inject the secrets ## Potential Implementation Approaches 1. Template approach: Create a kratos.yml.template with placeholders: yaml secrets: cookie: - ${COOKIE_SECRET} cipher: - ${CIPHER_SECRET}
Then use a script during deployment to replace these placeholders with values from AWS Secrets Manager. 2. Environment variables: Configure your deployment to set environment variables that Kratos can use. 3. Separate config files: Keep secrets in a separate configuration file that is excluded from version control (.gitignore) and loaded at runtime. The issue mentioned in [GitHub](https://github.com/ory/network/issues/398) indicates that there are ongoing discussions about improving secrets management in Ory, which suggests this is a recognized need in the community. Remember that according to the documentation, these secrets should have high entropy (>= 256 bit) and should be rotated periodically as described in the [Secret and Key Rotation guide](https://www.ory.sh/docs/kratos/guides/secret-key-rotation).