Proposed
2025-06-21
- ZPascal
This proposal introduces support for specifying custom HTTP headers in HTTPS syslog drains for Cloud Foundry's Loggregator system. It enables use cases such as integration with third-party logging systems that require authentication via bearer tokens or custom headers, most notably Splunk's Log Observer Connect / HEC (HTTP Event Collector) and similar modern log routing solutions.
Modern logging and Observability platforms increasingly rely on HTTP-based ingestion with authentication mechanisms such as bearer tokens or custom headers. While Loggregator already supports HTTPS drains, there is currently no way to add custom headers, making integration with services like:
- Splunk HEC
- Datadog HTTPS ingestion
- New Relic Logs
- Elastic ingest endpoints
It is difficult or impossible without proxies or sidecar-based workarounds.
Supporting custom headers allows:
- Native integration with services requiring API tokens or custom auth schemes
- Use of standardized mechanisms like
Authorization: Bearer <token>
- Elimination of custom proxies or sidecar containers
- A flexible and extensible pattern for future integrations
We propose the following changes:
- Extend the syslog drain binding specification to allow a
headers
field containing key-value pairs. - Modify the Metron Agent / Syslog Adapter components that handle HTTPS drains to inject the custom headers into outbound HTTPS requests.
- Add validation logic to sanitize and prevent forbidden headers (e.g.
Host
,Content-Length
, etc.). - Include the headers field in drain metadata exposed to platform operators and log system integrators.
{
"drain_url": "https://http-input.splunkcloud.com:443/services/collector/event",
"headers": {
"Authorization": "Bearer abc123xyz",
"X-Splunk-Request-Source": "cloudfoundry"
}
}