AddApiAuthorization for IdentityServer should allow to override in memory signing credential store.
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
We are using the Microsoft.Extensions.DependencyInjection.IdentityServerBuilderConfigurationExtensions.AddApiAuthorization method and it registers and in memory implementation of ISigningCredentialStore and IValidationKeysStore. The existing code will configure the ConfigureSigningCredentials and always call the LoadKey method in Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ConfigureSigningCredentials. That means that you need to configure the IdentityServer:Key in your environment, even if you end up not needing it because you use your own implementation of ISigningCredentialStore and IValidationKeysStore.
### Describe the solution you'd like
I would like the Microsoft.Extensions.DependencyInjection.IdentityServerBuilderConfigurationExtensions.AddApiAuthorization to not force the registration of the in memory ISigningCredentialStore and IValidationKeysStore if there is already one registered, or through the options.
### Additional context
Duende now suggests to use their automatic key management key store. It might be a good idea to leverage it by default instead of in memory implementation.
Contributor guide
Assessment
This issue has not been assessed yet.