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

Adds the ability to read an authorization token from a file #7304

Merged
merged 4 commits into from
Apr 14, 2020

Conversation

M0rdecay
Copy link
Contributor

@M0rdecay M0rdecay commented Apr 9, 2020

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.

Associated Feature Request #7303

closes #7303

@ssoroka
Copy link
Contributor

ssoroka commented Apr 9, 2020

Thanks for the PR, @M0rdecay!
The only part that strikes me as a bit unexpected is the reading from file. Usually bearer tokens aren't that long, and given that we're already expecting the password to be put in the file, it seems like it's not necessary. Was that to primarily to avoid escaping issues? or did you have something else in mind?

@M0rdecay
Copy link
Contributor Author

M0rdecay commented Apr 9, 2020

@ssoroka reading a token from a file solves this problem for us - we need to deliver telegraf to a number of different protected environments when we do not need to know what the token looks like.

A special case is the use of an agent deployment in a k8s cluster to access its API via HTTPS when the token is located in the /run/secrets/kubernetes.io/serviceaccount/token file.

@M0rdecay
Copy link
Contributor Author

M0rdecay commented Apr 9, 2020

This particular case was described in more detail in the #7184.

@danielnelson danielnelson added this to the 1.15.0 milestone Apr 14, 2020
@danielnelson danielnelson added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Apr 14, 2020
@danielnelson danielnelson merged commit 27f0975 into influxdata:master Apr 14, 2020
@M0rdecay M0rdecay deleted the html_bearer branch April 14, 2020 20:29
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
veorlo pushed a commit to GlobalNOC/telegraf that referenced this pull request May 4, 2020
idohalevi pushed a commit to idohalevi/telegraf that referenced this pull request Sep 29, 2020
arstercz pushed a commit to arstercz/telegraf that referenced this pull request Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to specify a file with token for the HTTP input plugin.
3 participants