gpt4 book ai didi

ssl - 让我们在 GKE 上使用 HApRoxy 进行加密

转载 作者:太空宇宙 更新时间:2023-11-03 15:09:58 24 4
gpt4 key购买 nike

我正在关注一些文章以在我的应用程序上实现 SSL。但是无法理解如何生成证书或者我是否需要生成证书?

最主要的是,在概念上,我无法将这些东西放在一起。

让我解释一下情况。

我正在使用 HAProcxy 入口 Controller 和 HTTP(S) L7 负载均衡器在 GKE 集群中运行应用程序“用户注册”(基于 REST API)。我有一个现有域(例如 mydomain.com),我在其中托管我的网站。托管平台提供了用于保护通配符域 (*.mydomain.com) 的 SSL 证书,我的网站以 http(冒号)(斜线斜线)mydomain.com 打开。我创建了一个子域 apps.mydomain.com 并将“A”记录指向 GCP HTTP(S) 负载均衡器 IP,以便我可以通过 Internet 访问该应用程序。我可以通过 Internet 上的端口 80 访问我的应用程序。但它不适用于 Post 443(使用 https)。

在文章中,我需要使用 ACME 生成证书和 key ,同样需要在 Cluster Issuer 和 Ingress 中使用。

引用#digitalocean.com/community/tutorials/how-to-set-up-an-nginx-ingress-with-cert-manager-on-digitalocean-kubernetes

我是否需要向我的域/托管服务提供商索取证书和 key ?或者我可以使用 ACME 使用主机名生成另一个证书:apps.mydomain.com?

我什至从我的主机提供的网站下载了证书和 key (有一个选项 - 用户你拥有服务器)并仅在 Ingress 中使用它们(使用证书和 ley 作为 secret )。但是我的网站变成了一个不安全的模式,当 curl API 时 https://apps.mydomain.com/CreteUser出现错误:

TCP_NODELAY 设置

  • schannel:未能接收到握手,需要更多数据
  • schannel:与 apps.mydomain.com 端口 443 的 SSL/TLS 连接(步骤 2/3)
  • schannel:加密数据得到1845
  • schannel:加密数据缓冲区:偏移1845,长度4096
  • schannel:SNI 或证书检查失败:SEC_E_WRONG_PRINCIPAL (0x80090322) - 目标主体名称不正确。
  • 关闭连接 0
  • schannel:关闭与 demo.apps.product.barnsleypujo.co.uk 端口 443 的 SSL/TLS 连接
  • schannel:清除安全上下文句柄curl: (35) schannel: SNI 或证书检查失败:SEC_E_WRONG_PRINCIPAL (0x80090322) - 目标主体名称不正确。

你能帮帮我吗?

谢谢,随缘

最佳答案

证书主题中的星号 (*.example.com) 表示您可以将名称的第一个域名部分替换为您想要的任何内容,例如apps.example.com , mail.example.com

RFC2818状态:

If more than one identity of a given type is present in the certificate (e.g., more than one dNSName name, a match in any one of the set is considered acceptable.) Names may contain the wildcard character * which is considered to match any single domain name component or component fragment. E.g., .a.com matches foo.a.com but not bar.foo.a.com. f.com matches foo.com but not bar.com.

在您的错误消息中,您的名字是 demo.apps.product.example.com什么与通配符证书不匹配,因此给出错误 SEC_E_WRONG_PRINCIPAL .

要解决此问题,请替换点,例如demo-apps-product.example.com或者没有点的完全不同的东西。

关于ssl - 让我们在 GKE 上使用 HApRoxy 进行加密,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59069875/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com