Den*_*rov 5 ssl acl azure-service-fabric
我有一个独立的 ServiceFabric 集群(3 个节点)。我为服务器和客户端授权创建了 SSL 证书。然后我将证书指纹分配给集群配置。一切正常(集群运行状况正常,我的应用程序也正常运行。但是 Microsoft-ServiceFabric/Admin 日志中有很多错误。以下警告和错误每分钟都会写入日志:
我为 NETWORK SERVICE 和 SYSTEM 分配了对私钥存储的写入许可。我还为 PK 存储分配了 gMSA 帐户。但错误仍然出现在日志中。另一方面,一切看起来都很好,集群启动并运行......这是我的集群配置(安全部分):
"security":{
"ServerCredentialType":"X509", "ClusterCredentialType":"Windows", "WindowsIdentities":{
"ClustergMSAIdentity":"gMSAccountName@domain.com", "ClusterSPN":"http/servicefabric" }, " CertificateInformation":{
"ServerCertificate": { "Thumbprint": "{Cert Thumbprint}", "X509StoreName": "My" }, "ClientCertificateThumbprints":[
{
"CertificateThumbprint":"{Cert Thumbprint}", "IsAdmin": true } ], "X509StoreName": "我的” } },
对于 x509 证书创建,我使用 OpenSSL 1.0.2k-fips 2017 年 1 月 26 日。我按照本文中的步骤操作:https ://gist.github.com/harishanchu/e82d759c0235379d1778f799992b5774 谁能澄清这个问题?
文件MachineKeys夹中似乎没有私钥文件。要验证文件夹中是否有物理文件,请运行以下 powershell 命令:
$certThumb = "1D6523F622E33DF46382D081BCA9AE9A2D8D78CC"
Try
{
$WorkingCert = Get-ChildItem CERT:\LocalMachine\My |where {$_.Thumbprint -match $certThumb} | sort $_.NotAfter -Descending | select -first 1 -erroraction STOP
$TPrint = $WorkingCert.Thumbprint
$rsaFile = $WorkingCert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
}
Catch
{
"Error: unable to locate certificate for $($CertCN)"
Exit
}
if ($WorkingCert.PrivateKey) {
$WorkingCert.PrivateKey
}
else
{
"No private key found"
}
Run Code Online (Sandbox Code Playgroud)
如果您收到No private key found消息,则表示MachineKeys文件夹中没有私钥。即使证书属性可以以其他方式声明(有一个钥匙图标和消息You have a private key that corresponds to this certificate)。虽然我不知道为什么,但对于某些证书,上述情况会发生。
作为解决方法,请执行以下步骤:
Network Service用户设置访问权限。如果您按照上述步骤操作,私钥将被添加到MachineKeys文件夹中,错误将消失。显然,您必须对每个集群节点重复这些步骤。
| 归档时间: |
|
| 查看次数: |
2108 次 |
| 最近记录: |