Skip to content

forward proxy: ip host headers#7565

Merged
mattklein123 merged 15 commits intomasterfrom
ip_host_headers
Jul 22, 2019
Merged

forward proxy: ip host headers#7565
mattklein123 merged 15 commits intomasterfrom
ip_host_headers

Conversation

@mattklein123
Copy link
Copy Markdown
Member

Support IP addresses in host headers.

This completes the MVP of dynamic forward proxy.

Fixes #1606

Risk Level: Low
Testing: Unit and integration tests
Docs Changes: N/A
Release Notes: N/A

Support IP addresses in host headers.

This completes the MVP of dynamic forward proxy.

Fixes #1606

Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

@lizan @PiotrSikora PTAL I'm sure I got something wrong here either on the TLS or spec side. cc @alyssawilk

Copy link
Copy Markdown
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

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

Looks good! (modulo defering TLS magic to TLS folks =P)

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

@alyssawilk @lizan @PiotrSikora updated per comments.

Signed-off-by: Matt Klein <mklein@lyft.com>
alyssawilk
alyssawilk previously approved these changes Jul 17, 2019
lizan
lizan previously approved these changes Jul 17, 2019
Copy link
Copy Markdown
Member

@lizan lizan left a comment

Choose a reason for hiding this comment

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

Can you merge master to pick #7608?

Copy link
Copy Markdown
Contributor

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

Hmm, I was sure that I saw it before, but I cannot find it now... Could you add a test that verifies that using IP address in "verify_subject_alt_name" works against peer with "upstreamlocalhostcert.pem"?

@mattklein123
Copy link
Copy Markdown
Member Author

Hmm, I was sure that I saw it before, but I cannot find it now... Could you add a test that verifies that using IP address in "verify_subject_alt_name" works against peer with "upstreamlocalhostcert.pem"?

Will do.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123 mattklein123 dismissed stale reviews from lizan and alyssawilk via da94cde July 19, 2019 04:10
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

@PiotrSikora updated with the test you asked for.

Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

/retest

@repokitteh-read-only
Copy link
Copy Markdown

🔨 rebuilding ci/circleci: coverage (failed build)

🐱

Caused by: a #7565 (comment) was created by @mattklein123.

see: more, trace.

PiotrSikora
PiotrSikora previously approved these changes Jul 21, 2019
Copy link
Copy Markdown
Contributor

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

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

LGTM, sans the explicit IPv4 and IPv6 tests.

Signed-off-by: Matt Klein <mklein@lyft.com>
@mattklein123
Copy link
Copy Markdown
Member Author

@PiotrSikora @lizan I pushed an update per your comments, but I'm seeing what I think is a persistent flake in coverage which I don't think is due to my changes:

[ RUN      ] IpVersions/SslReadBufferLimitTest.SomeLimit/IPv4
test/extensions/transport_sockets/tls/ssl_socket_test.cc:3854: Failure
Expected: (expected_chunk_size) >= (data.length()), actual: 32768 vs 65440
test/extensions/transport_sockets/tls/ssl_socket_test.cc:3854: Failure
Expected: (expected_chunk_size) >= (data.length()), actual: 32768 vs 65440
test/extensions/transport_sockets/tls/ssl_socket_test.cc:3854: Failure
Expected: (expected_chunk_size) >= (data.length()), actual: 32768 vs 65440
test/extensions/transport_sockets/tls/ssl_socket_test.cc:3854: Failure
Expected: (expected_chunk_size) >= (data.length()), actual: 32768 vs 65440
[  FAILED  ] IpVersions/SslReadBufferLimitTest.SomeLimit/IPv4, where GetParam() = 4-byte object <00-00 00-00> (28 ms)

I will take a look tonight or tomorrow but LMK if you have any thoughts. I'm assuming it's somehow due to the sharding we now have.

PiotrSikora
PiotrSikora previously approved these changes Jul 21, 2019
Signed-off-by: Matt Klein <mklein@lyft.com>
@PiotrSikora
Copy link
Copy Markdown
Contributor

I don't see anything in the code that should break that test.

@mattklein123 mattklein123 merged commit 81654d1 into master Jul 22, 2019
@mattklein123 mattklein123 deleted the ip_host_headers branch July 22, 2019 02:13
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.

Support generic outbound proxy

4 participants