【问题标题】:Service Fabric Cluster nodes can't get private key from certificateService Fabric 群集节点无法从证书中获取私钥
【发布时间】:2017-01-15 15:40:55
【问题描述】:

我有一个运行单个应用程序的 5 节点服务结构集群。我使用自签名证书加密了我的应用程序设置。此证书已上传到 keyvault,并且我已将此 URL 输入到我的应用程序中。我可以看到证书正在安装在我的 VM 上,并且运行 Invoke-ServiceFabricDecryptText 也会返回正确的解密值。但是,在查看我的管理控制台时,我看到了这个错误:

Error event: SourceId='System.Hosting', Property='Activation:1.0'.
There was an error during activation.Failed to ACL folders or certificates required by application. Error:0x80090014

查看节点日志,我看到这些条目与上述错误相对应:

2016-9-7 20:09:44.541,Informational,2148,2580,Common.CryptoUtility,GetCertificate(LocalMachine, MY, FindByThumbprint:)
2016-9-7 20:09:44.541,Informational,2148,2580,Common.CryptoUtility,GetCertificate: match found: thumbprint = [thumbprint], expiration = 2017-09-02 16:08:04.000
2016-9-7 20:09:44.541,Error,2148,2580,Common.CryptoUtility,CryptAcquireCertificatePrivateKey failed. Error:0x80090014
2016-9-7 20:09:44.541,Error,2148,2580,Common.SecurityUtility,Failed to get the Certificate's private key. [thumbprint]. Error: 0x80090014
2016-9-7 20:09:44.541,Warning,2148,2580,Hosting.ProcessActivationManager,ACLing private key filename for thumbprint [thumbprint]. ErrorCode=0x80090014

我很茫然。

【问题讨论】:

    标签: azure ssl azure-service-fabric


    【解决方案1】:

    最终成为一个糟糕的证书。我最初上传到 Keyvault 的证书是在 posh 中使用 New-SelfSignedCertificate 的现有证书。然后,我使用带有 -CreateSelfSignedCertificate 开关的 Invoke-AddCertToKeyVault 命令即时向 Key Vault 添加了第二个,并且它起作用了。

    【讨论】:

      【解决方案2】:

      这通常意味着当前未创建集群证书。因为它的私钥是不可检索的。

      如果您使用 ServiceFabricRPHelpers.psm1(使用 -CreateSelfSignedCertificate 调用-AddCertToKeyVault)来创建自签名证书 - 您应该知道它会创建此类无效证书,除非安装了 PSPKI 版本 3.2.5。即使您使用 PSPKI 版本 3.2.6(或未安装 PSPKI),由于 ServiceFabricRPHelpers.psm1 中的错误,它也会创建无效证书。 我在这里解决了问题(但尚未合并) https://github.com/ChackDan/Service-Fabric/pull/31

      作为一种解决方法, 1.从https://pspki.codeplex.com/releases/view/625365安装最新的PSPKI 2. 在运行 Invoke-AddCertToKeyVault 之前,将此处的修复 https://github.com/ChackDan/Service-Fabric/pull/31 应用到 ServiceFabricRPHelpers.psm1

      一旦修复被合并,我将更新这个线程......

      【讨论】:

        猜你喜欢
        • 2019-06-16
        • 2016-10-10
        • 2022-10-18
        • 1970-01-01
        • 2016-09-04
        • 1970-01-01
        • 2023-03-02
        • 2017-04-06
        • 2016-09-28
        相关资源
        最近更新 更多