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

Support reading auth token from file #20747

Open
nfs950512 opened this issue Jun 26, 2024 · 3 comments · May be fixed by #20138 or #21282
Open

Support reading auth token from file #20747

nfs950512 opened this issue Jun 26, 2024 · 3 comments · May be fixed by #20138 or #21282
Labels
source: http_client Anything `http_client` source related type: feature A value-adding code addition that introduce new functionality.

Comments

@nfs950512
Copy link

nfs950512 commented Jun 26, 2024

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

I am deploying vector in k8s and I am trying to scrape metrics from cadvisor. For that vector would need to be configured to using the content in mounted serviceaccount token file /var/run/secrets/kubernetes.io/serviceaccount/token

equivalent curl command:
curl -k -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" https://kubernetes.default.svc/api/v1/nodes/ns1/proxy/metrics/cadvisor

Vector only supports specifying the token value under auth.token

Attempted Solutions

No response

Proposal

Proposing vector to add an option to read auth.token from a file.

References

No response

Version

No response

@nfs950512 nfs950512 added the type: feature A value-adding code addition that introduce new functionality. label Jun 26, 2024
@jszwedko jszwedko added the source: http_client Anything `http_client` source related label Jun 26, 2024
@jszwedko
Copy link
Member

Thanks @nfs950512 ! There is a PR that started implementing this feature, #20138, with some discussion there.

@nfs950512
Copy link
Author

Appreciated!

@nfs950512 nfs950512 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
@jszwedko jszwedko reopened this Jun 26, 2024
@jszwedko
Copy link
Member

I think we can leave this request open until it is implemented for others to find it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: http_client Anything `http_client` source related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
2 participants