Istio 中使用 JWT 的最终用户身份验证提供 'upstream connect error'
End User Authentication with JWT in Istio gives 'upstream connect error'
我正尝试在 Istio 中使用 JWT 设置最终用户身份验证,如下所述:https://istio.io/help/ops/security/end-user-auth/
重现步骤如下:
- 在本地设置 Istio:https://github.com/nheidloff/cloud-native-starter/blob/master/LocalEnvironment.md
- 设置 HTTPS、示例服务和 Ingress:https://github.com/nheidloff/cloud-native-starter/blob/master/istio/IstioIngressHTTPS.md
- kubectl apply -f https://github.com/nheidloff/cloud-native-starter/blob/master/istio/access.yaml
我创建了一个小应用程序来为用户获取 JWT 令牌。我已通过 https://jwt.io/.
检查令牌是否有效
当我调用以下 URL 时,出现相同的错误:
curl -k https://web-api.local:31390/web-api/v1/getmultiple
curl -k https://web-api.local:31390/web-api/v1/getmultiple --header 'Authorization: Bearer eyJhbGciOiJIU.........wOeF_k'
HTTP 状态代码:503
上游连接错误或 disconnect/reset 在 headers
之前
我在 istio-proxy 日志中没有看到与这些请求相关的任何条目。我认为这意味着在请求到达代理之前就出现了问题。
kubectl logs web-api-v1-545f655f67-fhppt istio-proxy
我已经尝试过 Istio 1.0.6 和 1.1.1。
我 运行 想不出还能尝试什么。任何帮助深表感谢!谢谢!
我发现了问题。诀窍是从我的 yaml 中删除 mtls。当我阅读 Istio 文档时,听起来这是一个先决条件。
我正尝试在 Istio 中使用 JWT 设置最终用户身份验证,如下所述:https://istio.io/help/ops/security/end-user-auth/
重现步骤如下:
- 在本地设置 Istio:https://github.com/nheidloff/cloud-native-starter/blob/master/LocalEnvironment.md
- 设置 HTTPS、示例服务和 Ingress:https://github.com/nheidloff/cloud-native-starter/blob/master/istio/IstioIngressHTTPS.md
- kubectl apply -f https://github.com/nheidloff/cloud-native-starter/blob/master/istio/access.yaml
我创建了一个小应用程序来为用户获取 JWT 令牌。我已通过 https://jwt.io/.
检查令牌是否有效当我调用以下 URL 时,出现相同的错误:
curl -k https://web-api.local:31390/web-api/v1/getmultiple
curl -k https://web-api.local:31390/web-api/v1/getmultiple --header 'Authorization: Bearer eyJhbGciOiJIU.........wOeF_k'
HTTP 状态代码:503 上游连接错误或 disconnect/reset 在 headers
之前我在 istio-proxy 日志中没有看到与这些请求相关的任何条目。我认为这意味着在请求到达代理之前就出现了问题。
kubectl logs web-api-v1-545f655f67-fhppt istio-proxy
我已经尝试过 Istio 1.0.6 和 1.1.1。
我 运行 想不出还能尝试什么。任何帮助深表感谢!谢谢!
我发现了问题。诀窍是从我的 yaml 中删除 mtls。当我阅读 Istio 文档时,听起来这是一个先决条件。