Skip to content

Commit f0e66a4

Browse files
committed
docs: document SecurityPolicy client-IP authorization for UDPRoute
Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
1 parent a4835ef commit f0e66a4

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `UDPRoute` as a valid `SecurityPolicy` target, so client IP allowlists and denylists can now be applied to UDP services such as DNS, syslog, NTP, telemetry collectors and game servers. As with `TCPRoute`, only `authorization` rules using `principal.clientCIDRs` apply; the client IP is the source address of the datagram, and a denied source is dropped without a reply rather than receiving an error.

‎site/content/en/latest/concepts/gateway_api_extensions/security-policy.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ SecurityPolicy can be attached to Gateway API resources using two targeting mech
3636
1. **Direct Reference (`targetRefs`)**: Explicitly reference specific resources by name and kind.
3737
2. **Label Selection (`targetSelectors`)**: Match resources based on their labels (see [targetSelectors API reference](../../api/extension_types#targetselectors))
3838

39-
The policy applies to all resources that match either targeting method. You can target various Gateway API resource types including `Gateway`, `ListenerSet`, `HTTPRoute`, `GRPCRoute`, and `TCPRoute`.
39+
The policy applies to all resources that match either targeting method. You can target various Gateway API resource types including `Gateway`, `ListenerSet`, `HTTPRoute`, `GRPCRoute`, `TCPRoute`, and `UDPRoute`.
4040

4141
When a SecurityPolicy targets a `ListenerSet`, it applies only to listeners in that ListenerSet. It does not apply to listeners owned directly by the parent Gateway. A `ListenerSet` target can also use `sectionName` to apply the policy to a single listener in the ListenerSet.
4242

4343
Route-level policies apply to the targeted route regardless of whether that route is attached directly to a `Gateway` or through a `ListenerSet`.
4444

45-
Note: TCPRoute support is limited to authorization using client IP allow/deny lists (IP-based authorization). Other SecurityPolicy features such as JWT, API Key, Basic Auth, or OIDC are not applicable to TCPRoute targets.
45+
Note: TCPRoute and UDPRoute support is limited to authorization using client IP allow/deny lists (IP-based authorization). Other SecurityPolicy features such as JWT, API Key, Basic Auth, or OIDC are not applicable to L4 targets, since there is no HTTP request to inspect. For a UDPRoute the client IP is the source address of the datagram, and a denied source is dropped without a reply.
4646

4747
**Important**: A SecurityPolicy can only target resources in the same namespace as the policy itself.
4848

@@ -52,8 +52,8 @@ When multiple SecurityPolicies apply to the same resource, Envoy Gateway resolve
5252

5353
Route-specific policies take precedence first:
5454

55-
1. **Route rule-level policies** (HTTPRoute, GRPCRoute, or TCPRoute with `sectionName` targeting specific rules)
56-
2. **Route-level policies** (HTTPRoute, GRPCRoute, or TCPRoute without `sectionName`)
55+
1. **Route rule-level policies** (HTTPRoute, GRPCRoute, TCPRoute, or UDPRoute with `sectionName` targeting specific rules)
56+
2. **Route-level policies** (HTTPRoute, GRPCRoute, TCPRoute, or UDPRoute without `sectionName`)
5757

5858
After route-specific policies, parent policy precedence depends on how the route is attached.
5959

‎site/content/en/latest/tasks/security/restrict-ip-access.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This task provides instructions for configuring IP allowlist/denylist on Envoy G
66
checks if an incoming request is from an allowed IP address before routing the request to a backend service.
77

88
Envoy Gateway introduces a new CRD called [SecurityPolicy][SecurityPolicy] that allows the user to configure IP allowlist/denylist.
9-
This instantiated resource can be linked to a [Gateway][Gateway], [HTTPRoute][HTTPRoute], [GRPCRoute][GRPCRoute] or [TCPRoute][TCPRoute] resource.
9+
This instantiated resource can be linked to a [Gateway][Gateway], [HTTPRoute][HTTPRoute], [GRPCRoute][GRPCRoute], [TCPRoute][TCPRoute] or [UDPRoute][UDPRoute] resource.
1010

1111
## Prerequisites
1212

@@ -195,3 +195,4 @@ Checkout the [Developer Guide](/community/develop) to get involved in the projec
195195
[HTTPRoute]: https://gateway-api.sigs.k8s.io/reference/api-types/httproute/
196196
[GRPCRoute]: https://gateway-api.sigs.k8s.io/reference/api-types/grpcroute/
197197
[TCPRoute]: https://gateway-api.sigs.k8s.io/guides/tcp/
198+
[UDPRoute]: https://gateway-api.sigs.k8s.io/api-types/udproute/

0 commit comments

Comments
 (0)