Skip to content

Conversation

@puertomontt
Copy link
Contributor

@puertomontt puertomontt commented Nov 27, 2025

Description

adjust JWT API for forward token

Change from enum to bool to better fit the underlying Envoy type forward.

Note: We haven't included this API in a release, but this is technically a breaking change for anyone that has been using the main or beta builds.

Change Type

/kind cleanup

Changelog

NONE

Additional Notes

Signed-off-by: omar <omar.hammami@solo.io>
Copilot AI review requested due to automatic review settings November 27, 2025 05:23
@puertomontt puertomontt linked an issue Nov 27, 2025 that may be closed by this pull request
@gateway-bot gateway-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none labels Nov 27, 2025
Copilot finished reviewing on behalf of puertomontt November 27, 2025 05:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the JWT Provider API to simplify token forwarding configuration. It replaces the enum-based KeepToken field (with Forward and Remove values) with a simpler boolean ForwardToken field, aligning better with the underlying Envoy JWT filter's forward field.

Key Changes:

  • Changed API from enum-based KeepToken *KeepToken to boolean ForwardToken *bool
  • Updated implementation logic to check boolean value instead of enum comparison
  • Removed KeepToken type and its constants (TokenForward, TokenRemove)

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
api/v1alpha1/jwt_types.go Replaced KeepToken enum field with boolean ForwardToken field; removed KeepToken type definition and constants
api/v1alpha1/zz_generated.deepcopy.go Updated generated DeepCopy code to handle boolean pointer instead of enum pointer
internal/kgateway/extensions2/plugins/trafficpolicy/jwt.go Updated token forwarding logic to check boolean value instead of enum comparison
internal/kgateway/extensions2/plugins/trafficpolicy/jwt_test.go Updated test cases to use boolean values instead of enum constants
install/helm/kgateway-crds/templates/gateway.kgateway.dev_gatewayextensions.yaml Updated CRD schema to replace enum field with boolean field, including updated documentation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change JWT API for forwarding token upstream

2 participants