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

HTTP/3: Support SslServerAuthenticationOptions with QUIC #49574

Closed
8 of 11 tasks
JamesNK opened this issue Mar 11, 2021 · 18 comments
Closed
8 of 11 tasks

HTTP/3: Support SslServerAuthenticationOptions with QUIC #49574

JamesNK opened this issue Mar 11, 2021 · 18 comments
Assignees
Milestone

Comments

@JamesNK
Copy link
Member

JamesNK commented Mar 11, 2021

SslServerAuthenticationOptions is the primary type for configuring HTTPS/TLS in Kestrel. It is designed for SslStream but most of the options can be mapped to QUIC.

The goal is to make setting a certificate for HTTP/3 to be like setting a certificate for other protocols.

Break down of its properties:

System.Net.Quic currently has an out of date version of msquic. Current blocked on msquic update: #44580

@ghost
Copy link

ghost commented Mar 12, 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.

@JamesNK JamesNK transferred this issue from dotnet/aspnetcore Mar 13, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Net.Security untriaged New issue has not been triaged by the area owner labels Mar 13, 2021
@ghost
Copy link

ghost commented Mar 13, 2021

Tagging subscribers to this area: @dotnet/ncl, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

SslServerAuthenticationOptions is the primary type for configuring HTTPS/TLS in Kestrel. It is designed for SslStream but most of the options can be mapped to QUIC.

The goal is to make setting a certificate for HTTP/3 to be like setting a certificate for other protocols.

Break down of its properties:

System.Net.Quic currently has an out of date version of msquic. Current blocked on msquic update: #44580

Author: JamesNK
Assignees: -
Labels:

area-System.Net.Security, untriaged

Milestone: -

@ghost
Copy link

ghost commented Mar 13, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

SslServerAuthenticationOptions is the primary type for configuring HTTPS/TLS in Kestrel. It is designed for SslStream but most of the options can be mapped to QUIC.

The goal is to make setting a certificate for HTTP/3 to be like setting a certificate for other protocols.

Break down of its properties:

System.Net.Quic currently has an out of date version of msquic. Current blocked on msquic update: #44580

Author: JamesNK
Assignees: -
Labels:

area-System.Net.Http, area-System.Net.Security, untriaged

Milestone: -

@JamesNK
Copy link
Member Author

JamesNK commented Mar 13, 2021

Moved to runtime. Changes will need to be made here in QUIC library.

@geoffkizer

@ghost
Copy link

ghost commented Mar 14, 2021

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

SslServerAuthenticationOptions is the primary type for configuring HTTPS/TLS in Kestrel. It is designed for SslStream but most of the options can be mapped to QUIC.

The goal is to make setting a certificate for HTTP/3 to be like setting a certificate for other protocols.

Break down of its properties:

System.Net.Quic currently has an out of date version of msquic. Current blocked on msquic update: #44580

Author: JamesNK
Assignees: -
Labels:

area-System.Net.Quic, untriaged

Milestone: -

@geoffkizer
Copy link
Contributor

@wfurt Can you help with some of these?

@geoffkizer
Copy link
Contributor

CertificateRevocationCheckMode

What does msquic do currently? Just not check for revocation?

@wfurt
Copy link
Member

wfurt commented Mar 18, 2021

Is the server certificate working on Linux @JamesNK?

From the list:

  • allow renegotiation: we should ignore and not applicable to TLS13. The resumption is whole different connect and and should not be mixed.

For the revocation, we can most likely use X509Chain to do verification via custom callback. This is generally What we do now for SslStream.

For the ServerCertificateContext aka custom trust we will need to check and probably make API changes. It will work on Windows as ServerCertificateContext puts intermediate certificates to the CA store. Validation may still be problematic.

I think we should focus on marshaling certificates in & out and making that consistent across all platforms.
I can take a look and perhaps we can reuse or mimic parts of X509Certificate2 PAL.

@JamesNK
Copy link
Member Author

JamesNK commented Mar 18, 2021

Is the server certificate working on Linux @JamesNK?

I have been purely testing on Windows so I don't know about Linux. Other devs are using Linux with a custom build of OpenSSL so I assume it is working there.

@JamesNK
Copy link
Member Author

JamesNK commented Mar 18, 2021

CertificateRevocationCheckMode

What does msquic do currently? Just not check for revocation?

I'm not sure. It could also be the opposite: msquic only accepts non-revocated client certs.

@JamesNK
Copy link
Member Author

JamesNK commented Mar 18, 2021

@nibanks This is the list I put together after our meeting comparing TLS server configuration in .NET to msquic.

What is msquic behavior without a CertificateRevocationCheckMode property?

@ManickaP
Copy link
Member

ManickaP commented Mar 18, 2021

Is the server certificate working on Linux @JamesNK?

I'll answer that, no it isn't, we're using "tls_stub" msquic version to work around that ATM.

@ManickaP ManickaP added this to the 6.0.0 milestone Apr 15, 2021
@ManickaP ManickaP removed the untriaged New issue has not been triaged by the area owner label Apr 15, 2021
@wfurt
Copy link
Member

wfurt commented Jun 14, 2021

The ServerCertificateSelectionCallback and RemoteCertificateValidationCallback should be fully functional now. We get certificate from MsQuic and we use X509Chain to construct the chain as well as to check validity including revocation.

I'm wondering if it would make sense to trace remain tasks separately. I think it would be easier to track and argue about priority than large mega issue. For example, microsoft/msquic#1430 added support for Cipher selection but there are 3 max to choose from so it seems pretty marginal.

@ManickaP
Copy link
Member

ManickaP commented Jul 8, 2021

Meeting notes:
@wfurt will spawn new issues for the missing points and this issue will be closed.
@geoffkizer promised to look into QUIC spec whether it supports SNI based cert selection. If not, the last point is moot, if yes and msquic doesn't support it, we need to file an issue there and then follow up with our code.

@ManickaP
Copy link
Member

ManickaP commented Jul 9, 2021

ClientCertificateRequired. QUIC_CREDENTIAL_FLAG_REQUIRE_CLIENT_AUTHENTICATION is the last thing on the list, that hasn't been crossed out.
@wfurt what is the state of that? So that we can close this issue.

@wfurt
Copy link
Member

wfurt commented Jul 9, 2021

That should be fixed with #54302 @ManickaP. The server part is OK but on client MsQuic does not support it on Linux and I'm going to open issue for tracking. It should light up when read as the certificate handling is shared with server e.g. on Linux we should marshall the portable buffer instead of Windows certstore handle.

@wfurt
Copy link
Member

wfurt commented Jul 9, 2021

microsoft/msquic#1803 opened to track the Linux support in MsQuic

@ManickaP
Copy link
Member

ManickaP commented Jul 9, 2021

Closing then, all should be either resolved or tracked by one of: #55378, #55421 and microsoft/msquic#1803

@ManickaP ManickaP closed this as completed Jul 9, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants