-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(sources)!: add custom auth strategy for components with HTTP server #22236
base: master
Are you sure you want to change the base?
Conversation
This adds `custom` auth strategy for components with HTTP server (`http_server`, `datadog_agent`, `opentelemetry`, `prometheus`) besides the default basic auth. This is a breaking change because `strategy` is now required for auth - for existing configurations `strategy: "basic"` needs to be added. Related: vectordotdev#22213
I have made this a breaking change, requiring explicit |
HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an | ||
HTTP header without any additional encryption beyond what is provided by the transport itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HTTP authentication should be used with HTTPS only, as the authentication credentials are passed as an | |
HTTP header without any additional encryption beyond what is provided by the transport itself. | |
Use the HTTP authentication with HTTPS only. The authentication credentials are passed as an | |
HTTP header without any additional encryption beyond what is provided by the transport itself. |
basic: """ | ||
Basic authentication. | ||
|
||
The username and password are concatenated and encoded via [base64][base64]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The username and password are concatenated and encoded via [base64][base64]. | |
The username and password are concatenated and encoded using [base64][base64]. |
Summary
This adds
custom
auth strategy for components with HTTP server (http_server
,datadog_agent
,opentelemetry
,prometheus
) besides the default basic auth. This is a breaking change becausestrategy
is now required for auth - for existing configurationsstrategy: "basic"
needs to be added.Change Type
Is this a breaking change?
How did you test this PR?
Besides the tests added to the codebase, I ran basic tests with
http_server
source component:Tested by making calls via curl:
Does this PR include user facing changes?
Checklist
make check-all
is a good command to run locally. This check isdefined here. Some of these
checks might not be relevant to your PR. For Rust changes, at the very least you should run:
cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo nextest run --workspace
(alternatively, you can runcargo test --all
)Cargo.lock
), pleaserun
dd-rust-license-tool write
to regenerate the license inventory and commit the changes (if any). More details here.References
Related: #22213