The most scalable and customizable OpenID Certified™ OpenID Connect and OAuth Provider on the market. Become an OpenID Connect and OAuth2 Provider over night. Broad support for related RFCs. Written in Go, cloud native, headless, API-first. Available as a service on Ory Network and for self-hosters.
Currently, many configuration values can not be changed on the fly. This is because in a lot of places, the configuration is set on struct / service initialization and can then never be changed afterwards.
A big problem here is that Ory Fosite ( https://github.com/ory/fosite ) is using a static config system (which can only be changed on initialization) and also provides most of the configuration options.
Describe your ideal solution
Ideally, all configuration values would be consumed as functions GetSomeValue() string and not as values c.SomeValue. We have established a pattern in Ory Kratos and other projects already. The main concept is that every function which requires a configuration value is calling the service locator to find the right config struct this.Config(ctx) to then call the required config value.
As part of this change and to support full contextualization, we need to:
[ ] Do away with any context.TODO() or context.Background() that are used in non-tests
[ ] Ensure we never call the config struct directly in the registry (remove any references to m.C)
[ ] Contextualize Fosite's config which will require API changes
Workarounds or alternatives
none
Version
master
Additional Context
Implementing this effectively implements full Contextualization.
Preflight checklist
Describe your problem
Currently, many configuration values can not be changed on the fly. This is because in a lot of places, the configuration is set on struct / service initialization and can then never be changed afterwards.
A big problem here is that Ory Fosite ( https://github.com/ory/fosite ) is using a static config system (which can only be changed on initialization) and also provides most of the configuration options.
Describe your ideal solution
Ideally, all configuration values would be consumed as functions
GetSomeValue() string
and not as valuesc.SomeValue
. We have established a pattern in Ory Kratos and other projects already. The main concept is that every function which requires a configuration value is calling the service locator to find the right config structthis.Config(ctx)
to then call the required config value.As part of this change and to support full contextualization, we need to:
context.TODO()
orcontext.Background()
that are used in non-testsm.C
)Workarounds or alternatives
none
Version
master
Additional Context
Implementing this effectively implements full Contextualization.