Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions content/en/containers/kubernetes/integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,37 @@

Configurations set with Kubernetes annotations take precedence over auto-configuration, but auto-configuration takes precedence over configurations set with Datadog Operator or Helm. To use Datadog Operator or Helm to configure an integration in the [Autodiscovery auto-configuration][20] list, you must [disable auto-configuration][22].

## Integrations security

Integrations often need to read configuration files, certificates, or other resources from the filesystem. When file paths come from untrusted configuration providers (for example, pod annotations or external service autodiscovery), there is a risk of path traversal or unauthorized file access.

Check warning on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.autodiscovery

Use 'Autodiscovery' or 'automatic detection' (the former, to refer to Datadog's mechanism for applying integration configurations to containers; the latter, to refer to automatic discovery IN GENERAL) instead of 'autodiscovery'.

Check notice on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

Check warning on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'file system' instead of 'filesystem'.

Check warning on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.autodiscovery

Use 'Autodiscovery' or 'automatic detection' (the former, to refer to Datadog's mechanism for applying integration configurations to containers; the latter, to refer to automatic discovery IN GENERAL) instead of 'autodiscovery'.

Check notice on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

Check warning on line 419 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'file system' instead of 'filesystem'.

To control filesystem access based on the trust level of a configuration provider, set the following parameters in the Agent's `datadog.yaml`:

Check warning on line 421 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'file system' instead of 'filesystem'.

Check warning on line 421 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'file system' instead of 'filesystem'.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `integration_ignore_untrusted_file_params` | bool | `false` | When enabled, integrations ignore configuration parameters that refer to file paths if the configuration provider is not trusted. |

Check warning on line 425 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'see', 'read', or 'follow' instead of 'refer to'.

Check warning on line 425 in content/en/containers/kubernetes/integrations.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.words_case_insensitive

Use 'see', 'read', or 'follow' instead of 'refer to'.
| `integration_file_paths_allowlist` | list | `[]` | List of file paths that integrations are allowed to access, even when provided by an untrusted configuration provider. An empty list means all file paths are allowed. |
| `integration_trusted_providers` | list | `["file", "remote-config"]` | List of configuration providers considered trusted. Any provider not in this list is considered untrusted. By default, local configuration files (`file`) and Datadog Remote Configuration (`remote-config`) are trusted. |
| `integration_security_excluded_checks` | list | `[]` | List of integration names that are excluded from the above security restrictions. |

These options are backwards compatible: the default values preserve existing behavior. To opt in, enable `integration_ignore_untrusted_file_params` and adjust the remaining parameters to match your environment.

Example `datadog.yaml`:

```yaml
integration_ignore_untrusted_file_params: true
integration_file_paths_allowlist:
- /etc/datadog-agent/certs
- /var/run/secrets
integration_trusted_providers:
- file
- remote-config
integration_security_excluded_checks:
- <INTEGRATION_NAME>
```

With this configuration, an integration configured through pod annotations (an untrusted provider) cannot reference file paths outside `/etc/datadog-agent/certs` or `/var/run/secrets`, unless the integration name is listed in `integration_security_excluded_checks`.

## Example: Postgres integration

In this example scenario, you deployed Postgres on Kubernetes. You want to set up and configure the [Datadog-Postgres integration][26]. All of your Postgres containers have container names that contain the string `postgres`.
Expand Down
Loading