Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LetsEncrypt certificate acquisition and rotation in Kestrel #4712

Open
Eilon opened this issue Oct 1, 2018 · 17 comments
Open
Labels
affected-medium This issue impacts approximately half of our customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-kestrel feature-yarp This issue is related to work on yarp severity-nice-to-have This label is used by an internal tool Theme: meeting developer expectations
Milestone

Comments

@Eilon
Copy link
Member

Eilon commented Oct 1, 2018

Original issue: #1190

cc @blowdart

@cwe1ss
Copy link
Contributor

cwe1ss commented Oct 1, 2018

Thx for creating this issue! Some feature requests:

  • It should be possible to use the Let’s Encrypt staging server for dev purposes
  • It should be possible to create wildcard certificates
  • The certificate storage should be pluggable and support multi-instance scenarios
  • There should be an Azure Key Vault storage provider

@Eilon
Copy link
Member Author

Eilon commented Oct 1, 2018

BTW one option to consider is making sure that Kestrel has any/all required hooks for this to be community-implemented (and maybe that's already the case).

@Tratcher
Copy link
Member

Tratcher commented Oct 1, 2018

The SNI callback added in 2.1 should be all that's needed to plug in a separate implementation. @natemcmaster did your prototype need any additional hooks?

@natemcmaster
Copy link
Contributor

No, but I had to write some code that felt ugly in order to set the SNI callback to use a method on a service from DI.

See https://github.com/natemcmaster/LetsEncrypt/blob/6e5d6d96b20ed2302bfe9bfb5afe3b30d0307488/src/McMaster.AspNetCore.LetsEncrypt/Internal/KestrelOptionsSetup.cs

@Tratcher
Copy link
Member

Tratcher commented Oct 1, 2018

Yeah, I wouldn't want an end user to have to write that code but it looks reasonable if a LetsEncrypt implementation provided it.

@davidfowl
Copy link
Member

We could make the selector an interface instead of just being a delegate.

@Tratcher
Copy link
Member

Tratcher commented Oct 2, 2018

And auto-resolve it from DI? The selector needs to be uniquely assignable per endpoint.

@aspnet-hello aspnet-hello transferred this issue from aspnet/KestrelHttpServer Dec 13, 2018
@aspnet-hello aspnet-hello added this to the Backlog milestone Dec 13, 2018
@LazerFX
Copy link

LazerFX commented Dec 19, 2018

I'd like, if this goes ahead, to request support of the X-Path-* headers so that even if you're running Kestrel inside a container, behind a load balancer, behind a proxy it can still get the right certificate.

@muratg muratg removed this from the Backlog milestone Jan 26, 2019
@SommerEngineering
Copy link

Is there any news on this e.g. for ASP.NET Core 3?

@Eilon
Copy link
Member Author

Eilon commented Feb 17, 2019

@SommerEngineering this is not planned for ASP.NET Core 3 as a built-in feature, but we are considering options around having a proper sample and documentation that demonstrates how to do this.

@Emalton
Copy link

Emalton commented Mar 10, 2019

That would be amazing @Eilon!

@analogrelay analogrelay added this to the Backlog milestone Jun 18, 2019
@analogrelay analogrelay added enhancement This issue represents an ask for new feature or an enhancement to an existing one and removed triage-review labels Jun 18, 2019
@razfriman
Copy link

This would be amazing. Please prioritise this. HTTPS is not easy at the moment with kesteel

@natemcmaster
Copy link
Contributor

I cleaned up the prototype that I wrote last year and have decided to release this to the public as a personal project. It works with ASP.NET Core 2.1, 2.2, and 3.0. Hopefully someone will find this useful.

https://github.com/natemcmaster/LetsEncrypt

@MaxDZ8
Copy link

MaxDZ8 commented Sep 21, 2019

I plan to experiment with the proposed library ASAP. Thank you @natemcmaster . I guess the best would be your library goes like JSON.NET which is not part of core but basically de facto standard.

For the time being, I would like to elaborate on our needs.

The company I work for is transitioning from embedded development to IoT. We do not have specific security professionals in house. We need to secure edge servers so it is my understanding wildcards are critical to us.

Looking at how this issue goes on.

@jkotalik jkotalik added affected-medium This issue impacts approximately half of our customers severity-nice-to-have This label is used by an internal tool not-on-roadmap labels Oct 9, 2020 — with ASP.NET Core Issue Ranking
@halter73 halter73 added the severity-minor This label is used by an internal tool label Oct 9, 2020 — with ASP.NET Core Issue Ranking
@halter73 halter73 removed the severity-nice-to-have This label is used by an internal tool label Oct 9, 2020
@ghost
Copy link

ghost commented Jan 15, 2021

Thanks for contacting us.
We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@RehanSaeed
Copy link
Contributor

FYI, LettuceEncrypt is now in maintenance mode only, see announcement:

natemcmaster/LettuceEncrypt#189

@ghost
Copy link

ghost commented Sep 13, 2022

Thanks for contacting us.

We're moving this issue to the .NET 8 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).
If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affected-medium This issue impacts approximately half of our customers area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-kestrel feature-yarp This issue is related to work on yarp severity-nice-to-have This label is used by an internal tool Theme: meeting developer expectations
Projects
None yet
Development

No branches or pull requests