abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.95k stars 3.45k forks source link

Improve compatibility with cloud hosting solution (like Azure) for OpenIdDict certificates support #16620

Open XavierRM-S opened 1 year ago

XavierRM-S commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

Since the introduction of OpenIdDict, it is not possible to host ABP application out of the box on some hosting providers, including Azure App Services.

The problem comes from the way OpenIdDict handles development certificates, and can be avoided by manually specifying which certificates should be used, instead of using AddDevelopmentEncryptionCertificate and AddDevelopmentSigningCertificate, both of which are used by ABP by default.

Describe the solution you'd like

The solution I'd like to see is an improvement over the existing AddDevelopmentEncryptionAndSigningCertificate option. Instead of just enabling/disabling development certificates, AbpOpenIddictAspNetCoreOptions should also provide tools to use other certificate sources:

Ideally, these should be made easy to change using IConfiguration, as this is the kind of setting that will typically have to be changed depending on where the app is hosted.

Additional context

I'd be ready to propose an implementation for this feature, if nobody has remarks about the general principles presented in this issue.

maliming commented 1 year ago

hi

https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict

XavierRM-S commented 1 year ago

Hi

This issue is not to ask how this can be done. I know it is possible and how.

I wanted to know if you were open to improving the out-of-the-box support for this operation, so we don't have to copy and paste the same certificate management code in every project.

maliming commented 1 year ago

We already add it to the commercial template. will also do it for opensource.

XavierRM-S commented 1 year ago

Alright. If you already have something I'll just wait with my custom solution until you push the changes in this repo. Feel free to close the issue if you don't need it to track that subject.