我可以选择支持客户端证书。这就是我设置 Client certificates
的原因至 Accept
在 IIS 上。这适用于大多数机器。但是,在某些机器上 IIS 返回 500。这可以通过设置 Client certificates
来“解决”。至 Ignore
(这不是我的选择)或通过设置 Negotiate Client Certificate
至 Enabled
(这可以通过 netsh http add ...
或在 DefaultFlags
中将 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters\SslBindingInfo\0.0.0.0:443\
更改为 2 来完成;这也可以在 IIS 管理器中更改吗?)。虽然(启用)此设置仅从名称来看听起来很合理,但我不明白为什么某些机器需要它而其他机器不需要...
最佳答案
长话短说
如果您需要客户端证书来访问服务器上的任何资源,您可以一直启用它。主要原因是某些客户端由于可能的中间人 (MITM) 攻击而不允许 TLS 重新协商。
如果您的客户端支持 TLS 重新协商并且 MITM 风险可以接受,您可以禁用此功能。
描述
IIS 有两种协商 TLS 的方法:
- 客户端在初始请求中发送客户端证书的位置。当服务器上的所有资源都需要 TLS 客户端身份验证时,这很有用。
- 客户端在初始请求中未发送客户端,但后来在 IIS 执行 TLS 重新协商后。当只有某些资源需要 TLS 客户端身份验证时,这很有用。
Negotiate Client Certificate
设置决定使用哪个,如果启用第一个,如果禁用则第二个。以下是来自 Microsoft 博客的更多内容:
- If this setting is enabled, the client certificate will be sent by the client browser when the initial secure connection with the web-server is negotiated.
- If it is disabled, an initial secure connection will be negotiated between the web-server and the browser based on the server certificate, and then the connection will be re-negotiated when the client sends the client certificate.
客户支持和错误
问题是某些客户端不会重新协商 TLS session 。如果客户端不这样做,您可能会在服务器日志中遇到以下错误。将 Negotiate Client Certificate
设置为 Enabled
可以解决此问题。
生成了以下致命警报:20。内部错误状态为 960。
TLS 重新协商 MITM 攻击
一些客户端不重新协商 TLS 连接的原因是由于与 TLS 重新协商相关的中间人 (MITM) 攻击:
Since the discovery of the MITM attack arround SSL Renegotiation, the answer in alot of circles has been to hangup on renegotitation requests.
- > Make IIS require SSL client certificate during initial handshake
- > http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.156.4428&rep=rep1&type=pdf
- > https://security.stackexchange.com/questions/63867/ssl-tls-renegotiation-handshakes-mitm-plaintext-data-injection-medium-or-low
需要 Negotiate Client Certificate
的客户端可能会这样做以防止 TLS 重新协商期间的 MITM 攻击。
总结
如果您对所有 IIS 资源都要求客户端证书没有问题,启用此功能可能允许您与更多客户端进行互操作,并使您能够进一步保护您的流量。
在了解 MITM 风险的同时禁用它以支持不同的 TLS 客户端身份验证支持。
关于ssl - 什么时候需要将 "Negotiate Client Certificate"设置为已启用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49024391/