Add file-based authentication support for CEL and HTTP JSON inputs #47507
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
feat(filebeat): add file auth support for CEL and HTTP JSON inputs
Note
The code is mostly duplicated between httpjson and CELinputs. I considered putting it in a shared location that each could reference, but I didn't see a clear pattern on how to do that. As it isn't much code I've implemented it in each input at the moment.
Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
None. Existing configurations continue to work; the new file auth mechanism is opt-in.
Author's Checklist
How to test this PR locally
/etc/elastic/gh_token_test) containing an invalid secretRelated issues
Use cases
Filebeat reads short-lived (JWT, OAuth, etc.) tokens projected to disk by an external secret manager and refreshes them without restarting the input.
Note
GitHub Copilot was used to generate some code for this PR.