out_http: Added support for http_bearer_token_file option - #12165
out_http: Added support for http_bearer_token_file option#12165fernandoalexandre wants to merge 5 commits into
http_bearer_token_file option#12165Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughAdds file-backed Bearer authentication to ChangesOut_http bearer authentication
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change adds optional bearer-token file authentication for HTTP output; no actionable merge-blocking risk remains based on the supplied evidence. Sequence Diagram(s)sequenceDiagram
participant http_request
participant http_bearer_token_file_auth
participant TokenFile
participant HTTPClient
http_request->>http_bearer_token_file_auth: load bearer token
http_bearer_token_file_auth->>TokenFile: read and trim token
http_bearer_token_file_auth->>HTTPClient: set Authorization header
http_request->>HTTPClient: send request
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/integration/scenarios/out_http/tests/test_out_http_001.py`:
- Around line 249-253: Wrap the service lifecycle in the test around
service.start(), configure_http_response(), and wait_for_requests() with a
try/finally block, and move service.stop() into finally so it always executes on
assertion or timeout failures. Match the cleanup structure used by the rotation
and failure-path tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 74f2aeae-ddb2-4718-91ed-a780af8155c0
📒 Files selected for processing (6)
plugins/out_http/http.cplugins/out_http/http.hplugins/out_http/http_conf.ctests/integration/scenarios/out_http/config/out_http_bearer_token_file.yamltests/integration/scenarios/out_http/tests/test_out_http_001.pytests/runtime/out_http.c
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d843d89f8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
4d843d8 to
9e4d503
Compare
ab901df to
ee7c755
Compare
… allows a bearer token to be used in an Authorization header Signed-off-by: Fernando Alexandre <fernandoalexandre@users.noreply.github.com>
Signed-off-by: Fernando Alexandre <fernandoalexandre@users.noreply.github.com>
Signed-off-by: Fernando Alexandre <fernandoalexandre@users.noreply.github.com>
ee7c755 to
ce1ebcd
Compare
Signed-off-by: Fernando Alexandre <fernandoalexandre@users.noreply.github.com>
Signed-off-by: Fernando Alexandre <fernandoalexandre@users.noreply.github.com>
0da097a to
4e6bc21
Compare
Summary
http_bearer_token_fileoption that allows a bearer token to be used in an Authorization header (Authorization: Bearer <token>)Motivation
In Kubernetes, mounting secrets as files is considered best practice, with widely used for projected tokens and external secret services such as CSI drivers and External Secrets Operator.
Additionally other systems offer similar functionality, for example OpenTelemetry Bearer token extension.
Validation
cmake --build build -j8 && cd tests/integration/ && ./run_tests.py -k bearer_token_token- 4 passedcmake --build build -j8 && cd tests/integration/ && ./run_tests.py -k out_http- 24 passedExample Configuration
Infrastructure deployment
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
N/ARun local packaging test showing all targets (including any new ones) build.N/ASetok-package-testlabel to test for all targets (requires maintainer to do).Documentation
http_bearer_token_fileoption to http fluent-bit-docs#2633Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
Summary by CodeRabbit