dotnet / dotnet/aspnetcore

AddApiAuthorization for IdentityServer should allow to override in memory signing credential store.

Open
#41,303 1 comment 1 reaction 0 assignees View on GitHub
area-identity feature-identity-service
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.