Add require_expiration field to JWTRule#3728
Conversation
Expose Envoy's jwt_authn require_expiration option in RequestAuthentication's JWTRule, allowing operators to reject JWTs that lack an exp claim without resorting to EnvoyFilter. Part of istio/istio#59200 Signed-off-by: Ted Li <ted@vip.qq.com>
|
😊 Welcome @laiwaikin! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
|
|
|
Hi @laiwaikin. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What this PR does
Adds a new
requireExpirationboolean field toRequestAuthentication'sJWTRule(underspec.jwtRules).When set to
true, a JWT that does not carry an expiration (exp) claim is rejected. This enforces that every accepted token is short-lived and will eventually expire — a recommended posture for zero-trust deployments that rely on token expiration rather than revocation (e.g. SPIFFE JWT-SVID expiration restrictions).This simply surfaces Envoy's existing
jwt_authnrequire_expirationoption through the Istio API. Today operators can only enable it via a brittle, low-levelEnvoyFilter; this makes it a first-class, declarative field. The default value isfalse, which preserves the current behavior (a JWT without anexpclaim is accepted and treated as non-expiring), so the change is fully backward compatible.Notes
request_authentication.protois hand-edited; the.pb.go,.pb.html, andcustomresourcedefinitions.gen.yamlchanges are generated viamake gen.JwtProvider.require_expiration) plus tests will follow in istio/istio once this lands. Happy to bring it to the security working group if needed.Part of istio/istio#59200