ory / kratos

The most scalable and customizable identity server on the market. Replace your Homegrown, Auth0, Okta, Firebase with better UX and DX. Has all the tablestakes: Passkeys, Social Sign In, Multi-Factor Auth, SMS, SAML, TOTP, and more. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
https://www.ory.sh/?utm_source=github&utm_medium=banner&utm_campaign=kratos
Apache License 2.0
11.31k stars 963 forks source link

Viewing the current configuration, after defaults and overrides have been applied #3617

Open modulitos opened 1 year ago

modulitos commented 1 year ago

Preflight checklist

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

github-actions[bot] commented 1 week ago

Hello contributors!

I am marking this issue as stale as it has not received any engagement from the community or maintainers for a year. That does not imply that the issue has no merit! If you feel strongly about this issue

Throughout its lifetime, Ory has received over 10.000 issues and PRs. To sustain that growth, we need to prioritize and focus on issues that are important to the community. A good indication of importance, and thus priority, is activity on a topic.

Unfortunately, burnout has become a topic of concern amongst open-source projects.

It can lead to severe personal and health issues as well as opening catastrophic attack vectors.

The motivation for this automation is to help prioritize issues in the backlog and not ignore, reject, or belittle anyone.

If this issue was marked as stale erroneously you can exempt it by adding the backlog label, assigning someone, or setting a milestone for it.

Thank you for your understanding and to anyone who participated in the conversation! And as written above, please do participate in the conversation if this topic is important to you!

Thank you 🙏✌️