Skip to content

Enable HTTP/2 client cert authentication in WinHttpHandler - #33158

Merged
alnikola merged 26 commits into
dotnet:masterfrom
alnikola:alnikola/winhttphandler-http2-tls-client-cert
Mar 19, 2020
Merged

Enable HTTP/2 client cert authentication in WinHttpHandler#33158
alnikola merged 26 commits into
dotnet:masterfrom
alnikola:alnikola/winhttphandler-http2-tls-client-cert

Conversation

@alnikola

@alnikola alnikola commented Mar 4, 2020

Copy link
Copy Markdown
Contributor

Pre-release WinHTTP's version supports client cert authentication over HTTP/2, but the feature must be explicitly opted-in. PR sets WINHTTP_OPTION_ENABLE_HTTP2_PLUS_CLIENT_CERT to TRUE before invoking WinHttpConnect if the request's protocol is HTTP/2 and scheme is HTTPS.

@alnikola
alnikola requested a review from a team March 4, 2020 14:36
@davidsh davidsh added this to the 5.0 milestone Mar 4, 2020
@alnikola

alnikola commented Mar 4, 2020

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alnikola

alnikola commented Mar 4, 2020

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@davidsh davidsh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM.

But as we discussed offline, we need to have some kind of test coverage to run these tests with WinHttpHandler against .NET Framework. You can either make that part of this PR or a separate PR.

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp list

@ulisesh

ulisesh commented Mar 14, 2020

Copy link
Copy Markdown
Contributor

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 33158 in repo dotnet/runtime

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@scalablecory scalablecory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments

Comment thread src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cookies.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/ByteAtATimeContent.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/Http2LoopbackConnection.cs Outdated
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/libraries/Common/tests/System/Net/Http/Http2Frames.cs Outdated

sslStream.AuthenticateAsServerAsync(options, CancellationToken.None).Wait();
#else
sslStream.AuthenticateAsServerAsync(cert, httpOptions.ClientCertificateRequired, httpOptions.SslProtocols, checkCertificateRevocation: false).Wait();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does WinHTTP ignore ALPN?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems - yes.

Comment thread src/libraries/Common/tests/System/Net/Http/Http2LoopbackServer.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Cancellation.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpClientHandlerTest.Decompression.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpRetryProtocolTests.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/HttpProtocolTests.cs Outdated
Comment thread src/libraries/Common/tests/System/Net/Http/QPackTestDecoder.cs Outdated
@alnikola

Copy link
Copy Markdown
Contributor Author

/azp run runtime-libraries outerloop

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants