kratos
kratos copied to clipboard
Viewing the current configuration, after defaults and overrides have been applied
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [X] I have joined the Ory Community Slack.
- [X] I am signed up to the Ory Security Patch Newsletter.
Ory Network Project
No response
Describe your problem
As a Kratos administrator or developer, I want to view the configuration for my running application, so that I can more easily observe the system.
I'm looking at the Kratos config here: https://www.ory.sh/docs/kratos/reference/configuration
I understand there are various ways to override the default values via env vars as well as the --config path/to/config.yaml
flag. But how can I see the "current running config" for my Kratos instance? There doesn't seem to be a way.
For example, I'm troubleshooting an issue where Kratos is behaving as if selfservice.allowed_return_urls
isn't being set. I want to verify whether that's correctly configured to help me debug.
This feature would also be useful when triaging support requests, so that users can easily upload their current config along with a bug report.
This issue applies to the Hydra application as well.
Describe your ideal solution
We can implement an HTTP endpoint (eg: /admin/status
) which returns the configuration for that service. It would help debug whether a config value has been correctly overridden, or replaced with a default value, etc.
Here's an example of the /status
endpoint that Grafana uses for one of their products: https://grafana.com/docs/tempo/latest/api_docs/#status
Workarounds or alternatives
Alternatively we can update the CLI to output the current config, but it seems less convenient since it requires shelling into the server.
A workaround, in place of this feature, is to rely on log statements to understand the config's state. But it's often preferable to view the whole config in one place.
Another workaround is to view the config values from the traces, as mentioned here: https://github.com/ory/kratos/discussions/3027#discussioncomment-4705182 But I'm not sure if that covers all config values, or if that feature is actually working.
Version
1.0.0
Additional Context
Link to my post on the Ory Community Slack, which inspired this issue: https://ory-community.slack.com/archives/C012RJ2MQ1H/p1699554528567839
I'm also open to implementing this feature! If these requirements sound reasonable, then maybe we can discuss a high-level approach as a next step.
Related discussion that this feature would resolve: https://github.com/ory/kratos/discussions/3027