Skip to content
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

FR: nested network filter chains #18035

Open
kyessenov opened this issue Sep 9, 2021 · 11 comments
Open

FR: nested network filter chains #18035

kyessenov opened this issue Sep 9, 2021 · 11 comments
Labels
area/listener design proposal Needs design doc/proposal before implementation help wanted Needs help!

Comments

@kyessenov
Copy link
Contributor

Currently, listener inspectors and transport sockets are forced to reside at one-level: first inspect, then match, then use a transport socket. This is quite inflexible, and leads to situations where a whole expensive listener is needed (e.g. #4076). The proposal is to add a oneof that allows (inspectors + filter chains) to reside within the filter chains next to filters. The semantics is that processing is staged where once a filter chain is selected, transport socket is applied, and then inspector + filter chain matching restart.

This solves a bunch of issues:

  1. Proxy protocol can be placed within TLS on server-side.
  2. TLS-within-TLS can be matched provided outer TLS is prior knowledge.
  3. HTTP-within-TLS can be sniffed provided outer TLS is prior knowledge.
@kyessenov kyessenov added enhancement Feature requests. Not bugs or questions. triage Issue requires triage labels Sep 9, 2021
@mattklein123
Copy link
Member

@kyessenov I'm having trouble quickly understanding the API shape of the proposal. Can you do a quick API mock up to share and discuss? Thank you.

@kyessenov
Copy link
Contributor Author

@mattklein123 Opened PR #18079 with a minimal change.

@mattklein123
Copy link
Member

Thanks, that makes sense to me at a high level.

@soulxu
Copy link
Member

soulxu commented Sep 14, 2021

@kyessenov let me know if you need any volunteer :)

@lizan
Copy link
Member

lizan commented Sep 14, 2021

Yeah at high level that makes sense to me. It also reminds whether we want FCDS / filter chain references to avoid duplicated filter chain configs.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. 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 20, 2021
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

@kyessenov
Copy link
Contributor Author

I can pick it up after the peek change gets in. There's some useful refactor in there.

@kyessenov
Copy link
Contributor Author

This is probably still a useful feature, but we can do something better with matcher API and aligned transport / regular sockets.

@kyessenov
Copy link
Contributor Author

Some additional thoughts that we had in this area:

  • delaying inspectors until middle of the decision tree in the unified matchers: helps with reducing duplication with per-listener filter conditions
  • this feels a lot like internal redirect in HTTP; perhaps, a better way to frame it is as a re-evaluation of the matcher tree.

@mattklein123 mattklein123 reopened this Mar 30, 2022
@mattklein123
Copy link
Member

Reopening and marking design proposal needed. I think this would benefit from a short design doc.

@mattklein123 mattklein123 added design proposal Needs design doc/proposal before implementation help wanted Needs help! area/listener and removed enhancement Feature requests. Not bugs or questions. stale stalebot believes this issue/PR has not been touched recently labels Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/listener design proposal Needs design doc/proposal before implementation help wanted Needs help!
Projects
None yet
Development

No branches or pull requests

5 participants