Skip to content

Commit bd62f78

Browse files
jpipkin1kimsauce
andauthored
DOCS-1142 - Token-Based Authentication for Secure HTTPS Log and Metric Sources - Beta (#5918)
* Rough draft * Update upload articles * Add to release note * Update blog-service/2025-10-30-collection.md Co-authored-by: Kim (Sumo Logic) <56411016+kimsauce@users.noreply.github.com> * Update blog-service/2025-10-30-collection.md * Update from review * Changed release note date to Nov 21 2025 * Changed release note date to Nov 24 2025 * Hid OTLP updates * Add beta article for HTTP source auth headers --------- Co-authored-by: Kim (Sumo Logic) <56411016+kimsauce@users.noreply.github.com>
1 parent f38cfda commit bd62f78

File tree

12 files changed

+485
-8
lines changed

12 files changed

+485
-8
lines changed
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
---
2+
id: generate-new-url-with-auth-header
3+
title: Generate a New URL for an HTTP Source with an Auth Header
4+
sidebar_label: Regenerate URL
5+
---
6+
7+
import useBaseUrl from '@docusaurus/useBaseUrl';
8+
9+
<head>
10+
<meta name="robots" content="noindex" />
11+
</head>
12+
13+
<p><a href={useBaseUrl('docs/beta')}><span className="beta">Beta</span></a></p>
14+
15+
Sumo Logic offers secure token-based authentication for the HTTPS Logs and Metrics Source. This capability allows you to authenticate using a unique token in the request header, maintaining the existing HTTPS endpoint behavior while adding token validation per source. Obtain the token to use in an auth header when you configure an HTTP source or regenerate the URL.
16+
17+
## Generate a new URL for an HTTP source
18+
19+
You can generate a new URL for an HTTP Source at any time. Generating a new URL completely invalidates the old URL.
20+
21+
To generate a new URL:
22+
23+
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the Sumo Logic main menu select **Data Management**, and then under **Data Collection** select **Collection**. You can also click the **Go To...** menu at the top of the screen and select **Collection**.  <br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Collection > Collection**.
24+
1. On the **Manage Collection** page, click **Regenerate URL** next to the HTTP source.<br/><img src={useBaseUrl('img/send-data/regenerate-url.png')} alt="Regenerate URL link" style={{border: '1px solid gray'}} width="800" />
25+
1. In the **HTTP Source Address** dialog box, select one of the following to regenerate the URL where the source data will be stored:
26+
* **Presigned URL**. Select to copy a presigned URL with embedded authentication.<br/><img src={useBaseUrl('img/send-data/generate-new-url-new.png')} alt="Generate New URL" style={{border: '1px solid gray'}} width="600"/>
27+
* **Auth Header**. Select to copy the URL, as well as a separate authorization header that contains an authentication token. This option provides greater security than a presigned URL because placing the authentication token in the authorization header of a request prevents the token from being exposed in the URL.<br/><img src={useBaseUrl('img/send-data/generate-new-url-and-token.png')} alt="Generate New URL and token" style={{border: '1px solid gray'}} width="600"/>
28+
1. Click **Generate**.
29+
1. When asked to confirm the generation, click **OK**.
30+
1. In the resulting dialog box, the newly-generated URL is displayed, as well as the authorization header if you selected **Auth Header**. Copy the URL (and header if applicable) and keep in a safe place.
31+
1. Use the copied URL (and header if appropriate) when you [upload data to your HTTP Logs and Metrics source](/docs/send-data/hosted-collectors/http-source/logs-metrics/#upload-data-to-the-httplogs-and-metrics-source).
32+
33+
:::note
34+
If you see a 401 (failed to authenticate) error message right after generating a new URL, wait a few minutes, then try the new URL again.
35+
:::
36+
37+
## Upload logs to an HTTP source
38+
39+
40+
41+
### Upload log data with a POST request
42+
43+
When you [upload log with a POST request](/docs/send-data/hosted-collectors/http-source/logs-metrics/upload-logs/#upload-log-data-with-a-post-request), keep in mind the following.
44+
45+
To upload log data with a POST request, include the complete data payload as the request body. Any query parameters will be ignored.
46+
47+
:::important
48+
We recommend that the POST data payload have a size, before compression, of 100KB to 1MB. See [data payload considerations](/docs/send-data/hosted-collectors/http-source/logs-metrics/#data-payload-considerations) for details.
49+
:::
50+
51+
* Data payload:
52+
* Data line 1
53+
* Data line 2
54+
* Data line 3
55+
* Method: POST
56+
* URL: <br/>Enter the URL obtained when you configure the HTTP Logs and Metrics Source or when you regenerate the URL. Enter either a presigned URL or a URL to be used with an auth header:
57+
* Presigned URL: `https://[SumoEndpoint]/receiver/v1/http/[UniqueHTTPCollectorCode]` <br/>where
58+
* [SumoEndpoint] is your Sumo collection endpoint
59+
* [UniqueHTTPCollectorCode] is the string that follows the last forward slash (`/`) in the upload URL for the HTTP source
60+
* URL used with auth header: `https://[SumoEndpoint]/receiver/v1/http` <br/>where [SumoEndpoint] is your Sumo collection endpoint
61+
* Body
62+
* Data line 1
63+
* Data line 2
64+
* Data line 3
65+
66+
### Supported HTTP Headers
67+
68+
The following parameters can be specified via headers when sending data to an HTTP Source. The settings will apply to all messages in the request. For Source Name, Host, and Category, the header value will override any default value already specified for the source and/or collector.
69+
70+
You can configure your Source to process HTTP Headers into metadata fields. See [HTTP Source fields](/docs/manage/fields) for details.
71+
72+
:::note
73+
Overridden metadata field values are not returned with [Search Autocomplete](/docs/search/get-started-with-search/search-basics/search-autocomplete).
74+
:::
75+
76+
| Setting | Header Name | Header Value |
77+
|:--|:--|:--|
78+
| Compressed data | `Content-Encoding` | Values can be `zstd`, `gzip`, or `deflate`.<br/>Required if you are uploading compressed data. |
79+
| Custom Source Name | `X-Sumo-Name` | Desired source name.<br/>Useful if you want to override the source name configured for the source. |
80+
| Custom Source Host | `X-Sumo-Host` | Desired host name.<br/>Useful if you want to override the source host configured for the source. |
81+
| Custom Source Category | `X-Sumo-Category` | Desired source category.<br/>Useful if you want to override the source category configured for the source. |
82+
| Fields as custom metadata | `X-Sumo-Fields` | [Fields](/docs/manage/fields) need to be in a comma separated list of key-value pairs. |
83+
| Token authentication | `x-sumo-token` | Token to be used for authentication in an authorization header. Obtain the token when you select **Auth Header** when you [configure the HTTP Logs and Metrics Source](/docs/send-data/hosted-collectors/http-source/logs-metrics/#configure-an-httplogs-and-metrics-source), or when you [regenerate the URL](/docs/send-data/hosted-collectors/http-source/generate-new-url/). |
84+
85+
### Command line examples
86+
87+
:::note
88+
Data is ingested according to the configured [processing rules](/docs/send-data/collection/processing-rules). Messages blocked by filters will not be ingested.
89+
:::
90+
91+
#### cURL
92+
93+
When using cURL to POST data from a file: 
94+
95+
* Make sure to use the -T parameter to specify the file path, not -d. The -d parameter causes new lines to be removed from the content, which will interfere with message boundary detection.
96+
* Make sure that each line in the file follows the format specified by the Content-Type header for the HTTP request.
97+
* Enter the URL (and auth header if applicable) obtained when you [configured the HTTP Logs and Metrics Source](/docs/send-data/hosted-collectors/http-source/logs-metrics/#configure-an-httplogs-and-metrics-source) or when you [regenerate the URL](/docs/send-data/hosted-collectors/http-source/generate-new-url/). If you use an auth header, enter it in this format: <br/>`-H "x-sumo-token: [TokenString]"`
98+
99+
**POST upload**
100+
101+
Presigned URL:
102+
```bash
103+
curl -v -X POST -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]
104+
```
105+
URL with auth header:
106+
```bash
107+
curl -v -X POST -H "x-sumo-token: [TokenString]" -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http
108+
```
109+
110+
**POST upload (gzip compressed data)** 
111+
112+
Presigned URL:
113+
```bash
114+
curl -v -X POST -H 'Content-Encoding:gzip' -T [local_file_name.gz] https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]
115+
```
116+
117+
URL with auth header:
118+
```bash
119+
curl -v -X POST -H 'Content-Encoding:gzip' -H "x-sumo-token: [TokenString]" -T [local_file_name.gz] https://collectors.sumologic.com/receiver/v1/http
120+
```
121+
122+
**POST upload with custom Source Category**
123+
124+
Presigned URL:
125+
```bash
126+
curl -v -X POST -H 'X-Sumo-Category:myNewCategory' -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]
127+
```
128+
129+
URL with auth header:
130+
```bash
131+
curl -v -X POST -H 'X-Sumo-Category:myNewCategory' -H "x-sumo-token: [TokenString]" -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http
132+
```
133+
134+
**POST upload with custom Fields**
135+
136+
Presigned URL:
137+
```bash
138+
curl -v -X POST -H 'X-Sumo-Fields:environment=dev,cluster=k8s' -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]
139+
```
140+
URL with auth header:
141+
```bash
142+
curl -v -X POST -H 'X-Sumo-Fields:environment=dev,cluster=k8s' -H "x-sumo-token: [TokenString]" -T [local_file_name] https://collectors.sumologic.com/receiver/v1/http
143+
```
144+
145+
#### PowerShell
146+
147+
**POST upload**
148+
149+
In the following examples when a URL is used with an auth header, `$headers` is defined as follows:
150+
151+
```bash
152+
$headers = @{
153+
Authorization="x-sumo-token: [TokenString]"
154+
Content='application/json'
155+
}
156+
```
157+
158+
Presigned URL:
159+
```bash
160+
Invoke-WebRequest -Method POST -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]'
161+
```
162+
163+
URL with auth header:
164+
```bash
165+
Invoke-WebRequest -Method POST -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http' -Headers $headers
166+
```
167+
168+
**POST upload (gzip compressed data)** 
169+
170+
Presigned URL:
171+
```bash
172+
Invoke-WebRequest -Method POST -Headers @{'Content-Encoding' = 'gzip'} -InFile [local_file_name.gz] 'https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]'
173+
```
174+
175+
URL with auth header:
176+
```bash
177+
Invoke-WebRequest -Method POST -Headers @{'Content-Encoding' = 'gzip'} -InFile [local_file_name.gz] 'https://collectors.sumologic.com/receiver/v1/http' -Headers $headers
178+
```
179+
180+
**POST upload with custom Source Category**
181+
182+
Presigned URL:
183+
```bash
184+
Invoke-WebRequest -Method POST -Headers @{'X-Sumo-Category' = 'myCustomCategory'} -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]'
185+
```
186+
187+
URL with auth header:
188+
```bash
189+
Invoke-WebRequest -Method POST -Headers @{'X-Sumo-Category' = 'myCustomCategory'} -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http' -Headers $headers
190+
```
191+
192+
**POST upload with custom Field**
193+
194+
Presigned URL:
195+
```bash
196+
Invoke-WebRequest -Method POST -Headers @{'X-Sumo-Fields' = 'environment=dev'} -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http/[UniqueHTTPCollectorCode]'
197+
```
198+
199+
URL with auth header:
200+
```bash
201+
Invoke-WebRequest -Method POST -Headers @{'X-Sumo-Fields' = 'environment=dev'} -InFile [local_file_name] 'https://collectors.sumologic.com/receiver/v1/http' -Headers $headers
202+
```

docs/send-data/hosted-collectors/http-source/generate-new-url.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,35 @@ You can generate a new URL for an HTTP Source at any time. Generating a new UR
1111
To generate a new URL:
1212

1313
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the Sumo Logic main menu select **Data Management**, and then under **Data Collection** select **Collection**. You can also click the **Go To...** menu at the top of the screen and select **Collection**.  <br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Collection > Collection**.
14-
1. On the **Manage Collection** page, click **Regenerate URL** next to the HTTP source.<br/> <img src={useBaseUrl('img/send-data/regenerate-url.png')} alt="HTTPregenURL"/>
15-
1. In the **HTTP Source Address** dialog box, click **Generate**.<br/> <img src={useBaseUrl('img/send-data/generate-new-url.png')} alt="http_source_dialog_generate.png" width="350"/>
14+
1. On the **Manage Collection** page, click **Regenerate URL** next to the HTTP source.<br/><img src={useBaseUrl('img/send-data/regenerate-url.png')} alt="Regenerate URL link" style={{border: '1px solid gray'}} width="800" />
15+
1. In the **HTTP Source Address** dialog box, click **Generate**.<br/> <img src={useBaseUrl('img/send-data/generate-new-url.png')} alt="http_source_dialog_generate.png" width="350"/>
16+
1. When asked to confirm the generation, click **OK**.
17+
1. In the **HTTP Source Address** dialog box, the new URL is displayed. Copy and paste the URL, then click **OK**.<br/> <img src={useBaseUrl('img/send-data/http_source_dialog_with_button.png')} alt="http_source_dialog_generate.png" width="350"/>
18+
19+
:::note
20+
If you see a 401 (failed to authenticate) error message right after generating a new URL, wait a few minutes, then try the new URL again.
21+
:::
22+
23+
<!-- Per DCOS-1266, for GA replace the contents of this article with the following:
24+
25+
You can generate a new URL for an HTTP Source at any time. Generating a new URL completely invalidates the old URL.
26+
27+
Sumo Logic offers secure token-based authentication for the HTTPS Logs and Metrics Source. This capability allows you to authenticate using a unique token in the request header, maintaining the existing HTTPS endpoint behavior while adding token validation per source. Obtain the token to use in an auth header when you configure an HTTP source or regenerate the URL.
28+
29+
To generate a new URL:
30+
31+
1. [**New UI**](/docs/get-started/sumo-logic-ui). In the Sumo Logic main menu select **Data Management**, and then under **Data Collection** select **Collection**. You can also click the **Go To...** menu at the top of the screen and select **Collection**.  <br/>[**Classic UI**](/docs/get-started/sumo-logic-ui-classic). In the main Sumo Logic menu, select **Manage Data > Collection > Collection**.
32+
1. On the **Manage Collection** page, click **Regenerate URL** next to the HTTP source.<br/><img src={useBaseUrl('img/send-data/regenerate-url.png')} alt="Regenerate URL link" style={{border: '1px solid gray'}} width="800" />
33+
1. In the **HTTP Source Address** dialog box, select one of the following to regenerate the URL where the source data will be stored:
34+
* **Presigned URL**. Select to copy a presigned URL with embedded authentication.<br/><img src={useBaseUrl('img/send-data/generate-new-url-new.png')} alt="Generate New URL" style={{border: '1px solid gray'}} width="600"/>
35+
* **Auth Header**. Select to copy the URL, as well as a separate authorization header that contains an authentication token. This option provides greater security than a presigned URL because placing the authentication token in the authorization header of a request prevents the token from being exposed in the URL.<br/><img src={useBaseUrl('img/send-data/generate-new-url-and-token.png')} alt="Generate New URL and token" style={{border: '1px solid gray'}} width="600"/>
36+
1. Click **Generate**.
1637
1. When asked to confirm the generation, click **OK**.
17-
1. In the **HTTP Source Address** dialog box, the new URL is displayed. Copy and paste the URL, then click **OK**.<br/> <img src={useBaseUrl('img/send-data/http_source_dialog_with_button.png')} alt="http_source_dialog_generate.png" width="350"/>
38+
1. In the resulting dialog box, the newly-generated URL is displayed, as well as the authorization header if you selected **Auth Header**. Copy the URL (and header if applicable) and keep in a safe place.
39+
1. Use the copied URL (and header if appropriate) when you [upload data to your HTTP Logs and Metrics source](/docs/send-data/hosted-collectors/http-source/logs-metrics/#upload-data-to-the-httplogs-and-metrics-source).
1840
1941
:::note
2042
If you see a 401 (failed to authenticate) error message right after generating a new URL, wait a few minutes, then try the new URL again.
2143
:::
44+
45+
-->

docs/send-data/hosted-collectors/http-source/logs-metrics/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ To configure an HTTP Logs and Metrics Source:
5555
1. When you are finished configuring the Source, click **Save**.
5656
1. When the URL associated with the source is displayed, copy the URL so you can use it to upload data.<br/><img src={useBaseUrl('img/send-data/http-source-address.png')} alt="HTTP Source Address dialog " style={{border: '1px solid gray'}} width="500" />
5757

58+
<!-- Per DOCS-1266, replace the preceding step with the following:
59+
1. In the **HTTP Source Address** dialog box, select one of the following to copy the URL where the source data will be stored:
60+
* **Presigned URL**. Select to copy a presigned URL with embedded authentication.<br/><img src={useBaseUrl('img/send-data/http-source-address-new.png')} alt="HTTP Source Address with presigned URL" style={{border: '1px solid gray'}} width="600"/>
61+
* **Auth Header**. Select to copy the URL, as well as a separate authorization header that contains an authentication token. This option provides greater security than a presigned URL because placing the authentication token in the authorization header of a request prevents the token from being exposed in the URL.<br/><img src={useBaseUrl('img/send-data/http-source-address-and-auth-header.png')} alt="HTTP Source Address with authorization header" style={{border: '1px solid gray'}} width="600"/>
62+
1. Copy the URL (and header if applicable) and keep in a safe place. You will use the URL in the next step: [Upload data to the HTTP Logs and Metrics Source](#upload-data-to-the-httplogs-and-metrics-source).
63+
1. Click **Done**.
64+
-->
65+
5866
:::note
5967
* Metrics reported with a timestamp older than 24 hours ago or newer than 24 hours in the future from the time they are reported are dropped. Make sure that the Metrics sent to HTTP Endpoint have appropriate timestamps.
6068
* Sumo Logic enforces limits on the volume of metrics and associated metadata you ingest. For more information, see [Data Limits for Metrics](/docs/metrics/manage-metric-volume/data-limits-for-metrics).

0 commit comments

Comments
 (0)