Skip to content

feat: Add the custom headers syslog http drain RFC #1228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ZPascal
Copy link
Contributor

@ZPascal ZPascal commented Jun 30, 2025

Description

This proposal introduces support for specifying custom HTTP headers in HTTPS syslog drains for Cloud Foundry's Loggregator system. It enables native, secure integration with third-party logging systems that require authentication via bearer tokens or custom headers, such as Splunk HEC, Datadog, and similar modern log routing solutions.

Involved Working Groups:

@cloudfoundry/toc
@cloudfoundry/wg-app-runtime-platform-logging-and-metrics-approvers
@cloudfoundry/wg-app-runtime-platform-logging-and-metrics-reviewers

@beyhan beyhan requested review from a team, rkoster, beyhan, stephanme, ameowlia and ChrisMcGowan and removed request for a team June 30, 2025 09:03
@beyhan beyhan added toc rfc CFF community RFC labels Jun 30, 2025
@rkoster rkoster moved this from Inbox to In Progress in CF Community Jul 1, 2025
@anita-flegg
Copy link
Contributor

Please ensure that doc updates are included as part of this work.

Copy link
Member

@beyhan beyhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add separate section detailing the proposed changes for the impacted CF component? This helps to involve the relevant wgs for feedback.


We propose the following enhancements:

1. **Extend the syslog drain binding specification** to allow a `headers` field (key-value map).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please provide a link to the current syslog drain binding specification for reference? Additionally, I think we should mention that it should be extended in a backwards compatible way.

Copy link
Contributor

@chombium chombium Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beyhan We don't have a formal Syslog Binding specification except this paragraph in the docs. Of course, the API will be extended in a backward compatible way.

Here are the is the whole flow with the affected components:

  1. An app developer will make a cf cups cli call with a -p parameter which will contain JSON with an object of headers among the other parameters like certificates for mTLS for example.

  2. The Cloud Controller will have store the data in its database. We will have to adjust the syslog_drain_urls_controller from the cloud controller's internal API.

  3. The Syslog Agent will have to be adjusted to use possible set headers for HTTP drains when sending data to a Syslog Server. The Syslog Agent must pass the headers transparently without any modification. It will also possibly do some validation of the HTTP Headers passed if needed. The app developer will be informed about the possible problems with Syslog Drain configuration (we are preparing a PR for that) , the errors will be written into the Syslog Agent's error log and metrics about problematic drains will be emitted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks as a good draft to describe the concept and also mentions the involved CF components. It will be great to incorporate this into the RFC as requested to describe the impacted components.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have documented what the Syslog Agent does here, but we can always improve the docs.


1. **Extend the syslog drain binding specification** to allow a `headers` field (key-value map).
2. Modify Metron Agent and Syslog Adapter components to **inject the custom headers** into outbound HTTPS syslog requests.
3. Implement **validation logic** to block prohibited/unsafe headers (such as `Host`, `Content-Length`).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the proposal is based on user-provided services: I don't see how a validation of the credentials can be implemented by CLI or CF API (beside validating json structure). The validation could happen on the loggregator side, e.g. you implement an block or allow-list for headers. Same as for syslog drain CAs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we cannot validate things except in the Syslog Agent. Everything will be done as the syslog drain CAs (mTLS workflow). See the detailed steps in my comment above.

Copy link
Contributor

@chombium chombium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZPascal Please address the requests from @beyhan and @stephanme and add a description how this feature will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfc CFF community RFC toc
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

5 participants