Skip to content

support for starttls inner socket in UpstreamProxyProtocolSocket#26593

Closed
VishalDamgude wants to merge 4 commits intoenvoyproxy:mainfrom
freshworks-oss:upstream-proxyproto-socket-starttls
Closed

support for starttls inner socket in UpstreamProxyProtocolSocket#26593
VishalDamgude wants to merge 4 commits intoenvoyproxy:mainfrom
freshworks-oss:upstream-proxyproto-socket-starttls

Conversation

@VishalDamgude
Copy link
Copy Markdown
Contributor

Commit Message: support for starttls inner socket in UpstreamProxyProtocolSocket
Additional Description: When starttls socket is configured as inner socket in UpstreamProxyProtocolSocket for the cluster, we are unable to switch to TLS. When an L7 filter (e.g SMTP) invokes startSecureTransport() on UpstreamProxyProtocolSocket as a result of STARTTLS command, the api returns false due to missing implementation.

Risk Level: Low
Testing: Unit Tests, Local tests with SMTP filter.
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue] #26592
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

UpstreamProxyProtocolSocket

Signed-off-by: VishalDamgude <vishal.damgude@freshworks.com>
@repokitteh-read-only
Copy link
Copy Markdown

Hi @VishalDamgude, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #26593 was opened by VishalDamgude.

see: more, trace.

Signed-off-by: VishalDamgude <vishal.damgude@freshworks.com>
@alyssawilk
Copy link
Copy Markdown
Contributor

alyssawilk commented Apr 10, 2023

Huh, my initial pass was going to be to ask we add this directly to the passthrough base class but there's a comment that should not be done.
I'm going to throw this over to @cpakulski and @lizan because I don't understand why we don't always call it and just return the sucess/failure (original PR #13112)

@yanavlasov
Copy link
Copy Markdown
Contributor

It would be good to add an integration test that validates this plumbing end to end.

@cpakulski
Copy link
Copy Markdown
Contributor

After reviewing the code, I think the call to startSecureTransport should be added to base class PassthroughSocket. Yes, there is a comment I added saying that "startSecureTransport method should not be called for this transport socket.", but I really meant "so far nobody uses it so it is not implemented". All transport sockets derived from PassthroughSocket does not work if "inner" socket is StartTLS: proxy and tap.

Also, integration tests should be added as mentioned above.

Copy link
Copy Markdown
Contributor

@cpakulski cpakulski left a comment

Choose a reason for hiding this comment

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

Please move startSecureTransport to base class.

config.set_version(ProxyProtocolConfig_Version::ProxyProtocolConfig_Version_V2);
initialize(config, nullptr);

EXPECT_CALL(*inner_socket_, startSecureTransport()).WillOnce(Return(false));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Return(false) is not required here. Test only cares that the method is invoked.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sure, will address this.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label May 27, 2023
Signed-off-by: VishalDamgude <vishal.damgude@freshworks.com>
Signed-off-by: VishalDamgude <vishal.damgude@freshworks.com>
@github-actions github-actions Bot removed the stale stalebot believes this issue/PR has not been touched recently label Jun 3, 2023
@ravenblackx
Copy link
Copy Markdown
Contributor

@alyssawilk Review SLO ping.

@alyssawilk
Copy link
Copy Markdown
Contributor

assignee is @lizan?

@VishalDamgude
Copy link
Copy Markdown
Contributor Author

Yet to add integration tests in this PR.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 6, 2023

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Jul 6, 2023
@github-actions
Copy link
Copy Markdown

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot closed this Jul 14, 2023
@VishalDamgude
Copy link
Copy Markdown
Contributor Author

/reopen

@alyssawilk alyssawilk reopened this Sep 24, 2024
@github-actions github-actions Bot removed the stale stalebot believes this issue/PR has not been touched recently label Sep 24, 2024
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot added the stale stalebot believes this issue/PR has not been touched recently label Oct 24, 2024
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 1, 2024

This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@github-actions github-actions Bot closed this Nov 1, 2024
@saravanan-sekar saravanan-sekar deleted the upstream-proxyproto-socket-starttls branch September 26, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale stalebot believes this issue/PR has not been touched recently waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants