abpframework / abpframework/abp

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

Open
#16,620 4 comments 0 reactions 1 assignee View on GitHub

@maliming is already working on this.

Since May 23, 2023.

feature
Dominant language
C#
Stars
14.4k
Forks
3.7k
Avg merge
15h 32m
Merged PRs (30d)
106

Description

Is there an existing issue for this?
  • I have searched the existing issues
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:

  • Loading key files based on their thumbprint (useful for loading certificates from certificate stores, typically on Windows hosting scenarios)
  • Loading key files based on their physical path (useful on system that do not provide stores like Linux)
  • Using ephemeral keys (through OpenIdDict's AddEphemeralEncryptionKey and AddEphemeralSigningKey)

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.