Skip to content

Commit 3959091

Browse files
maycmlee20agbekodo
andauthored
Add valid tokens for HTTP Server and Splunk HEC sources (#38358)
* add info * small edit * update field and value * fix typo * Apply suggestions from code review Co-authored-by: Josué AGBEKODO <josue.agbekodo@datadoghq.com> Co-authored-by: May Lee <may.lee@datadoghq.com> --------- Co-authored-by: Josué AGBEKODO <josue.agbekodo@datadoghq.com>
1 parent b00a02f commit 3959091

2 files changed

Lines changed: 34 additions & 3 deletions

File tree

content/en/observability_pipelines/sources/http_server.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,33 @@ After you select the HTTP/S Server source in the pipeline UI:
3333
- **Note**: Only enter the identifier for the address. Do **not** enter the actual address.
3434
1. Select your authorization strategy. If you selected {{< ui >}}Plain{{< /ui >}}:
3535
- Enter the identifiers for your HTTP/S Server username and password. If you leave it blank, the [default](#secret-defaults) is used.
36+
1. (Optional) Set up authentication tokens. See [Configure authentication tokens](#configure-authentication-tokens) for details.
3637
1. Select the decoder you want to use on the HTTP messages. Your HTTP client logs must be in this format. **Note**: If you select `bytes` decoding, the raw log is stored in the `message` field.
3738

38-
### Optional TLS settings
39+
### Optional settings
40+
41+
#### Enable TLS
3942

4043
{{% observability_pipelines/tls_settings %}}
4144

4245
{{% observability_pipelines/tls_settings_mtls %}}
4346

47+
#### Configure authentication tokens
48+
49+
If you store tokens as credentials in your HTTP request's authorization header, you can configure the Worker to check if incoming HTTP requests have a valid token. Request events that do not have a valid token are dropped. The Worker can also look up an endpoint path or an IP address instead of a header.
50+
51+
**Note**: You cannot configure authentication tokens with the {{< ui >}}Plain{{< /ui >}} authorization strategy.
52+
53+
To configure authentication tokens, enable the {{< ui >}}Configure authentication tokens{{< /ui >}} toggle:
54+
55+
1. Click {{< ui >}}Manage Tokens{{< /ui >}} and then {{< ui >}}Add Token{{< /ui >}}.
56+
1. Enter the identifier for your token key.<br>**Note**: If you are using environment variables, the environment variable for this token is the identifier you entered prepended with `DD_OP_`.
57+
1. (Optional) Enter a field and value if you want to add additional information to logs successfully authenticated with this specific token.
58+
1. Select the path to token in the {{< ui >}}Path to Token{{< /ui >}} dropdown menu:
59+
- {{< ui >}}Header{{< /ui >}} for an authorization header (optionally, enter the header name)
60+
- {{< ui >}}Address{{< /ui >}} for an IP address
61+
- {{< ui >}}Path{{< /ui >}} for an endpoint path
62+
4463
## Secret defaults
4564

4665
{{% observability_pipelines/set_secrets_intro %}}

content/en/observability_pipelines/sources/splunk_hec.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Use Observability Pipelines' Splunk HTTP Event Collector (HEC) source to receive
2929

3030
Set up this source when you [set up a pipeline][1]. You can set up a pipeline in the [UI][6], using the [API][7], or with [Terraform][8]. The instructions in this section are for setting up the source in the UI.
3131

32-
<div class="alert alert-danger">For Secrets Management: Only enter the identifiers for the Splunk HEC address and, if applicable, the TLS key pass. Do <b>not</b> enter the actual values.</div>
32+
<div class="alert alert-danger">For Secrets Management: Only enter the identifiers for the Splunk HEC address and, if applicable, the TLS key pass and authentication token keys. Do <b>not</b> enter the actual values.</div>
3333

3434
{{% observability_pipelines/secrets_env_var_note %}}
3535

@@ -40,12 +40,24 @@ After you select the Splunk HEC source in the pipeline UI:
4040
- Use a Splunk HEC destination with the {{< ui >}}From Source{{< /ui >}} token strategy.
4141
- Use an Enrichment Table processor to map Splunk HEC tokens from a local file.
4242

43-
### Optional TLS settings
43+
### Optional settings
44+
45+
#### Enable TLS
4446

4547
{{% observability_pipelines/tls_settings %}}
4648

4749
{{% observability_pipelines/tls_settings_mtls %}}
4850

51+
#### Configure authentication tokens
52+
53+
If you store Splunk HEC tokens in your HTTP request's authorization header, you can configure Observability Pipelines to check if incoming HTTP requests have a valid token. Request events that do not have a valid token are dropped.
54+
55+
To configure authentication tokens, enable the {{< ui >}}Configure authentication tokens{{< /ui >}} toggle:
56+
57+
1. Click {{< ui >}}Manage Tokens{{< /ui >}} and then {{< ui >}}Add Token{{< /ui >}}.
58+
1. Enter the identifier for your token key.<br>**Note**: If you are using environment variables, the environment variable for this token is the identifier you entered prepended with `DD_OP_`.
59+
1. (Optional) Enter a field and value if you want to add additional information to logs successfully authenticated with this specific token.
60+
4961
## Secret defaults
5062

5163
{{% observability_pipelines/set_secrets_intro %}}

0 commit comments

Comments
 (0)