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

Allow elasticsearch authentication besides encoding credentials into url #72

Closed
varac opened this issue Mar 27, 2017 · 5 comments
Closed

Comments

@varac
Copy link
Contributor

varac commented Mar 27, 2017

Currrently the only way of using credentials to authenticate against an elasticsearch instance is to encode the username+password in the url.
This is bad when run in CI, i.e. gitlab unfortunatly still doesn't support protection against leaking secret variables. URls including credentials leak quite easy.
A better way would be to use a config file or a .netrc file for credentials.

@ionelmc
Copy link
Owner

ionelmc commented Mar 27, 2017

As a workaround you could set addopts=--benchmark-stotage=secretstuff in pytest.ini programmatically.

@varac
Copy link
Contributor Author

varac commented Mar 28, 2017

@ionelmc This doesn't solve the problem because on success, pytest-benchmark will still reveal the url including the credentials:

...
Saved benchmark data to ['https://admin:PASSWORD@elasticsearch.example.org:9200'] to index benchmark as doctype benchmark

@ionelmc
Copy link
Owner

ionelmc commented Mar 28, 2017

Ok then there are two problems here:

  • loading creds from .netrc
  • blanking the output (eg: Saved benchmark data to 'https://***:***@elasticsearch.example.org:9200' to index benchmark as doctype benchmark)

@varac
Copy link
Contributor Author

varac commented Mar 28, 2017

I think latter would be the easiest to do, I'd also be fine with using .netrc as well.

@varac
Copy link
Contributor Author

varac commented Mar 29, 2017

Well on a second thought I'd prefer the .netrc option because it seems cleaner and you don't need to think twice in the future of preventing cred leakage when refactoring/adding features.

drebs added a commit to drebs/pytest-benchmark that referenced this issue Apr 3, 2017
@ionelmc ionelmc closed this as completed Apr 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants