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

Convert Https connection adapter to connection middleware #4623

Closed
davidfowl opened this issue Aug 27, 2017 · 11 comments
Closed

Convert Https connection adapter to connection middleware #4623

davidfowl opened this issue Aug 27, 2017 · 11 comments
Assignees
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-kestrel

Comments

@davidfowl
Copy link
Member

As part of bedrock, connection adapters are going away and we should port the tls connection adapter to middleware. We don't want to break the public API of the existing extension method on ListenOptions so that will remain.

The true TLS implementation should be in Microsoft.AspNetCore.Protocols.Tls and Kestrel.Tls should delegate to it in the implementation.

Edit: Also convert Logging connection adapter to middleware.

@muratg
Copy link
Contributor

muratg commented Sep 1, 2017

Related: aspnet/KestrelHttpServer#1665

@muratg
Copy link
Contributor

muratg commented Nov 10, 2017

@davidfowl assigning to you as the other Connection Adapter bug is also assigned to you.

@muratg
Copy link
Contributor

muratg commented Aug 24, 2018

@davidfowl I believe you're working on this currently.

@muratg
Copy link
Contributor

muratg commented Aug 24, 2018

(Please see the edit above)

@aspnet-hello aspnet-hello transferred this issue from aspnet/KestrelHttpServer Dec 12, 2018
@aspnet-hello aspnet-hello assigned davidfowl and unassigned davidfowl Dec 12, 2018
@aspnet-hello aspnet-hello added this to the 3.0.0 milestone Dec 12, 2018
@davidfowl davidfowl modified the milestones: 3.0.0, 3.0.0-preview3 Jan 23, 2019
@davidfowl
Copy link
Member Author

I'm going to take another stab at this.

@analogrelay
Copy link
Contributor

analogrelay commented Apr 30, 2019

Milestone: @davidfowl (aka never whenever he gets to it)

@davidfowl
Copy link
Member Author

Old version aspnet/KestrelHttpServer#2849

@jkotalik
Copy link
Contributor

@davidfowl should we add this to #10869?

@davidfowl
Copy link
Member Author

Sure.

@fubar-coder
Copy link

My use case is a little more complicated, because I wanted to implement AUTH TLS for an FTP server. This stuff is quite crazy, as I have to do the following:

  • Have a connection middleware that works in a "pass-through" mode by default
  • Stop the receiving task without disposing anything (effectively pausing it)
  • Send a response that the connection switches to SslStream
  • Flush and stop the sending task without disposing anything (effectively pausing it)
  • Do an SslStream.AuthenticateAsServer
  • Start the sending task which now uses the SslStream
  • Start the receiving task which now uses the SslStream

The other way (from SslStream to pass-through) needs to work too (REIN command).

@davidfowl davidfowl changed the title Convert TLS connection adapter to connection middleware Convert Https connection adapter to connection middleware Jun 19, 2019
@davidfowl davidfowl self-assigned this Jun 19, 2019
@davidfowl
Copy link
Member Author

This is done. I'll file another issue for exposing a pure TLS middleware, we did the bare minimum to migrate Kestrel's HTTPS IConnectionAdapter to middleware, it'll likely be identical to the TLS middleware (we'll build it on top).

@ghost ghost locked as resolved and limited conversation to collaborators Dec 4, 2019
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-kestrel
Projects
None yet
Development

No branches or pull requests

8 participants