-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Validate configuration using JSON Schema and support config hot reloading #1729
Description
Is your feature request related to a problem? Please describe.
Currently, ORY Hydra validates the configuration in a very crude way. We should fix that and support JSON Schema as we already do in Oathkeeper and Kratos.
To see how kratos does that (validation and reloading), check here: https://github.com/ory/kratos/blob/master/cmd/serve.go#L53
Describe the solution you'd like
Hydra already implements the architecture of kratos/oathkeeper that supports hot reloading of config values. Some config values (such as the server bind address) can not be reloaded and should thus cause an error (see how kratos/oathkeeper is handling that). We need to create a list of variables that can not be reloaded. I believe that the fosite's config doesn't support reloading at this time because many config values are read only once:
Line 247 in 74d8e31
| func (m *RegistryBase) OAuth2Provider() fosite.OAuth2Provider { |