Skip to content
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

enhancement(http-sink): Add automatic bearer token acquisition for http-sink #20995

Closed

Conversation

KowalczykBartek
Copy link
Contributor

@KowalczykBartek KowalczykBartek commented Aug 3, 2024

This PR intend to be a proof-of-concept for #20635.
Because I have little knowledge about vector and not much more experience in Rust, I started with minimal working implementation to just verify concept (for example, where code responsible for token acquisition should be placed :)), if shape of this change will be more or less ok, I will take care for test, docs and code quality :)

example configuration I used to test this solution.

sources:
  my_source_id:
    scrape_interval_secs: 1
    type: http_client
    endpoint: http://127.0.0.1:9898/logs
    auth:
      strategy: "o_auth2"
      client_id: "some.client.id"
      client_secret: "some.client.secret"
      token_endpoint: "https://some.oauth.system/oauth/token"

sinks:
  out:
    inputs:
      - "my_source_id"
    type: "console"
    encoding:
      codec: "text" 

@KowalczykBartek KowalczykBartek requested a review from a team as a code owner August 3, 2024 22:31
@bits-bot
Copy link

bits-bot commented Aug 3, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added domain: sources Anything related to the Vector's sources domain: sinks Anything related to the Vector's sinks labels Aug 3, 2024
/// Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia.
OAuth2 {
/// Temporibus autem quibusdam et aut officiis debitis.
#[configurable(metadata(docs::examples = "${TOKEN_ENDPOINT}"))]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest prefix the env var names with OAUTH_ or OAUTH2_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: sinks Anything related to the Vector's sinks domain: sources Anything related to the Vector's sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants