Azure Service Fabric Explorer returns 总是 403

Azure Service Fabric Explorer returns always 403

我刚刚将带有 LoadBalancer 的安全 Service Fabric 集群 (EncryptAndSign) 部署到 Azure 订阅。部署需要一些时间,但它按预期工作。我也可以通过 PowerShell 连接到集群:

$connectionEndpoint = ("{0}.{1}.cloudapp.azure.com:19000" -f 
   "mycluster", "somewhere")

Connect-serviceFabricCluster -ConnectionEndpoint $connectionEndpoint `
  -KeepAliveIntervalInSec 10 `
  -X509Credential `
  -ServerCertThumbprint "..." `
  -FindType FindByThumbprint `
  -FindValue $clusterCertificate.Thumbprint  `
  -StoreLocation CurrentUser -StoreName My

我也可以使用VisualStudio通过端口19000部署一个应用程序到Cluster。在 Azure 门户中,一切看起来都很好,没有警告,也没有错误。

不幸的是,我无法通过端口 19080 连接到资源管理器。当我尝试通过 LoadBalancer 连接时,我收到连接超时。因此与集群中的一个节点建立了 RDP 连接,并尝试通过

在本地访问资源管理器
localhost:19080/Explorer

但是我在这里收到一个 Http-Error 403(禁止),这可能是通过 Load-Balancer 连接超时的原因(因为探测器总是收到 403)。根据 Azure Documentation

"If you attempt to connect to Service Fabric Explorer on a secure cluster, your browser will ask you to present a certificate in order to gain access."

嗯,我没有被提示出示任何证书。我错过了什么?有什么特别需要配置的吗?提前致谢。

好吧,这不是那么棘手 - 但你必须知道它,我还没有在任何地方读过它。只要您不配置任何 Andmin 客户端证书,您对 Explorer (:19080/Explorer) 的所有请求都会以 403 结束,如上所述。

您可以在门户中添加管理员客户端证书的指纹:

它应该(未经测试)也适用于您的 ARM 模板中的以下设置:

{
  "type": "Microsoft.ServiceFabric/clusters",
  ...
  "properties": {
    ...
    "ClientCertificateThumbprints": [
      {
        "CertificateThumbprint": "THUMBPRINT_HERE",
        "IsAdmin": true
      }
    ],
  ...
  }
}

如您所见,应该可以(也未测试)在此数组中指定多个证书。

确保生成并使用 SHA1 指纹哈希。可以通过 Azure 门户输入 SHA256 指纹,但会导致 HTTP 403 响应而没有关于问题所在的警告。