-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: JWT extractFrom headers and params #2434
feat: JWT extractFrom headers and params #2434
Conversation
7843a58
to
185cfc2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2434 +/- ##
==========================================
+ Coverage 64.74% 64.78% +0.03%
==========================================
Files 115 115
Lines 17415 17429 +14
==========================================
+ Hits 11275 11291 +16
+ Misses 5427 5424 -3
- Partials 713 714 +1 ☔ View full report in Codecov by Sentry. |
api/v1alpha1/jwt_types.go
Outdated
// | ||
// +optional | ||
Headers []JWTHeaderExtractor `json:"headers,omitempty"` | ||
|
||
// Cookies represents a list of cookie names to extract the JWT token from. | ||
// If specified, Envoy will extract the JWT token from the listed cookies and validate each of them. | ||
// If any cookie is found to be an invalid JWT, a 401 error will be returned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we move this invalid JWT string to top level JWTExtractor
, since its valid for all fields now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's right, will move it to the top
185cfc2
to
586038d
Compare
/retest |
it seems the job encountered an error that appears unrelated to the changes. Could you help here @arkodg?
|
/retest |
seems like a flaky test |
Signed-off-by: Ardika Bagus <[email protected]>
Signed-off-by: Ardika Bagus <[email protected]>
586038d
to
68f23ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
/retest |
* feat: JWT extractFrom headers and params Signed-off-by: Ardika Bagus <[email protected]> * chore: update comment to the top Signed-off-by: Ardika Bagus <[email protected]> --------- Signed-off-by: Ardika Bagus <[email protected]> Co-authored-by: zirain <[email protected]> Signed-off-by: A3bz <[email protected]>
What type of PR is this?
Add other fields on
extractFrom
to support JWT extraction from custom headers or params.What this PR does / why we need it:
Which issue(s) this PR fixes:
Closes #2429