Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upbearer_token_file option not working in kubernetes_sd_configs #5221
Comments
drewboswell
referenced this issue
Feb 14, 2019
Closed
password_file ignored in kubernetes_sd_configs #5210
simonpasquier
added
kind/bug
component/service discovery
labels
Feb 15, 2019
This comment has been minimized.
This comment has been minimized.
|
I suspect that your bearer token file has a trailing |
simonpasquier
referenced this issue
Feb 15, 2019
Merged
discovery/kubernetes: fix support for password_file and bearer_token_file #5211
This comment has been minimized.
This comment has been minimized.
Nope, there is no trailing \n no \r or combination of other evil special chars in the token file. BTW I tested with the Pull-request version, and it still does not work. You should be able to reproduce this extremely easily. Just use any token in a token file and it should break. |
This comment has been minimized.
This comment has been minimized.
|
Ok thanks for the heads-up. I'll try this on monday! |
This comment has been minimized.
This comment has been minimized.
|
I've tried with the latest version of #5211 and the issue goes away. The current version in |
drewboswell commentedFeb 14, 2019
Bug Report
What did you do?
Attempted to use bearer_token_file in stead of plaintext bearer_token in kubernetes_sd_configs
What did you expect to see?
Authorized http calls
What did you see instead? Under which circumstances?
net/http: invalid header field value "Bearer *******************\n" for key Authorization
In kubernetes_sd_configs only:
Environment
System information:
Linux 4.15.0-45-generic x86_64
Prometheus version:
prometheus, version 2.7.1 (branch: HEAD, revision: 62e591f)
build user: root@f9f82868fc43
build date: 20190131-11:16:59
go version: go1.11.5
Prometheus configuration file: