[Announcement] HttpSys client certificate renegotiation disabled by default #23181
Labels
breaking-change
This issue / pr will introduce a breaking change, when resolved / merged.
Milestone
HttpSys client certificate renegotiation disabled by default
The option to renegotiate a connection and request a client certificate has been disabled by default.
Version introduced
5.0
Old behavior
The connection could be renegotiated to request a client certificate.
New behavior
Client certificates can only be requested during the initial connection handshake. See #23162.
Reason for change
Renegotiation caused a number of performance and deadlock issues. It's also not supported in HTTP/2. See #14806 for when the option to control this behavior was first introduced in 3.1.
Recommended action
Applications that require client certificates should use
netsh.exe
to set theclientcertnegotiation
option toenabled
. See https://docs.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh-httpIf you only want client certificates enabled for some parts of your application then see the guidance at https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth?view=aspnetcore-3.1#optional-client-certificates.
If you need the old renegotiate behavior then set
HttpSysOptions.ClientCertificateMethod
to the old valueClientCertificateMethod.AllowRenegotiate
. This is not recommended for the reasons outlined above and in the linked guidance.Category
ASP.NET
Affected APIs
HttpSysOptions.ClientCertificateMethod
HttpContext.Connection.ClientCertificate
HttpContext.Connection.GetClientCertifiateAsync
Issue metadata
The text was updated successfully, but these errors were encountered: