Skip to content

Commit

Permalink
enhancement(http provider): Add automatic bearer token acquisition in…
Browse files Browse the repository at this point in the history
… http-client [version 2] (#21583)

* HTTP client auth as trait extension

* Use Client directly

* Unavailable oauth server should not crash vector

* Fix snafu error to by sync + send

* review fixes

* review fixes

* review fixes

* acquire token with oauth2 and mtls as described in rfc

* fix spell issues

* fix review comments

* fix review comments

* fix review comments

* fix review comments

* fix review comments

* vdev fmt

* vdev fmt

* review

* vdev fmt

* changelog

* changelog

* vdev fmt and check rust

* provide test for mtls scenario

* dd-rust-license-tool write

* dd-rust-license-tool write

* review comments

* fixes

* revert to expires_in

* review fixes

* review fixes

* generate-component-docs

* remove http component

* unable to expect a message under windows
  • Loading branch information
KowalczykBartek authored Nov 8, 2024
1 parent ac1e975 commit fb9c5c1
Show file tree
Hide file tree
Showing 9 changed files with 1,120 additions and 22 deletions.
88 changes: 77 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ vrl.workspace = true
wiremock = "0.6.2"
zstd = { version = "0.13.0", default-features = false }

tokio-rustls = "0.23"
rustls = "0.20"
rustls-pemfile = "0.3"

[patch.crates-io]
# The upgrade for `tokio-util` >= 0.6.9 is blocked on https://github.com/vectordotdev/vector/issues/11257.
tokio-util = { git = "https://github.com/vectordotdev/tokio", branch = "tokio-util-0.7.11-framed-read-continue-on-error" }
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The `http_client` can now acquire a bearer token using OAuth2 protocol, cache it and refresh before token expires.
OAuth2 and mTLS extension are supported in this implementation.

authors: KowalczykBartek
Loading

0 comments on commit fb9c5c1

Please sign in to comment.