From 09f664cdeafae1d9923fe5ce2c4ab3acc7757a61 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 2 Jan 2013 17:35:44 +1300 Subject: Refactor proxy auth a bit - Remove authentication scheme option. We only support basic at the moment - we'll add the option back when we diversify. - Add some meta variables to make printout nicer --- libmproxy/cmdline.py | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) (limited to 'libmproxy/cmdline.py') diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index db1ebf0d..060e0073 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -338,46 +338,29 @@ def common_options(parser): group = parser.add_argument_group( "Proxy Authentication", """ - Specification of which users are allowed to access the proxy and the method used for authenticating them. - If authscheme is specified, one must specify a list of authorized users and their passwords. - In case that authscheme is not specified, or set to None, any list of authorized users will be ignored. - """.strip() - ) - - group.add_argument( - "--authscheme", type=str, - action="store", dest="authscheme", default=None, choices=["none", "basic"], - help=""" - Specify the scheme used by the proxy to identify users. - If not none, requires the specification of a list of authorized users. - This option is ignored if the proxy is in transparent or reverse mode. - """.strip() - + Specify which users are allowed to access the proxy and the method + used for authenticating them. These options are ignored if the + proxy is in transparent or reverse proxy mode. + """ ) - user_specification_group = group.add_mutually_exclusive_group() - - user_specification_group.add_argument( "--nonanonymous", action="store_true", dest="auth_nonanonymous", - help="Allow access to any user as long as a username is specified. Ignores the provided password." + help="Allow access to any user long as a credentials are specified." ) user_specification_group.add_argument( "--singleuser", action="store", dest="auth_singleuser", type=str, - help="Allows access to a single user as specified by the option value. Specify a username and password in the form username:password." + metavar="USER", + help="Allows access to a a single user, specified in the form username:password." ) - user_specification_group.add_argument( "--htpasswd", action="store", dest="auth_htpasswd", type=argparse.FileType('r'), + metavar="PATH", help="Allow access to users specified in an Apache htpasswd file." ) - - - - proxy.certificate_option_group(parser) -- cgit v1.2.3 From 060e3198bca48f327984b2d1d73a5d4592866736 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 6 Jan 2013 01:18:47 +1300 Subject: Remove cert_wait_time flag. We now cater for this by generating certs with a commencement date an hour in the past in netlib. --- libmproxy/cmdline.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libmproxy/cmdline.py') diff --git a/libmproxy/cmdline.py b/libmproxy/cmdline.py index 060e0073..de70bea8 100644 --- a/libmproxy/cmdline.py +++ b/libmproxy/cmdline.py @@ -248,11 +248,6 @@ def common_options(parser): help="Byte size limit of HTTP request and response bodies."\ " Understands k/m/g suffixes, i.e. 3m for 3 megabytes." ) - parser.add_argument( - "--cert-wait-time", type=float, - action="store", dest="cert_wait_time", default=0, - help="Wait for specified number of seconds after a new cert is generated. This can smooth over small discrepancies between the client and server times." - ) parser.add_argument( "--no-upstream-cert", default=False, -- cgit v1.2.3