-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
QUIC: Validate SslServerAuthenticationOptions set on QuicListenerOptions #49423
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsQuicListenerOptions has SslServerAuthenticationOptions property.
It looks like code that uses this property assumes that SslServerAuthenticationOptions.ServerCertificate is set. * Need to validate that it is set.
|
Triage: we should consider making it non-nullable if it needs to be set. Also decide what to do about the other properties, which is probably covered in #32071. |
Triage: this is nice to have, moving to 7.0 |
Note that MsQuicListener needs ALPN to event start. That may be fixed in future but that is current constraint. |
We need the SslOptions, they shouldn't be nullable (API shape to discuss): #49587 (comment) |
I believe Kestrel will always use Kestrel doesn't offer a way to customize the ALPN for HTTP/1.1 or HTTP/2. Right now I don't see that changing for HTTP/3. |
I don't expect custom ALPN per SNI to be an issue until we get to HTTP/4 (maybe next year 😆). |
We have little bit more chat about this with @nibanks. The reason why msquic want ALPN upfront is to be able share the port with independent applications. Something that does not work with TCP/TLS but it is possible with QUICK. maybe the flow would be to get everything Kestrel may support upfront and then select specific HTTP version in the callback ...? (H3 only one for now) |
Chris, have you ever seen people use SNI to configure a non-standard ALPN? Would Kestrel even allow that? Hypothetical future scenario:
Workable? |
I've seen some apps that have conditionally enabled/disabled HTTP/2 per SNI by customizing the ALPN. That works fine with Kestrel. You can only use protocols kestrel knows about though.
Maybe? It's worth a try. |
@nibanks when we open listener we need to provide list of ALPN to listen for, but we also set ALPN when we call |
I believe any change would be ignored. The ALPN has already been negotiated by the time you get the Listener callback. |
We still should be able to set the certificate, right @nibanks? (e.g. the handshake is not fully finished) |
Yes, the call to |
Triage: open issue in msquic to be able to narrow down the ALPN selection when connection arrives. But we need to provide the full supported list when we start the listener. msquic issue: microsoft/msquic#2418 |
To closely match the SslStream API, the second stage ALPN selection would still be a prioritized list rather than a single entry. S.N.Q or MsQuic would be responsible for the final selection. |
Triage: This is about future proofing -- once we have more than 1 ALPN for HTTP over QUIC. Currently there is only one "h3". |
Triage: msquic issue has been fixed, we should add a test for this and call it done. |
QuicListenerOptions has SslServerAuthenticationOptions property.
runtime/src/libraries/System.Net.Quic/src/System/Net/Quic/QuicListenerOptions.cs
Line 16 in 79ae74f
It looks like code that uses this property assumes that SslServerAuthenticationOptions.ServerCertificate is set.
The text was updated successfully, but these errors were encountered: