-
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: disable HTTP/2 ALPN handshake for connections on routes configured with AI-proxy. #13735
Conversation
28fdb00
to
0c402b6
Compare
f86330c
to
c71fdc8
Compare
c71fdc8
to
ab71f75
Compare
9d538a0
to
9e4bf73
Compare
…ing the route configured with ai-proxy
9e4bf73
to
2340e90
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 except a minor naming comment
The current solution (based on snis on the routes entity) isn't compatible with expressions router, as the mtls-auth plugin already faces. Please see https://konghq.atlassian.net/browse/FTI-6227 for more details. I suggest considering this PR along with FTI-6227, otherwise it may be difficult to deal with in the future. |
local send_ca_dn = plugin.config.send_ca_dn | ||
local ca_ids = plugin.config.ca_certificates |
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.
This is actually related to the mtls-auth plugin, and we may need to refactor here as well.
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.
Approving to unblock the 3.9 planning.
This will be refactored later
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-13735-to-master-to-upstream upstream/master
cd .worktree/cherry-pick-13735-to-master-to-upstream
git checkout -b cherry-pick-13735-to-master-to-upstream
ancref=$(git merge-base 6d7bf6819fc4a253fe80b12b5a5f1f6ec8f342dc 30414a664f54b187e9e2e39f65d81b2cff68948c)
git cherry-pick -x $ancref..30414a664f54b187e9e2e39f65d81b2cff68948c |
offline discussion with @ms2008 @catbro666 @dndx |
Summary
This change will disable HTTP/2 ALPN handshake for connections on routes configured with AI-proxy.
The following are the specific changes
kong/tls/plugins/certificate.lua
andkong/tls/plugins/sni_filter.lua
from ee to ce repotls.disable_http2_alpn()
function needed patch for disabling HTTP/2 ALPN when tls handshake. #13709 and feat: introducetls.disable_http2_alpn()
function lua-kong-nginx-module#93, we introduce thedisable_http2_alpn
action in the ai-proxy plugin to solve theai-proxy
plugin did not work in HTTP2 case. After the current PR is merged, HTTP/2 ALPN handshakes will be disabled for requests on routes configured with AI-proxy, and all these connections will fall back to the http1.1 protocol.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
AG-119