Skip to content

Support filtering of incoming traffic by header #290

Closed
@eyalb181

Description

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.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions