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

Add basic auth capabilities #967

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@ioneyed
Copy link

ioneyed commented Feb 22, 2019

Added basic auth flags '-B' and '--web-auth' to the command line arguments
Enabled basic-auth on the flask application for basic security to the UI

@ioneyed ioneyed changed the title @ioneyed | add basic auth capabilities add basic auth capabilities Feb 22, 2019

@cgoldberg
Copy link
Member

cgoldberg left a comment

This PR is really well done (thanks for including the tests). Could you push an update with the minor fixes I commented on? Then I'll merge it.
Thanks!

@@ -1,4 +1,4 @@
from .core import HttpLocust, Locust, TaskSet, TaskSequence, task, seq_task
from .exception import InterruptTaskSet, ResponseError, RescheduleTaskImmediately

__version__ = "0.9.0"
__version__ = "0.9.1"

This comment has been minimized.

@cgoldberg

cgoldberg Mar 4, 2019

Member

could you revert this line? I'm about to release 0.10.0 and bump the version in master, so this will conflict when it lands.


stats.global_stats.clear_all()
parser = parse_options()[0]
options = parser.parse_args(["--web-auth","john:doe"])[0]

This comment has been minimized.

@cgoldberg

cgoldberg Mar 4, 2019

Member

pep8 (missing whitespace after ',')



def test_index(self):
self.assertEqual(200, requests.get("http://127.0.0.1:%i/?ele=phino" % self.web_port, auth=('john','doe')).status_code)

This comment has been minimized.

@cgoldberg

cgoldberg Mar 4, 2019

Member

pep8 (missing whitespace after ',')

super(TestWebUIAuth, self).tearDown()
self._web_ui_server.stop()


This comment has been minimized.

@cgoldberg

cgoldberg Mar 4, 2019

Member

remove extra newline

@aldenpeterson-wf aldenpeterson-wf changed the title add basic auth capabilities Add basic auth capabilities Mar 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.