Skip to content
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

[Backport release/3.4.x] fix(runloop): upstream ssl failure when plugins use response handler #11600

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

team-gateway-bot
Copy link
Collaborator

Backport 54468c4 from #11502.

@github-actions github-actions bot added core/balancer core/proxy core/templates author/community PRs from the open-source community (not Kong Inc) labels Sep 19, 2023
@catbro666 catbro666 force-pushed the backport-11502-to-release/3.4.x branch from 69512aa to 653a3ac Compare September 20, 2023 08:54
…11502)

* fix(runloop): upstream ssl failure when plugins use response handler

If a plugin has response() handler, in `Kong.response` it will emits
a subrequest by calling `ngx.location.capture("/kong_buffered_http", options)`.
`ngx.location.capture` will create a new nginx request, so the overwritten
ssl info (client key & cert etc.) get lost in the new nginx request.

To fix this, those ssl info need to be re-set in the new request
context. We choose to do this in the early rewrite phase of the new
request before `Kong.balancer()` getting executed.

[FTI-5347](https://konghq.atlassian.net/browse/FTI-5347)

(cherry picked from commit 54468c4)
@catbro666 catbro666 force-pushed the backport-11502-to-release/3.4.x branch from 653a3ac to 4672a21 Compare September 21, 2023 03:57
@windmgc windmgc merged commit eb33195 into release/3.4.x Sep 22, 2023
21 checks passed
@windmgc windmgc deleted the backport-11502-to-release/3.4.x branch September 22, 2023 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants