【问题标题】:IdentityServer 4 and TLS 1.2身份服务器 4 和 TLS 1.2
【发布时间】:2018-07-17 16:00:58
【问题描述】:

我已禁用 TLS 1.0 和 TLS 1.1。在 Identity Server 中(使用 WebHostBuilder 在 Service Fabric 集群中运行的 v4,使用自签名证书面向 .NET 4.6.2)。我在 Startup.cs 中添加了以下内容:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

我收到以下错误:

System.InvalidOperationException: IDX10803: Unable to create to obtain 
configuration from: 'https://services.mytest.com:8443/oauth/.well- 
known/openid-configuration'. ---> System.IO.IOException: Unable to get 
document from: https://services.mytest.com:8443/oauth/.well- 
known/openid-configuration ---> System.Net.Http.HttpRequestException: An 
error occurred while sending the request. ---> System.Net.WebException: The 
underlying connection was closed: An unexpected error occurred on a receive. 
---> System.ComponentModel.Win32Exception: The client and server cannot 
communicate, because they do not possess a common algorithm

我已经查看了这里的问题:

IDX10803: Unable to create to obtain configuration

Unable to obtain configuration from well-known/openid-configuration

我已经尝试了这些建议(包括将证书添加到受信任的根目录)

【问题讨论】:

  • 除了将证书添加到受信任的根目录外,运行应用程序池(托管 IDS)的用户应该被授予对证书的读取权限。你也这样做了吗?
  • 应用程序池在 LocalSystem 下运行,我已经在 Local Machine 下添加了证书。
  • 记得 localsystem 或 apppoolidentity 有同样的问题,所以我最终为这个应用程序池创建了一个帐户,在这个帐户下运行它,仍然将证书添加到受信任的根目录,并至少提供该帐户读取证书的权利。在这里查看github.com/IdentityServer/IdentityServer3.Samples/tree/master/…。 ids4的步骤是一样的,当然也可以导入自己的cert。
  • 我更改了帐户并在个人下添加了证书 (pfx),在受信任的人下添加了证书 (cer)(如链接中所示)。我仍然遇到同样的错误
  • 您为用户添加了证书权限?

标签: asp.net ssl identityserver4 tls1.2


【解决方案1】:

我不太了解该特定软件,但这里的问题不是证书不受信任(根据错误消息),而是您的服务器和客户端尝试在 TLS 握手期间协商哪个协议版本,加密应使用密码和密钥交换机制。看起来客户端和服务器现在变得不兼容了。更改客户端或服务器。

另请参阅相关帖子和可能的解决方案:

The client and server cannot communicate, because they do not possess a common algorithm

【讨论】:

  • 客户端和服务器是同一台机器的问题浮出水面,因此它们在 windows 注册表中具有相同的 TLS 配置。
猜你喜欢
  • 2020-11-17
  • 2017-07-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-14
  • 2021-06-23
  • 2017-08-25
  • 1970-01-01
相关资源
最近更新 更多