Skip to content

outbound: handle Opaque protocol hints on endpoints#2237

Merged
hawkw merged 7 commits intomainfrom
eliza/9888-2
Apr 13, 2023
Merged

outbound: handle Opaque protocol hints on endpoints#2237
hawkw merged 7 commits intomainfrom
eliza/9888-2

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented Feb 15, 2023

Currently, when the outbound proxy makes a direct connection prefixed
with a TransportHeader in order to send HTTP traffic, it will always
send a SessionProtocol hint with the HTTP version as part of the
header. This instructs the inbound proxy to use that protocol, even if
the target port has a ServerPolicy that marks that port as opaque, which
can result in incorrect handling of that connection. See
linkerd/linkerd2#9888 for details.

In order to prevent this, linkerd/linkerd2-proxy-api#197 adds a new
ProtocolHint value to the protobuf endpoint metadata message. This
will allow the Destination controller to explicitly indicate to the
outbound proxy that a given endpoint is known to handle all connections
to a port as an opaque TCP stream, and that the proxy should not perform
a protocol upgrade or send a SessionProtocol in the transport header.
This branch updates the proxy to handle this new hint value, and adds
tests that the outbound proxy behaves as expected.

Along with linkerd/linkerd2#10301, this will fix linkerd/linkerd2#9888.

I opened a new PR for this change rather than attempting to rebase my
previous PR #2209, as it felt a bit easier to start with a new branch
and just make the changes that were still relevant. Therefore, this
closes #2209.

@hawkw hawkw requested a review from a team as a code owner February 15, 2023 22:54
@hawkw hawkw requested a review from olix0r February 15, 2023 22:55
@hawkw hawkw changed the title handle Opaque protocol hints on endpoints (take 2) outbound: handle Opaque protocol hints on endpoints Apr 13, 2023
@hawkw hawkw merged commit c7918cf into main Apr 13, 2023
@hawkw hawkw deleted the eliza/9888-2 branch April 13, 2023 21:09
hawkw added a commit to linkerd/linkerd2 that referenced this pull request Apr 18, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)
hawkw added a commit to linkerd/linkerd2 that referenced this pull request Apr 19, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)
alpeb pushed a commit to linkerd/linkerd2 that referenced this pull request Apr 24, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)
risingspiral pushed a commit to linkerd/linkerd2 that referenced this pull request May 4, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)
risingspiral pushed a commit to linkerd/linkerd2 that referenced this pull request May 5, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)

Signed-off-by: Eric Anderson <eric@buoyant.io>
risingspiral pushed a commit to linkerd/linkerd2 that referenced this pull request May 5, 2023
This proxy release changes the proxy to handle `Opaque` protocol hints
on endpoints when sent by the Destination service. In addition, it
updates the dependency on `h2` to fix a potential crash in the HTTP/2
implementation.

---

* build(deps): bump `h2` to v0.3.18 (linkerd/linkerd2-proxy#2394)
* outbound: handle `Opaque` protocol hints on endpoints (linkerd/linkerd2-proxy#2237)
* build(deps): bump cmake from 0.1.49 to 0.1.50 (linkerd/linkerd2-proxy#2365)

Signed-off-by: Eric Anderson <eric@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proxy returns 404 when HTTP connection is marked as opaque

2 participants