Skip to content

outbound: Make HTTP endpoint stack generic on its target#952

Merged
olix0r merged 7 commits intomainfrom
ver/http-generic
Mar 18, 2021
Merged

outbound: Make HTTP endpoint stack generic on its target#952
olix0r merged 7 commits intomainfrom
ver/http-generic

Conversation

@olix0r
Copy link
Member

@olix0r olix0r commented Mar 18, 2021

THe HTTP endpoint stack is coupled to the Endpoint target type.

In order to make the outbound stack more flexible so that the endpoint
stack can be used without the logical stack, this change updates the
outbound HTTP endpoint stack to be generic over its target type.

olix0r added 5 commits March 17, 2021 01:51
ebf67d6 moved endpoint construction logic out of the logical stacks. In
doing so, the gateway was incorrectly configured to mark endpoints with
disabled identity, preventing mTLS between the gateway and destination
service.

This change moves endpoint construction into each logical stack so that
it need not be configured on each instantiation.
In order to make the server and logical stack more flexible, we need to
make stacks generic over their input target type.

This change modifies the innermost `tcp::connect` stack to not depend on
a concrete target type, instead relying on `Param` constraints. A new
`tcp::Connect` target type is introduced to be constructed by the TCP
connect stack.
THe HTTP endpoint stack is coupled to the Endpoint target type.

In order to make the outbound stack more flexible so that the endpoint
stack can be used without the logical stack, this change updates the
outbound HTTP endpoint stack to be generic over its target type.
Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, the change is quite simple. i'm guessing this is just a draft because it depends on #951, which hasn't merged yet...or are you still working on it?

Base automatically changed from ver/endpoint-generic to main March 18, 2021 22:33
@olix0r olix0r marked this pull request as ready for review March 18, 2021 22:33
@olix0r olix0r requested a review from a team March 18, 2021 22:33
@olix0r olix0r merged commit cac988e into main Mar 18, 2021
@olix0r olix0r deleted the ver/http-generic branch March 18, 2021 23:04
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Mar 30, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)
olix0r added a commit to linkerd/linkerd2 that referenced this pull request Mar 30, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)
Pothulapati pushed a commit to linkerd/linkerd2 that referenced this pull request Apr 14, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)
jijeesh pushed a commit to jijeesh/linkerd2 that referenced this pull request Apr 21, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)

Signed-off-by: Jijeesh <[email protected]>
kleimkuhler pushed a commit to linkerd/linkerd2 that referenced this pull request May 12, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)
kleimkuhler pushed a commit to linkerd/linkerd2 that referenced this pull request May 12, 2021
This release fixes two issues:

1. The inbound proxy could break non-meshed TLS connections when the
   initial ClientHello message was larger than 512 bytes or when the
   entire message was not received in the first data packet of the
   connection. TLS detection has been fixed to ensure that the entire
   message is preserved in these cases.

2. The admin server could emit warnings about HTTP detection failing in
   some innocuous situations, such as when the socket closes before
   a request is sent. These situations are now handled gracefully
   without logging warnings.

---

* Update MAINTAINERS to point at the main repo (linkerd/linkerd2-proxy#950)
* outbound: Configure endpoint construction in logical stack (linkerd/linkerd2-proxy#949)
* outbound: Decouple the TCP connect stack from the target type (linkerd/linkerd2-proxy#951)
* outbound: Make HTTP endpoint stack generic on its target (linkerd/linkerd2-proxy#952)
* outbound: Make the HTTP server stack generic (linkerd/linkerd2-proxy#953)
* Update profile response to include a logical address (linkerd/linkerd2-proxy#954)
* inbound, outbound: `Param`-ify `listen::Addrs` (linkerd/linkerd2-proxy#955)
* tls: Fix inbound I/O when TLS detection fails (linkerd/linkerd2-proxy#958)
*  tls: Test SNI detection (linkerd/linkerd2-proxy#959)
* admin: Handle connections that fail protocol detection (linkerd/linkerd2-proxy#960)
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.

2 participants