-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TT-423] Fix gRPC proxy and add h2c proxying support #3142
Conversation
You can use command-line tools from this repo to test it out: https://github.com/thrawn01/h2c-golang-example |
Additionally, you can use this tool to validate if h2c service proxied though Tyk is still valid https://github.com/summerwind/h2spec h2spec -p 8888 http2 |
Also was added the property Note that after this changes are merged then we need to update the vendor in Dashboard as well as in sink, the reason behind this is:
|
/release to release-3-lts |
Working on it! Note that it can take a few minutes. |
Co-authored-by: gernest <geofreyernest@live.com> Co-authored-by: sredny buitrago <sredny.buitrago@gmail.com> (cherry picked from commit 4959491)
@matiasinsaurralde Succesfully merged |
/release to release-3.1 |
Working on it! Note that it can take a few minutes. |
@matiasinsaurralde Seems like there is conflict and it require manual merge. |
Co-authored-by: gernest <geofreyernest@live.com> Co-authored-by: sredny buitrago <sredny.buitrago@gmail.com>
Co-authored-by: gernest <geofreyernest@live.com> Co-authored-by: sredny buitrago <sredny.buitrago@gmail.com> (cherry picked from commit 4959491)
Description
This draft enables optional H2C support, both in the server and in the reverse proxy.
Related Issue
https://github.com/TykTechnologies/product/issues/334
Motivation and Context
When Tyk is proxying gRPC it may be the case that those services are not secure. Currently only HTTP/2 over TLS is supported by Tyk.
In service meshes such as Istio the gRPC service will not be secured in any way as the security in the mesh is offloaded to Envoy. When proxying service to service calls in this scenario it will be over HTTP/2 cleartext (h2c)
This draft enables us to support this in scenarios when needed by wrapping the server handler for the API in the h2c helper handler provided by Go https://godoc.org/golang.org/x/net/http2/h2c
For the upstream request when a h2c request is required the underlying Transport is swapped out for a http2 transport that will allow http calls.
How This Has Been Tested
Unit test and example client and server code to test will be provided.
Screenshots (if appropriate)
Types of changes
Checklist
fork, don't request your
master
!master
branch (left side). Also, you should startyour branch off our latest
master
.go mod tidy && go mod vendor
go fmt -s
go vet