Skip to content

Commit eeada69

Browse files
[AAP] Add Envoy Gateway Integration page (#32718)
* envoy gateway page * fix links * add compat * update setup integrations * update doc version * update aap sections * fix some file naming * Apply suggestions from code review incorp minor edits --------- Co-authored-by: Michael Cretzman <58786311+michaelcretzman@users.noreply.github.com>
1 parent cb6c7ec commit eeada69

File tree

5 files changed

+319
-3
lines changed

5 files changed

+319
-3
lines changed

content/en/security/application_security/setup/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Learn how to enable App and API Protection on all the following supported platfo
3535
{{< appsec-integrations >}}
3636
{{< appsec-integration name="NGINX" avatar="nginx" link="./nginx" >}}
3737
{{< appsec-integration name="Envoy" avatar="envoy" link="./envoy" >}}
38-
{{< appsec-integration name="Istio" avatar="istio" link="./istio" >}}
3938
{{< /appsec-integrations >}}
4039

4140
## Hosts
@@ -52,6 +51,7 @@ Learn how to enable App and API Protection on all the following supported platfo
5251
{{< appsec-integrations >}}
5352
{{< appsec-integration name="Kubernetes" avatar="kubernetes" link="./kubernetes" >}}
5453
{{< appsec-integration name="Istio" avatar="istio" link="./istio" >}}
54+
{{< appsec-integration name="Envoy Gateway" avatar="envoy" link="./envoy-gateway" >}}
5555
{{< appsec-integration name="Gateway API" src="integrations_logos/gateway-api_avatar.svg" link="./gateway-api" >}}
5656
{{< /appsec-integrations >}}
5757

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Envoy Gateway Compatibility Requirements
3+
code_lang: envoy-gateway
4+
type: multi-code-lang
5+
code_lang_weight: 40
6+
---
7+
8+
The following table lists App and API Protection capabilities for the Envoy Gateway integration according to the specified Datadog External Processor image version:
9+
10+
| App and API Protection capability | Minimum Datadog External Processor image version |
11+
|------------------------------------------------|---------------------------------------------------|
12+
| Threat Detection | v2.4.0 |
13+
| Threat Protection | v2.4.0 |
14+
| Customize response to blocked requests | v2.4.0 |
15+
| Non blocking asynchronous mode (observability) | not supported |
16+
| API Security | v2.4.0 |
17+
| App and API Protection Standalone | v2.4.0 |
18+
| Automatic user activity event tracking | not supported |
19+
20+
### Body processing support
21+
22+
The Datadog External Processor service supports the processing of request and response bodies for the following payload types:
23+
24+
| Payload type | Minimum Datadog External Processor image version |
25+
|--------------|---------------------------------------------------|
26+
| JSON | v2.4.0 |
27+
28+
## Envoy Gateway version support
29+
30+
### Supported Envoy Gateway versions
31+
32+
Envoy Gateway relies on Envoy Proxy and the Gateway API, and runs within a Kubernetes cluster. Datadog supports only non‑EOL Envoy Gateway versions; see the official [Envoy Gateway Compatibility Matrix][1] for the current list of supported versions and upstream dependencies (Envoy Proxy, Gateway API, Kubernetes).
33+
34+
35+
### Envoy version support
36+
37+
The Datadog Envoy integration for App and API Protection relies on features that might not be present in every Envoy version. The following table shows which Envoy versions support each feature.
38+
39+
| Feature | Minimum Envoy version |
40+
|---------|-----------------------|
41+
| External Processing Filter | v1.27.0 |
42+
| Observability mode | v1.30.0 |
43+
44+
## Datadog Envoy Gateway integration support
45+
46+
<div class="alert alert-info">The Datadog Envoy Gateway integration for App and API Protection is in Preview.</div>
47+
48+
Only the Linux version and both the amd64 and arm64 architectures are supported.
49+
50+
<div class="alert alert-info">If you would like to see support added for any of
51+
the unsupported capabilities, let us know! Fill out <a
52+
href="https://forms.gle/gHrxGQMEnAobukfn7">this short form to send
53+
details</a>.</div>
54+
55+
[1]: https://gateway.envoyproxy.io/news/releases/matrix/

content/en/security/application_security/setup/compatibility/istio.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The Datadog External Processor service supports the processing of request and re
2929

3030
### Supported Envoy Versions
3131

32-
Istios data plane is based on Envoy. The following table shows the relationship between Istio versions and their corresponding Envoy release branches:
32+
Istio's data plane is based on Envoy. The following table shows the relationship between Istio versions and their corresponding Envoy release branches:
3333

3434
| Istio version | Envoy release branch |
3535
|---------------|----------------------|
Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
---
2+
title: Enabling App and API Protection for Envoy Gateway
3+
code_lang: envoy-gateway
4+
code_lang_weight: 50
5+
further_reading:
6+
- link: 'https://github.com/DataDog/dd-trace-go/tree/main/contrib/envoyproxy/go-control-plane/cmd/serviceextensions'
7+
tag: "Source Code"
8+
text: "Envoy integration source code"
9+
- link: "/security/default_rules/?category=cat-application-security"
10+
tag: "Documentation"
11+
text: "OOTB App and API Protection Rules"
12+
- link: "/security/application_security/troubleshooting"
13+
tag: "Documentation"
14+
text: "Troubleshooting App and API Protection"
15+
---
16+
17+
{{< callout url="#" btn_hidden="true" header="App and API Protection for Envoy Gateway is in Preview" >}}
18+
App and API Protection for Envoy Gateway is in Preview. Use the following instructions to try the preview.
19+
{{< /callout >}}
20+
21+
You can enable Datadog App and API Protection for traffic managed by [Envoy Gateway][1]. The Datadog Envoy Gateway integration allows Datadog to inspect and protect your traffic for threat detection and blocking directly at the edge of your infrastructure.
22+
23+
## Prerequisites
24+
25+
1. A running Kubernetes cluster with [Envoy Gateway][1] installed.
26+
2. The [Datadog Agent is installed and configured][2] in your Kubernetes cluster.
27+
- Ensure [Remote Configuration][3] is enabled and configured to enable blocking attackers through the Datadog UI.
28+
- Ensure [APM is enabled][4] in the Agent to allow the external processor service to send its own traces to the Agent.
29+
- Optionally, enable the [Cluster Agent Admission Controller][5] to automatically inject the Datadog Agent host information to the App and API Protection External Processor service.
30+
31+
## Enabling threat detection
32+
33+
To enable App and API Protection with Envoy Gateway, do the following:
34+
35+
1. Deploying the Datadog External Processor service in your cluster.
36+
2. Configure an `EnvoyExtensionPolicy` that points to the processor service. This will direct traffic from your Envoy Gateway to this service.
37+
38+
### 1. Deploy the Datadog External Processor service
39+
40+
This service is a gRPC server that Envoy communicates with to have requests and responses analyzed by App and API Protection.
41+
42+
Create a Kubernetes Deployment and Service for the Datadog External Processor. It's recommended to deploy this service in a namespace accessible by your Envoy Gateway.
43+
44+
The Datadog External Processor Docker image is available on the [Datadog Go tracer GitHub Registry][6].
45+
46+
Here is an example manifest (`datadog-aap-extproc-service.yaml`):
47+
48+
```yaml
49+
apiVersion: apps/v1
50+
kind: Deployment
51+
metadata:
52+
name: datadog-aap-extproc-deployment
53+
namespace: <your-preferred-namespace> # Change to your preferred namespace, ensure it's resolvable by the Envoy Gateway
54+
labels:
55+
app: datadog-aap-extproc
56+
spec:
57+
replicas: 1 # Adjust replica count based on your load
58+
selector:
59+
matchLabels:
60+
app: datadog-aap-extproc
61+
template:
62+
metadata:
63+
labels:
64+
app: datadog-aap-extproc
65+
spec:
66+
containers:
67+
- name: datadog-aap-extproc-container
68+
image: ghcr.io/datadog/dd-trace-go/service-extensions-callout:v2.4.0 # Replace with the latest released version
69+
ports:
70+
- name: grpc
71+
containerPort: 443 # Default gRPC port for the external processor
72+
- name: health
73+
containerPort: 80 # Default health check port
74+
env:
75+
# Optional: Agent Configuration
76+
# If you enabled the Cluster Agent Admission Controller, you can skip this section as the Agent host information is automatically injected.
77+
# Otherwise, configure the address of your Datadog Agent for the external processor
78+
- name: DD_AGENT_HOST
79+
value: "<your-datadog-agent-service>.<your-datadog-agent-namespace>.svc.cluster.local"
80+
- name: DD_TRACE_AGENT_PORT # Optional if your Agent's trace port is the default 8126
81+
value: "8126"
82+
83+
# Disable TLS for communication between Envoy Gateway and the external processor. Default is true.
84+
# By default, the external processor configuration used by Envoy Gateway is configured to not use TLS.
85+
# You can enable TLS and configure it with DD_SERVICE_EXTENSION_TLS_KEY_FILE and DD_SERVICE_EXTENSION_TLS_CERT_FILE
86+
# and apply a BackendTLSPolicy on the Datadog External Processor Service.
87+
- name: DD_SERVICE_EXTENSION_TLS
88+
value: "false"
89+
90+
readinessProbe:
91+
httpGet:
92+
path: /
93+
port: health
94+
initialDelaySeconds: 5
95+
periodSeconds: 10
96+
livenessProbe:
97+
httpGet:
98+
path: /
99+
port: health
100+
initialDelaySeconds: 15
101+
periodSeconds: 20
102+
---
103+
apiVersion: v1
104+
kind: Service
105+
metadata:
106+
name: datadog-aap-extproc-service # This name will be used in the EnvoyExtensionPolicy configuration
107+
namespace: <your-preferred-namespace> # Change to your preferred namespace, ensure it's resolvable by the Envoy Gateway
108+
labels:
109+
app: datadog-aap-extproc
110+
spec:
111+
ports:
112+
- name: grpc
113+
port: 443
114+
targetPort: grpc
115+
protocol: TCP
116+
selector:
117+
app: datadog-aap-extproc
118+
type: ClusterIP
119+
```
120+
121+
#### Configuration options for the External Processor
122+
123+
The Datadog External Processor exposes some settings:
124+
125+
| Environment variable | Default value | Description |
126+
|-------------------------------------------|---------------------|------------------------------------------------------------------------------------------------------------------------------------------|
127+
| `DD_SERVICE_EXTENSION_HOST` | `0.0.0.0` | gRPC server listening address. |
128+
| `DD_SERVICE_EXTENSION_PORT` | `443` | gRPC server port. |
129+
| `DD_SERVICE_EXTENSION_HEALTHCHECK_PORT` | `80` | HTTP server port for health checks. |
130+
| `DD_SERVICE_EXTENSION_TLS` | `true` | Enable the gRPC TLS layer. |
131+
| `DD_SERVICE_EXTENSION_TLS_KEY_FILE` | `localhost.key` | Change the default gRPC TLS layer key. |
132+
| `DD_SERVICE_EXTENSION_TLS_CERT_FILE` | `localhost.crt` | Change the default gRPC TLS layer certificate. |
133+
| `DD_APPSEC_BODY_PARSING_SIZE_LIMIT` | `10485760` | Maximum size of the bodies to be processed in bytes. If set to `0`, the bodies are not processed. The recommended value is `10485760` (10MB). (To fully enable body processing, the `allowModeOverride` option should also be set in the External Processing filter configuration.) |
134+
| `DD_SERVICE` | `serviceextensions` | Service name shown in the Datadog UI. |
135+
136+
137+
Configure the connection from the external processor to the Datadog Agent using these environment variables:
138+
139+
| Environment variable | Default value | Description |
140+
|----------------------------------------|---------------|----------------------------------------------------------------------------------|
141+
| `DD_AGENT_HOST` | `localhost` | Hostname or IP of your Datadog Agent. |
142+
| `DD_TRACE_AGENT_PORT` | `8126` | Port of the Datadog Agent for trace collection. |
143+
144+
The External Processor is built on top of the [Datadog Go Tracer][7] and inherits all of its environment variables. See [Configuring the Go Tracing Library][8] and [App and API Protection Library Configuration][9].
145+
146+
<div class="alert alert-danger">
147+
<strong>Note:</strong> As the Datadog External Processor is built on top of the Datadog Go Tracer, it generally follows the same release process as the tracer, and its Docker images are tagged with the corresponding tracer version (for example, <code>v2.2.2</code>). In some cases, early release versions might be published between official tracer releases, and these images are tagged with a suffix such as <code>-docker.1</code>.
148+
</div>
149+
150+
### 2. Configure an EnvoyExtensionPolicy
151+
152+
Use an `EnvoyExtensionPolicy` to instruct Envoy Gateway to call the Datadog external processor. You can attach the policy to a Gateway or to specific HTTPRoute/GRPCRoute resources.
153+
154+
This sends all traffic on the selected Gateway to the external processor. Here is an example manifest (`datadog-aap-extproc-eep.yaml`):
155+
156+
```yaml
157+
apiVersion: gateway.envoyproxy.io/v1alpha1
158+
kind: EnvoyExtensionPolicy
159+
metadata:
160+
name: datadog-aap-extproc-eep
161+
namespace: <your-preferred-namespace> # same namespace as the Gateway
162+
spec:
163+
targetRefs:
164+
# Target the entire Gateway
165+
- group: gateway.networking.k8s.io
166+
kind: Gateway
167+
name: <your-gateway-name> # update to your specific gateway name
168+
# Target specific HTTPRoutes/GRPCRoutes
169+
#- group: gateway.networking.k8s.io
170+
# kind: HTTPRoute
171+
# name: <your-http-route-name>
172+
extProc:
173+
- backendRefs:
174+
- group: ""
175+
kind: Service
176+
name: datadog-aap-extproc-service
177+
namespace: <your-preferred-namespace> # namespace of the external processor Service
178+
port: 443
179+
180+
# Optional: Enable fail open mode. Default is false.
181+
# Normally, if the external processor fails or times out, the filter fails and Envoy
182+
# returns a 5xx error to the downstream client. Setting this to true allows requests
183+
# to continue without error if a failure occurs.
184+
failOpen: true
185+
186+
# Optional: Set a timeout by processing message. Default is 200ms.
187+
# There is a maxium of 2 messages per requests with headers only and 4 messages maximum
188+
# with body processing enabled.
189+
# Note: This timeout also includes the data communication between Envoy and the external processor.
190+
# The timeout should be adjusted to accommodate the additional possible processing time.
191+
# Larger payloads will require a longer timeout.
192+
messageTimeout: 200ms
193+
194+
processingMode:
195+
# The external processor can dynamically override the processing mode as needed, instructing
196+
# Envoy to forward request and response bodies to the external processor.
197+
allowModeOverride: true
198+
# Only enable the request and response header modes by default.
199+
request: {}
200+
response: {}
201+
```
202+
203+
#### Cross‑namespace reference
204+
205+
If your external processor `Service` is in a **different namespace** than the policy, add a [ReferenceGrant][10] in the processor’s namespace. For example, you can do this with a manifest such as `datadog-aap-eep-rg.yaml`.
206+
207+
```yaml
208+
apiVersion: gateway.networking.k8s.io/v1beta1
209+
kind: ReferenceGrant
210+
metadata:
211+
name: datadog-aap-eep-rg
212+
namespace: <your-extproc-namespace> # namespace of the external processor Service
213+
spec:
214+
from:
215+
- group: gateway.envoyproxy.io
216+
kind: EnvoyExtensionPolicy
217+
namespace: <your-policy-namespace> # namespace of the EnvoyExtensionPolicy (and the Gateway)
218+
to:
219+
- group: ""
220+
kind: Service
221+
name: datadog-aap-extproc-service
222+
```
223+
224+
### Validation
225+
226+
After applying the policy, traffic through the targeted Gateway/Routes is inspected by App and API Protection.
227+
228+
{{% appsec-getstarted-2-plusrisk %}}
229+
230+
{{< img src="/security/application_security/appsec-getstarted-threat-and-vuln_2.mp4" alt="Video showing Signals explorer and details, and Vulnerabilities explorer and details." video="true" >}}
231+
232+
## Limitations
233+
234+
The Envoy Gateway integration has the following limitations:
235+
236+
* Observability mode (asynchronous analysis) is not available for Envoy Gateway.
237+
238+
For additional details on the Envoy Gateway integration compatibilities, refer to the [Envoy Gateway integration compatibility page][11].
239+
240+
## Further Reading
241+
242+
{{< partial name="whats-next/whats-next.html" >}}
243+
244+
[1]: https://gateway.envoyproxy.io/docs/
245+
[2]: /containers/kubernetes/installation/?tab=datadogoperator
246+
[3]: /agent/remote_config/?tab=helm#enabling-remote-configuration
247+
[4]: /tracing/guide/setting_up_apm_with_kubernetes_service/?tab=datadogoperator
248+
[5]: /tracing/guide/setting_up_apm_with_kubernetes_service/?tab=datadogoperator#cluster-agent-admission-controller
249+
[6]: https://github.com/DataDog/dd-trace-go/pkgs/container/dd-trace-go%2Fservice-extensions-callout
250+
[7]: https://github.com/DataDog/dd-trace-go
251+
[8]: /tracing/trace_collection/library_config/go/
252+
[9]: /security/application_security/policies/library_configuration/
253+
[10]: https://gateway-api.sigs.k8s.io/api-types/referencegrant/
254+
[11]: /security/application_security/setup/compatibility/envoy-gateway

content/en/security/application_security/setup/kubernetes/_index.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ Learn how to set up App and API Protection (AAP) on your Kubernetes services by
2626
<span>Send us a request for your missing environment <a href="https://forms.gle/nMGq2Hhe7Z4sCKdy6">here</a>.</span>
2727
</div>
2828

29+
{{< appsec-integrations >}}
30+
{{< appsec-integration name="Istio" avatar="istio" link="/security/application_security/setup/istio" >}}
31+
{{< appsec-integration name="Envoy Gateway" avatar="envoy" link="/security/application_security/setup/envoy-gateway" >}}
32+
{{< appsec-integration name="Gateway API" src="integrations_logos/gateway-api_avatar.svg" link="/security/application_security/setup/gateway-api" >}}
33+
{{< /appsec-integrations >}}
34+
35+
## Languages
36+
2937
{{< appsec-integrations >}}
3038
{{< appsec-integration name="Python" avatar="python" link="/security/application_security/setup/python/kubernetes" >}}
3139
{{< appsec-integration name="Node.js" avatar="node" link="/security/application_security/setup/nodejs/kubernetes" >}}
@@ -41,7 +49,6 @@ Learn how to set up App and API Protection (AAP) on your Kubernetes services by
4149
{{< appsec-integrations >}}
4250
{{< appsec-integration name="NGINX" avatar="nginx" link="/security/application_security/setup/nginx/kubernetes" >}}
4351
{{< appsec-integration name="Envoy" avatar="envoy" link="/security/application_security/setup/envoy" >}}
44-
{{< appsec-integration name="Istio" avatar="istio" link="/security/application_security/setup/istio" >}}
4552
{{< /appsec-integrations >}}
4653

4754

0 commit comments

Comments
 (0)