Repository navigation
Description
Description:
When i create a new pod , with its route and associated security policy with jwt authentication on and try to connect instantly, it sometimes gives this error, but after sometime, on trying to connect again, it works
'Failed JWT authentication: Wrong requirement_name: httproute/ns1/efghi/rule/0/match/0/test_domain_com. It should be one of [httproute/abcd/dd/rule/0/match/0/test_domain_com,httproute/abcd/nw-test/rule/0/match/0/test_domain_com,httproute/grafana/grafana-route/rule/0/match/0/test_domain_com,httproute/proj1-container-image-builder/proj1-cib-route/rule/0/match/0/test_domain_com,httproute/proj1/proj1-route/rule/0/match/0/test_domain_com,httproute/ns1/abcde/rule/0/match/0/test_domain_com,httproute/ns1/another-xyzd/rule/0/match/0/test_domain_com]
Repro steps:
Here is the securitypolicy and httproute config i am using,
kind: SecurityPolicy
metadata:
labels:
app.kubernetes.io/name: efghi
name: efghi
spec:
authorization:
defaultAction: Deny
rules:
- action: Allow
name: allow
principal:
jwt:
claims:
- name: email
valueType: String
values:
- [email protected]
provider: jwt_provider
jwt:
providers:
- audiences:
- djsadkasjdnkasndlkasndjb
extractFrom:
cookies:
- token
issuer: https://jwt-provider.provider.com
name: jwt_provider
remoteJWKS:
uri: https://jwt-provider.provider.com/.well-known/jwks.json
targetRefs:
- group: gateway.networking.k8s.io
kind: HTTPRoute
name: efghi
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
generation: 1
labels:
app.kubernetes.io/name: efghi
name: efghi
spec:
hostnames:
- test.domain.com
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: eg-gateway
namespace: eg
rules:
- backendRefs:
- group: ""
kind: Service
name: efghi
port: 3333
weight: 1
matches:
- path:
type: PathPrefix
value: /pathsvc```
*Environment*:
> I used helm to install envoy gateway in eks, and used this chart gateway-helm-v1.5.5
Activity
arkodg commentedon Feb 22, 2026
cc @zhaohuabing
github-actions commentedon Mar 24, 2026
This issue has been automatically marked as stale because it has not had activity in the last 30 days.
tname9962 commentedon Apr 1, 2026
Is their any update on this ?
rudrakhp commentedon Apr 6, 2026
Based on the current XDS mechanism, this issue is because envoy receives LDS and RDS updates independently, so it can sometimes see the JWT filter but not the corresponding route updates yet. Here is an explanation of this race using an example:
I don't think there is anything to solve for here since EG takes time to converge and guarantees eventual consistency only. @tname9962 how long does it take after this error shows up first before requests start succeeding again, in case there is room for improving convergence time here.
tname9962 commentedon Apr 6, 2026
It varies greatly, sometimes working working perfectly in under 2-3 seconds to sometimes having to wait for 30-40 seconds.
If i can get a max limit for convergence time that should be helpful.
Also does this time scale based on the number of routes and security policies ?
rudrakhp commentedon Apr 6, 2026
There is no upper bound for this convergence time as it scales with the number of routes and listeners. You could reduce probability of these specific errors by updating/creating the routes first, wait for them to be accessible, and then the JWT policies referring them to avoid this race condition.
rudrakhp commentedon Apr 30, 2026
Closing this as there is no immediate/planned action to be taken for this.