Skip to content

GEP: Firewall #3614

@shaneutt

Description

@shaneutt

What?

The ability to define firewall rules for ingress L3, L4 and L7 Gateway traffic.

Note: Egress will be considered as well, but may be best as a follow-up.
Note: Route level rules will be considered as well, but might be best as a follow-up.

Why?

Gateways are commonly exposed to the internet, which puts them as risk of attack. Internal networks can become compromised as well. We should provide tools for users to restrict and control access to their Gateways.

Note: If we are aligned that we want to move forward with something, one part of the motivation
we will need to address very clearly in the GEP will be: "why is this Gateway, and not NetworkPolicy"? As we are
keenly aware that some of the use cases are covered by that today. Ultimately it comes down to either declining the
GEP in favor of NetworkPolicy, OR we need to explain exactly why it was insufficient in the alternatives considered
section.

User Stories

  • As a cluster operator I want all ingress traffic for my Gateways to be restricted to my CDN.
  • As a cluster operator I want to be able to block traffic from specific geographical regions.
  • As a cluster operator I want to be able to identify and block malformed HTTP requests before they reach backend applications.
  • As a cluster operator I want to filter/sanitize requests to block XSS attacks before they reach my backend applications.
  • As a cluster operator I want to block all requests from specific user agents OR only allow specific user agents.

Note: CORS has some relation to this. At the time of writing there is GEP-1767 for this, which we will need to keep in mind and ensure we have lots of cross-collaboration with as we progress.

How?

How this would be implemented is going to require a LOT of discussion and consensus building. Please do not focus on the "How?" for now, instead please see if you agree with the "What?" and the "Why?" and most importantly if you agree there should be an upstream standard for this.

Note: I expect implementations may have a variety of ways in which they would implement the specified rules, including (but not limited to):

  • cloud WAF integrations
  • internal WAF integrations
  • NetworkPolicies

However these would be implementation details and ultimately we would need to decide whether we want to prescribe any of them. (Currently a lot of Gateway API implementations implement Gateway by creating a Deployment and a Service, but we don't really prescribe that as the "here's how you start implementing" in our implementers guide today).

So most of the "How?" can wait, but I do think we'll have to be thinking about these specific implementation mechanism possibilities.

Note: I anticipate responses to this issue might be something like "What about Policies with policy attachment??".
I'm open to discussing that when we get to figuring out the how, but for now I really just want to see if we all agree
on the goals of creating upstream standards for these things first.

We do need to be careful about ending up with multiple very obvious and distinct ways to do the same thing, but
ultimately all options are on the table if we can navigate tacit rules like that.

Important!

If you have similar use cases, please prefer to respond with user stories and I'll incorporate them. In general though, please comment at least with support so we know who wants to be a stakeholder!

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Projects

    Status

    Proposed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions