-
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
feat(router/atc): extend route.snis
to support wildcard for the leftmost or rightmost character with traditional-compatible flavor
#12809
Conversation
721f49d
to
18c2eec
Compare
Should we schedule a short offline meeting to discuss this PR? I am not very clear about the requirement. Another thing, we are planing a big refactoring of router (#12667), perhaps you should take a look at it. |
Convert to draft because we still have some discussions. |
We should also add compatible check code for hybrid mode, See #12814 |
route.snis
to support wildcardroute.snis
to support wildcard for the leftmost or rightmost character
|
No, atc-router in kong gateway lower than 3.7 does not understand wildcard sni, it only support |
Ah right. |
73db9bb
to
7e37da3
Compare
4003d47
to
40646a5
Compare
d61742b
to
3459423
Compare
372741c
to
6e96aac
Compare
6e96aac
to
dc84b12
Compare
Should we add back the change log file to tell the user that we have this new feature? |
route.snis
to support wildcard for the leftmost or rightmost character with traditional-compatible flavorroute.snis
to support wildcard for the leftmost or rightmost character with traditional-compatible flavor
0873d08
to
51bccf1
Compare
Confirmed with @dndx that this would be a hidden feature so we don't document it. |
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.
Great job!
@chronolaw Thanks for the efforts in the review! |
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.
I have nothing further to add, thanks to the thorough reviews by my peers before me.
@dndx Can you please review this again? |
Cherry-pick failed for Please cherry-pick the changes locally. git remote add upstream https://github.com/kong/kong-ee
git fetch upstream master
git worktree add -d .worktree/cherry-pick-12809-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-12809-to-master-to-upstream
git checkout -b cherry-pick-12809-to-master-to-upstream
ancref=$(git merge-base 00d1c3ff8afddb1b9c2600701d00c7655ef9f828 96e5d056cfe371b927473fff73308407e61bdc01)
git cherry-pick -x $ancref..96e5d056cfe371b927473fff73308407e61bdc01 |
@dndx damn it, I pushed rebase and merge instead of squash and merge. @catbro666 let's stop having PRs on review stage with unclean commits. See: https://github.com/Kong/kong/commits/master/ |
Summary
route.snis
from sni to wildcard_host.Note this is to be a hidden feature intentionally so we don't document it.
Additional Notes:
route.snis
, but at the ssl phase it is not yet known which route will match. As a workaround, it collects the sni set on routes that are associated with mtls plugins in advance. But for the expressions flavor, things are different. All the fields that were involved in route matching have been merged into the fieldexpression
. Without actually evaluating, we can't know in general if a sni will match a certain route. But again, you can't get all the parameters required for evaluation at the ssl phase. The correct solution is decoupling the mTLS logic from theroutes
entity by binding it to thesnis
entity, as we’ve discussed in https://konghq.atlassian.net/browse/KAG-3757Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
https://konghq.atlassian.net/browse/KAG-3832