Skip to content

Conversation

shaneutt
Copy link
Member

@shaneutt shaneutt commented Oct 6, 2025

What type of PR is this?
/kind gep

What this PR does / why we need it:

This takes the first provisional step of proposing firewall support for Gateway API, which has been very popular as per engagement in #3614.

Which issue(s) this PR fixes:

This supports, but does not resolve #3614.

Does this PR introduce a user-facing change?:

NONE

@shaneutt shaneutt added the kind/gep PRs related to Gateway Enhancement Proposal(GEP) label Oct 6, 2025
@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Oct 6, 2025
@k8s-ci-robot k8s-ci-robot requested review from candita and kflynn October 6, 2025 14:43
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 6, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shaneutt

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 6, 2025
@shaneutt shaneutt requested a review from rikatz October 6, 2025 14:44
@rikatz
Copy link
Member

rikatz commented Oct 6, 2025

/assign

@shaneutt shaneutt changed the title docs: add provisional GEP for Gateway Firewall Support docs: add provisional GEP for Gateway API Firewall Support Oct 6, 2025
@shaneutt shaneutt force-pushed the provisional-firewall branch from 480dd54 to 1f798e2 Compare October 6, 2025 16:27
@shaneutt shaneutt requested a review from fzipi October 6, 2025 16:28
@shaneutt shaneutt force-pushed the provisional-firewall branch 3 times, most recently from e4c206a to 4165994 Compare October 6, 2025 20:26
@shaneutt shaneutt force-pushed the provisional-firewall branch from 4165994 to 108977d Compare October 6, 2025 20:48
@shaneutt shaneutt requested a review from fzipi October 6, 2025 20:49
@shaneutt shaneutt force-pushed the provisional-firewall branch from 108977d to 629e1d8 Compare October 7, 2025 11:22
@shaneutt shaneutt requested a review from rikatz October 7, 2025 11:24
@shaneutt shaneutt force-pushed the provisional-firewall branch from 629e1d8 to 079f8ed Compare October 7, 2025 11:59
@shaneutt shaneutt requested a review from fzipi October 7, 2025 14:46
`Gateway` as a sidecar, integrated natively as part of the `Gateway`, or
deployed in front of the `Gateway` as part of the networking path.

### User Stories
Copy link
Contributor

Choose a reason for hiding this comment

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

I am concerned about the ability to actually fulfill the goals in this GEP. Just from reading the title, I was worried about running into the lowest-common-denominator problem: that there is almost no overlap between each firewall configuration surface, so we end up with an API that is not useful (or, we end up debating the API surface indefinitely).

Gateway API actually does already have a solution for this, with policy attachment. I suspect you may disagree, but when we are faced with a problem set that doesn't have much overlap, policy attachment of implementation specific policies is a much better experience for users than attempting to make an API that doesn't work.

After reading the GEP, my concerns are far greater, though. This set of goals is impossible to reasonable tackle. While the title if "Firewall", in typical products the feature set here actually spans 3-4 API surfaces: WAF, Authorization (typically separate from WAF!!), rate limiting, auditing, DLP. And I saw in the AI WG, LLM guardrails was also something of interest as part of this effort (which, again, differs from traditional WAF). I am very worried we are biting off way to much work with this effort and it will make it impossible to proceed.

Just as an anecdote, even just rate limiting is ridiculously complex to design an API around. I suspect it would be harder than BackendTLSPolicy was...

Copy link
Member Author

Choose a reason for hiding this comment

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

I am concerned about the ability to actually fulfill the goals in this GEP. Just from reading the title, I was worried about running into the lowest-common-denominator problem: that there is almost no overlap between each firewall configuration surface, so we end up with an API that is not useful (or, we end up debating the API surface indefinitely).

I am anticipating that we wont actually try to add significant API surface for this, see this conversation for some context.

In any case, I'm open to the possibility that this GEP moves to Withdrawn if we can't find the right stakeholders, and common surface.

Gateway API actually does already have a solution for this, with policy attachment. I suspect you may disagree, but when we are faced with a problem set that doesn't have much overlap, policy attachment of implementation specific policies is a much better experience for users than attempting to make an API that doesn't work.

This is getting into the "How?" we do things, which we're not ready for yet.

After reading the GEP, my concerns are far greater, though. This set of goals is impossible to reasonable tackle. While the title if "Firewall", in typical products the feature set here actually spans 3-4 API surfaces: WAF, Authorization (typically separate from WAF!!), rate limiting, auditing, DLP. And I saw in the AI WG, LLM guardrails was also something of interest as part of this effort (which, again, differs from traditional WAF). I am very worried we are biting off way to much work with this effort and it will make it impossible to proceed.

I will make sure you are considered a stakeholder for reviews, and that your concerns are incorporated 👍

Just as an anecdote, even just rate limiting is ridiculously complex to design an API around. I suspect it would be harder than BackendTLSPolicy was...

Agreed.

This is getting into the "How?", which we will get stuck on if we discuss this now. The important thing for this iteration is to align on the motivation and goals at a high level. If we do that, and then we move to the implementation details and we simply can not produce something that's effective within a reasonable scope, and is supported by multiple stakeholders, it is OK to consider this Withdrawn and keep it for posterity so that the community knows we looked into it, and what our reasons were for not continuing.

Copy link
Contributor

@mikemorris mikemorris Oct 7, 2025

Choose a reason for hiding this comment

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

I am anticipating that we wont actually try to add significant API surface for this

In this case, I'm also wondering how this provides value that is not already available through HTTPRoute extensionRef custom filters or policy attachment, or what is missing from the current extension points to support this use case?

Something like first-class support for OWASP CRS configuration rules to provide WAF functionality in Gateway API might feel contentious and a scope stretch, but would at least feel more aligned with standardizing functionality within the Gateway API specification.

This does feel like it could be a valuable proprietary feature or product positioning for a Gateway API implementation, but I don't really see a purpose-built extension point enabling this as appropriate for the spec, when existing generic extension points may be sufficient (and potentially support the same or related use cases, such as using WASM modules to mutate or drop requests or responses as @jcchavezs mentioned in #4148 (comment)).

Copy link
Member Author

Choose a reason for hiding this comment

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

In this case, I'm also wondering how this provides value that is not already available through HTTPRoute
extensionRef custom filters

Filters could be viable, we need to decide. This is an important part of the exercise of this GEP. There could be challenges. One challenge is the should language around the order of processing filters, which is not conducive to security systems.

or policy attachment

Policy Attachment could be viable, we need to decide. This too is an important part of the exercise. There will be challenges, as it comes with many caveats. Ordering policies is one thing that can be challenging to get right, among others.


We are into implementation details however.

I want to be extra clear that if we get to the "How?" and there is no consensus, I am not shy about slapping a Withdrawn on it and providing a written explanation as to why. That way people who are looking at least know that we've tried, what we've tried, and what the difficulties are.

If possible however, the bare minimum I would like for this effort to result in a memorandum that provides some guidance to implementations that want to integrate firewalls with their Gateways, as I see this as a pretty common desire from users.

Copy link
Member Author

Choose a reason for hiding this comment

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

An explicit note about the potential to not change any API specification at all has been added in b195370. Please let me know if this seems reasonable for the purposes of moving forward with the initial PR, or if you have further concerns.

Copy link
Member

Choose a reason for hiding this comment

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

My concern here is that we probably shouldn't merge something this as provisional unless we can think of one or more plausible ways that we could implement it in Gateway API. While I agree that we should generally focus on user stories first to ensure we get to the right implementation details, I also want to ensure that we have a viable path forward before we go too far here.

I think this is a good discussion to have, I just think the better outcome here might be to have a page/doc somewhere where we list common categories of Gateway API extensions such as firewalls, and describe why we don't think they're in scope for Gateway API at the current point in time, potentially with link(s) to discussion(s) with more context. If we have a GEP for each instance like this, I think we could get pretty quickly overloaded with GEPs.

Copy link
Member Author

Choose a reason for hiding this comment

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

My concern here is that we probably shouldn't merge something this as provisional unless we can think of one or more plausible ways that we could implement it in Gateway API. While I agree that we should generally focus on user stories first to ensure we get to the right implementation details, I also want to ensure that we have a viable path forward before we go too far here.

I'm not sure why this is a concern: we've made it clear that one could use policy attachment, or possibly filters at a bare minimum. There's seems to be precedent in that cloud providers like GKE do this today.

I think this is a good discussion to have, I just think the better outcome here might be to have a page/doc somewhere where we list common categories of Gateway API extensions such as firewalls, and describe why we don't think they're in scope for Gateway API at the current point in time, potentially with link(s) to discussion(s) with more context.

I suppose that could be an outcome but it feels pretty arbitrary considering there's already implementations out there doing this (e.g. GKE).

If we have a GEP for each instance like this, I think we could get pretty quickly overloaded with GEPs.

If limiting the number of GEPs we have as a project becomes a common goal, we should find a neutral mechanism to start and not apply it in a procrustean manner to a mid-flight effort.

Copy link
Contributor

Choose a reason for hiding this comment

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

Taking this back to specifics, I'm seeing:

One challenge is the should language around the order of processing filters, which is not conducive to security systems.
Ordering policies is one thing that can be challenging to get right, among others.

Which reads to me as ordering is a core missing capability for our extension points. FWIW I don't particularly like the semantics for priority ordering over in AdminNetworkPolicy (it generally feels too complicated and easy to footgun or create conflicting/undefined states), but I'd be more open to a GEP introducing optional ordering functionality for those features, citing specific firewall behavior expectations as a user story requiring it, than what feels like an overly-broad product story GEP potentially spanning many disparate features (on the scale of GAMMA or WG AI Gateway from my perspective).

(I'm not concerned with "too many GEPs" FWIW, but I do want to try to constrain the focus to concrete enhancements rather than biting off too big a scope without the intent of actually bringing the solution into the spec.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Which reads to me as ordering is a core missing capability for our extension points.

Yes.

FWIW I don't particularly like the semantics for priority ordering over in AdminNetworkPolicy (it generally feels too complicated and easy to footgun or create conflicting/undefined states), but I'd be more open to a GEP introducing optional ordering functionality for those features, citing specific firewall behavior expectations as a user story requiring it, than what feels like an overly-broad product story GEP potentially spanning many disparate features (on the scale of GAMMA or WG AI Gateway from my perspective).

I had a similar thought. Not sure it's only this, but this does seem like an area to focus. Since we seem to agree on that, I have added that to the notes for follow-up.

(I'm not concerned with "too many GEPs" FWIW, but I do want to try to constrain the focus to concrete enhancements rather than biting off too big a scope without the intent of actually bringing the solution into the spec.)

👍

@shaneutt shaneutt added the tide/merge-method-rebase Denotes a PR that should be rebased by tide when it merges. label Oct 8, 2025
@shaneutt shaneutt force-pushed the provisional-firewall branch from 865990e to b195370 Compare October 8, 2025 19:04
@shaneutt shaneutt requested review from fzipi, howardjohn, jcchavezs, mikemorris, robscott and youngnick and removed request for fzipi and jcchavezs October 8, 2025 19:06
Copy link
Member

@robscott robscott left a comment

Choose a reason for hiding this comment

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

Thanks for starting this conversation @shaneutt! I know in the past @youngnick voiced significant concerns about moving forward with something like this, so let's make sure he has time to respond when he gets back before we get too far with this.

/hold

`Gateway` as a sidecar, integrated natively as part of the `Gateway`, or
deployed in front of the `Gateway` as part of the networking path.

### User Stories
Copy link
Member

Choose a reason for hiding this comment

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

My concern here is that we probably shouldn't merge something this as provisional unless we can think of one or more plausible ways that we could implement it in Gateway API. While I agree that we should generally focus on user stories first to ensure we get to the right implementation details, I also want to ensure that we have a viable path forward before we go too far here.

I think this is a good discussion to have, I just think the better outcome here might be to have a page/doc somewhere where we list common categories of Gateway API extensions such as firewalls, and describe why we don't think they're in scope for Gateway API at the current point in time, potentially with link(s) to discussion(s) with more context. If we have a GEP for each instance like this, I think we could get pretty quickly overloaded with GEPs.

@shaneutt shaneutt requested a review from robscott October 9, 2025 14:24
@shaneutt shaneutt force-pushed the provisional-firewall branch from b195370 to ea04371 Compare October 9, 2025 17:19
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/gep PRs related to Gateway Enhancement Proposal(GEP) release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-rebase Denotes a PR that should be rebased by tide when it merges.

Projects

Development

Successfully merging this pull request may close these issues.

GEP: Firewall

9 participants