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

Headers and basic authentication #164

Open
valleedelisle opened this issue Apr 22, 2024 · 2 comments
Open

Headers and basic authentication #164

valleedelisle opened this issue Apr 22, 2024 · 2 comments
Assignees
Labels

Comments

@valleedelisle
Copy link

When we pass K6_PROMETHEUS_RW_PASSWORD/K6_PROMETHEUS_RW_USERNAME coupled with K6_PROMETHEUS_RW_HTTP_HEADERS, the latter will override the credentials. We need to pass a Authorization: Basic xxx header to authenticate.

@bruce-42
Copy link

I can confirm that this problem still exists in k6 version v0.48.0 paired with xk6-output-remote v0.3.1 and the only work-around I have is to base64-encode the username:password and add that as one of the header key/values with Header name "Authorization" and value "Basic ". This is not a good work around for a number of reasons.

@arukiidou
Copy link
Contributor

Is it enough to use this?
https://pkg.go.dev/net/http#Request.SetBasicAuth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants