Should we include an additional interface to include 'sync' secret retrievals? #254
stijnmoreels
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Sure, sounds good to me. Just curious why a new interface instead of adding it? Because of the breaking change? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Explain the problem/feature you want to have:
Right now, all our
ISecretProvider
implementations and dependent interfaces uses this asynchronous paradigm to retrieve secrets. In some cases though, like User Secrets, Environment Variables, Docker Secrets..., where there's no external dependency involved, the secret can be retrieved synchronous. This is only 'hidden' behind the asynchronous wall (which is a good thing!).In some cases though, like when registering the JWT authorization and you request the security token, or you want the instrumentation key of your Application Insights instance... you're stuck with a asynchronous system in a synchronous startup method. It would be cleaner if we introduce an additional interface for the
ISecretProvider
which synchronously retrieves the secret so when you want to get the instrumentation key, you could do:Beta Was this translation helpful? Give feedback.
All reactions