-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(jwt): deny requests that have different tokens in the jwt token search locations. #9946
Conversation
09184cb
to
bcc9528
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.
The general approach of this PR is fine. However, I see no good reason of returning a Lua table from retrieve_tokens
just for duplicate detection. Maybe the retrieve_tokens
function can simply return nil, "Multiple tokens provided"
in case more than one unique token is present in the same request. This way we avoid two table allocations and use of pairs
which could be expensive.
I've thought about this approach(And yes, this is a better way for performance). If |
Co-authored-by: Datong Sun <[email protected]>
f3e91d4
to
e937f39
Compare
|
||
#### Plugins | ||
|
||
- **JWT**: JWT plugin now denies a request that has different tokens in the jwt token search locations. |
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.
- **JWT**: JWT plugin now denies a request that has different tokens in the jwt token search locations. | |
- **JWT**: JWT plugin now denies a request that has different JWTs in the HTTP request header and Query parameter. |
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.
There are three search locations, which are querystring(query parameter), header, and cookie.
…ective_header` is readonly (#9946) Panic on writing the EMPTY table * Fix #13458 * https://konghq.atlassian.net/browse/KAG-5139? (cherry-picked from commit #13491) Co-authored-by: Qi <[email protected]>
Summary
Deny requests that have different tokens in the jwt token search locations.
Checklist
Issue reference
FTI-4580