Skip to content

Commit c3b9155

Browse files
enhancement(http provider): Add automatic bearer token acquisition in 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
1 parent bdfd146 commit c3b9155

File tree

9 files changed

+1124
-22
lines changed

9 files changed

+1124
-22
lines changed

Cargo.lock

Lines changed: 77 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,10 @@ vrl.workspace = true
414414
wiremock = "0.6.2"
415415
zstd = { version = "0.13.0", default-features = false }
416416

417+
tokio-rustls = "0.23"
418+
rustls = "0.20"
419+
rustls-pemfile = "0.3"
420+
417421
[patch.crates-io]
418422
# The upgrade for `tokio-util` >= 0.6.9 is blocked on https://github.com/vectordotdev/vector/issues/11257.
419423
tokio-util = { git = "https://github.com/vectordotdev/tokio", branch = "tokio-util-0.7.11-framed-read-continue-on-error" }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The `http_client` can now acquire a bearer token using OAuth2 protocol, cache it and refresh before token expires.
2+
OAuth2 and mTLS extension are supported in this implementation.
3+
4+
authors: KowalczykBartek

0 commit comments

Comments
 (0)