【发布时间】:2021-07-06 06:10:38
【问题描述】:
您能帮我理解 RequestAuthentication 吗?
当我应用简单的 RequestAuthentication 并重新启动 Pod 时,envoy sidecar 的就绪状态为 false,并且日志抛出 warn Envoy proxy is NOT ready: config not received from Pilot (is Pilot running?): cds updates: 1 successful, 0 rejected; lds updates: 0 successful, 1 rejected
一旦我删除 RequestAuthentication 并重新创建 pod - 工作正常
Istio 1.8.3
apiVersion: 'security.istio.io/v1beta1'
kind: RequestAuthentication
metadata:
name: jwt-validator
spec:
selector:
matchLabels:
role: api
jwtRules:
- issuer: "https://mykeycloak.com/auth/realms/myrealm"
当代理处于 LDS 陈旧状态时 以下日志显示在 istiod 中
2021-04-10T17:30:53.326877Z warn ads ADS:LDS: ACK ERROR sidecar~10.238.2.69~PODNAME.NS~NS.svc.cluster.local-60 Internal:Error adding/updating listener(s) vi ││ rtualInbound: Issuer 'MY_JWT_ISSUER_URL' in jwt_authn config has invalid local jwks: Jwks RSA [n] or [e] field is missing or has a parse error
已解决
这里的 Issuer 不仅仅是 JWT 中要匹配的字符串,而是必须从 istiod 访问的真实 URL,并且具有有效的 SSL 证书
【问题讨论】:
-
嗨@Yegor Lopatin,我看到你已经解决了这个问题。请考虑将其发布为答案并接受它,因此如果社区中的某个人遇到同样的问题,他可能会在这里找到答案。
标签: istio