为SSL配置SSRS

11

我有一个运行SSRS 2014的SSRS实例,并且我想将其配置为使用SSL。

该服务器可通过http://reports.mydomain2.com访问。

我从GoDaddy购买了一个多域SSL证书,域名为www.mydomain.com,并将reports.mydomain2.com添加为SAN。

我按照IIS的方式从GoDaddy生成了SSL证书,将证书导入了中间认证机构和Personal/Certificates中。 enter image description here enter image description here

然后我启动了SSRS配置管理器,并尝试设置SSL。我看到了证书,但是当我选择它并单击应用时,会出现无法绑定SSL证书的错误。

enter image description here

显示的错误如下:

Microsoft.ReportingServices.WmiProvider.WMIProviderException: An unknown error has occurred in the WMI Provider. Error Code 80070520

 ---> System.Runtime.InteropServices.COMException (0x80070520): A specified logon session does not exist. It may already have been terminated. (Exception from HRESULT: 0x80070520)
   --- End of inner exception stack trace ---
   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.ThrowOnError(ManagementBaseObject mo)
   at Microsoft.ReportingServices.WmiProvider.RSWmiAdmin.CreateSSLCertificateBinding(String application, String certificateHash, String ipAddress, Int32 port)
   at ReportServicesConfigUI.WMIProvider.RSReportServerAdmin.CreateSSLCertificateBinding(UrlApplication app, String certificateHash, String ipAddress, Int32 port)

我使用命令检查了绑定

netsh http show urlacl

我发现了一个关于端口443的条目

Reserved URL            : https://+:443/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/
    User: NT SERVICE\SstpSvc
        Listen: Yes
        Delegate: Yes
    User: BUILTIN\Administrators
        Listen: No
        Delegate: No
    User: NT AUTHORITY\SYSTEM
        Listen: Yes
        Delegate: Yes
        SDDL: D:(A;;GA;;;S-1-5-80-3435701886-799518250-3791383489-3228296122-2938884314)(A;;GR;;;BA)(A;;GA;;;SY) 

我不知道这是否有任何影响(如果端口443已经绑定,阻止它绑定到SSRS URL或不),但另一个可能的问题是SSRS配置管理器不允许我更改SSL绑定的url为reports.mydomain2.com,而是尝试绑定到证书的默认域。

您有什么想法可能出了什么问题,我该如何解决?

2个回答

19
我想出了解决方案,希望能帮助其他人。
从GoDaddy下载的证书不包含私钥。这是创建证书绑定错误的原因。为解决此问题,我必须在生成初始CSR的计算机上导出私钥证书(我选择同时导出所有扩展属性,以防万一)。
我的步骤如下:
  1. 在生成证书签名请求的机器上,我导入了从证书颁发机构收到的证书。
  2. 在同一台机器上,我将包含私钥和扩展属性的证书导出为 .pfx 格式。
  3. 在 SSRS 服务器上,我导入了导出的证书。
  4. 启动 SSRS 配置管理器,在“Web 服务 URL”部分中,选择新导入的证书,然后单击 应用
  5. 如果证书是按照 SSRS 服务器的 DNS 完全匹配的 URL 生成的,则可以完成。
  6. 如果证书的 URL 不符合 SSRS DNS 名称(但报告服务器的 URL 上有一个 SAN),则你会看到 SSRS 配置管理器中选择的 SSL 证书被设置为未知,SSL URL 也被设置为未知。 SSRS showing unknown for certificate and SSL url
  7. 打开 SSRS 配置文件 RsReportServer.config,并编辑“UrlReservations”条目,以设置所需的 SSL URL。
<URLReservations>
  <Application>
      <Name>ReportServerWebService</Name>
      <VirtualDirectory>ReportServer</VirtualDirectory>
      <URLs>
          <URL>
              <UrlString>https://reports.mydomain2.org:443</UrlString>
              <AccountSid>....</AccountSid>
              <AccountName>NT Service\ReportServer</AccountName>
          </URL>
          <URL>
              <UrlString>http://+:80</UrlString>
              <AccountSid>....</AccountSid>
              <AccountName>NT Service\ReportServer</AccountName>
          </URL>
      </URLs>
  </Application>
  <Application>
      <Name>ReportManager</Name>
      <VirtualDirectory>Reports</VirtualDirectory>
      <URLs>
          <URL>
              <UrlString>http://+:80</UrlString>
              <AccountSid>....</AccountSid>
              <AccountName>NT Service\ReportServer</AccountName>
          </URL>
          <URL>
              <UrlString>https://reports.mydomain2.org:443</UrlString>
              <AccountSid>....</AccountSid>
              <AccountName>NT Service\ReportServer</AccountName>
          </URL>
      </URLs>
  </Application>
</URLReservations>

您必须添加或编辑https的条目(您会在端口80上找到http的条目,您不应更改),并且对于ssl上的新条目,请使用端口80上的条目中的AccountSid

  1. Run the command below to find all bounded URLs. You must find urls for reporting server, and write down SDDL, which will be needed when creating the SSL URLs for reporting server.

    netsh http show urlacl
    
  2. Remove the bounded URLs created by SSRS Config Manager, which points to wrong url (the main url the certificate was created for)

    netsh http delete urlacl url=https://www.mydomain1.org:443/ReportServer
    netsh http delete urlacl url=https://www.mydomain1.org:443/Reports
    
  3. Run the commands below to add the proper URLs for report server. We need to use the SSDL found in entroes for report server bound to port 80 (see point 8 above)

    netsh http add urlacl url=https://reports.mydomain2.org:443/ReportServer user="NT Service\ReportServer" listen=yes sddl=<....>
    netsh http add urlacl url=https://reports.mydomain2.org:443/Reports user="NT Service\ReportServer" listen=yes sddl=<....>
    

8

错误:指定的IP地址和端口组合已存在SSL绑定。

遇到上述错误了吗?下面是一个简单的解决方法。

  • 我们需要删除现有的绑定,为此,我们需要知道实际上是哪个证书在绑定它;

  • 在cmd(命令提示符)中使用以下命令:netsh http show sslcert

  • 使用以下命令删除绑定:netsh http delete sslcert ipport=0.0.0.0:443

完成后,请重新将URLSSL证书进行绑定,这次应该可以成功。测试一下URL,应该可以正常工作。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接