Skip to content

[Question] Anyway to do L4 ip filtering on HTTPRoute? #7825

@LeeTeng2001

Description

@LeeTeng2001

Description:
Right now an invalid request will go through L7 filter chain and return RBAC error at the end, it would be preferable to just drop the packet based on incoming packet ip, maybe there's something that I missed?
Is this a gateway API limitation?

Right now I'm using a SecurityPolicy like this:

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: SecurityPolicy
metadata:
  name: xx-whitelist-http-client-ip
  namespace: envoy-gateway-system
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: Gateway
      name: xx-gateway
      sectionName: xxx 
  authorization:
    defaultAction: Deny
    rules:
      - action: Allow
        principal:
          clientCIDRs:
            - 1.1.1.1/32

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/decisionA record of a decision made by the community.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions