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

Support filtering of incoming traffic by header #290

Closed
3 of 4 tasks
eyalb181 opened this issue Aug 29, 2022 · 2 comments
Closed
3 of 4 tasks

Support filtering of incoming traffic by header #290

eyalb181 opened this issue Aug 29, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request major user

Comments

@eyalb181
Copy link
Member

eyalb181 commented Aug 29, 2022

In order to support concurrent usage of mirrord on the same service in e.g. a staging cluster, we need to let users filter requests routed to them by header.
For example, when running mirrord-layer with FILTER_INCLUDE="mirrord-user: eyal", only requests with the specified header would be routed by the agent to the layer. Extrapolate to FILTER_EXCLUDE.

Architecture here.

Subtasks:

  • Change existing stealer to be global per agent, rather than multiple stealers per agent (one per subscribed layer)
  • Develop the Filter component - this component will know to receive raw HTTP traffic and a collection of filters, and determine whether the traffic answers one or more of the filter conditions. If it answers more than one filter conditions, just use the first one.
  • Change the Stealer component to use the Filter component.
  • Implement subscription with filters by configuration in the layer.
@eyalb181 eyalb181 added enhancement New feature or request major labels Aug 29, 2022
@eyalb181 eyalb181 added the user label Sep 19, 2022
bors bot pushed a commit that referenced this issue Jan 9, 2023
#290

- Introduce Filtered subscriptions to protocol and stealer api.
- Interface with HttpFilterManager.
- Handle filtered subscriptions in stealer.
- Handle new incoming connections on filtered ports.
- Forward stolen requests to appropriate client (stealer client=layer).
- Forward responses to stolen requests from layer back to browser.  

Co-authored-by: t4lz <[email protected]>
@meowjesty
Copy link
Member

Partially implemented in #843, we're missing HTTP/2.

@meowjesty
Copy link
Member

Closing this in favor of #922

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request major user
Projects
None yet
Development

No branches or pull requests

3 participants