-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add basic auth for webui #1313
Add basic auth for webui #1313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
==========================================
- Coverage 80.73% 80.50% -0.24%
==========================================
Files 24 24
Lines 2154 2154
Branches 328 332 +4
==========================================
- Hits 1739 1734 -5
- Misses 330 334 +4
- Partials 85 86 +1
Continue to review full report at Codecov.
|
LGTM, and I do see the use case. The only drawback is that the list of arguments for locust is getting pretty long. Could you find somewhere to add it in the documentation? |
Perhaps also add a test case where no credentials were provided? |
locust/main.py
Outdated
@@ -8,6 +8,7 @@ | |||
import time | |||
|
|||
import gevent | |||
from flask_basicauth import BasicAuth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import doesn't seem to be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and I do see the use case. The only drawback is that the list of arguments for locust is getting pretty long.
Could you find somewhere to add it in the documentation?
I agree but maybe a separate PR though, what do you think ?
… done via the command line option --web-auth. If enabled, then the routes will need to authorised with the correct credentials before they can be accessed.
…m routes. Handle exception in case invalid credentials provided on the command line.
Great! Thanks! |
@anuj-ssharma I want to deprecate (and then remove) the support for basic auth. It relies on Flask-BasicAuth that hasnt been updated for a REALLY long time. Do you have a problem with this? Or maybe you want to update it? |
Added the ability to configure basic auth for the webui. This will be done via the command line option --web-auth. If enabled, then the routes will need to authorised with the correct credentials before they can be accessed