From ea851e0d55bf62d7700fe677ec60b5df759d2516 Mon Sep 17 00:00:00 2001 From: Jonathan Robie Date: Wed, 5 Jan 2011 01:46:00 +0000 Subject: Allow any SASL mechanism to be specified in command line options. Previously used a fixed list of SASL mechanisms. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1055267 13f79535-47bb-0310-9956-ffa450edef68 --- tools/src/py/qpid-config | 2 +- tools/src/py/qpid-printevents | 2 +- tools/src/py/qpid-queue-stats | 3 ++- tools/src/py/qpid-route | 2 +- tools/src/py/qpid-stat | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/src/py/qpid-config b/tools/src/py/qpid-config index c8641615f8..ebd3f14aa2 100755 --- a/tools/src/py/qpid-config +++ b/tools/src/py/qpid-config @@ -143,7 +143,7 @@ def OptionsAndArguments(argv): group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="", help="Maximum time to wait for broker connection (in seconds)") group1.add_option("-b", "--bindings", action="store_true", help="Show bindings in queue or exchange list") group1.add_option("-a", "--broker-addr", action="store", type="string", default="localhost:5672", metavar="
", help="Maximum time to wait for broker connection (in seconds)") - group1.add_option("--sasl-mechanism", action="store", choices=["EXTERNAL","ANONYMOUS","PLAIN","CRAM-MD5","DIGEST-MD5","GSSAPI"], metavar="", help="SASL mechanism for authentication. SASL automatically picks the most secure available mechanism - use this option to override.") + group1.add_option("--sasl-mechanism", action="store", type="string", metavar="", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") parser.add_option_group(group1) group2 = OptionGroup(parser, "Options for Adding Exchanges and Queues") diff --git a/tools/src/py/qpid-printevents b/tools/src/py/qpid-printevents index 4a225c69d8..c7f1475ad3 100755 --- a/tools/src/py/qpid-printevents +++ b/tools/src/py/qpid-printevents @@ -78,7 +78,7 @@ def main(argv=None): p = optparse.OptionParser(usage=_usage, description=_description, formatter=JHelpFormatter()) p.add_option("--heartbeats", action="store_true", default=False, help="Use heartbeats.") - p.add_option("--sasl-mechanism", action="store", choices=["EXTERNAL","ANONYMOUS","PLAIN","CRAM-MD5","DIGEST-MD5","GSSAPI"], metavar="", help="SASL mechanism for authentication. SASL automatically picks the most secure available mechanism - use this option to override.") + p.add_option("--sasl-mechanism", action="store", type="string", metavar="", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") p.add_option("--require-connection", action="store_true", help="Raise error if connection can not be established. By default, retries connections that could not be established, which allows events to be printed as brokers start and stop.") p.add_option("--log-level", action="store", choices=["debug", "info", "warn", "error", "critical"], metavar="", help="Logging level for connections") diff --git a/tools/src/py/qpid-queue-stats b/tools/src/py/qpid-queue-stats index 808ea50e6b..54f22dfc42 100755 --- a/tools/src/py/qpid-queue-stats +++ b/tools/src/py/qpid-queue-stats @@ -125,7 +125,8 @@ def main(argv=None): p = optparse.OptionParser() p.add_option('--broker-address','-a', default='localhost' , help='broker-addr is in the form: [username/password@] hostname | ip-address [:] \n ex: localhost, 10.1.1.7:10000, broker-host:10000, guest/guest@localhost') p.add_option('--filter','-f' ,default=None ,help='a list of comma separated queue names (regex are accepted) to show') - p.add_option("--sasl-mechanism", action="store", choices=["EXTERNAL","ANONYMOUS","PLAIN","CRAM-MD5","DIGEST-MD5","GSSAPI"], metavar="", help="SASL mechanism for authentication. SASL automatically picks the most secure available mechanism - use this option to override.") + p.add_option("--sasl-mechanism", action="store", type="string", metavar="", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") + options, arguments = p.parse_args(args=argv) diff --git a/tools/src/py/qpid-route b/tools/src/py/qpid-route index 0e9d405643..2a0d3cef59 100755 --- a/tools/src/py/qpid-route +++ b/tools/src/py/qpid-route @@ -98,7 +98,7 @@ def OptionsAndArguments(argv): parser.add_option("--ack", action="store", type="int", metavar="", help="Acknowledge transfers over the bridge in batches of N") parser.add_option("-t", "--transport", action="store", type="string", default="tcp", metavar="", help="Transport to use for links, defaults to tcp") - parser.add_option("--sasl-mechanism", action="store", choices=["EXTERNAL","ANONYMOUS","PLAIN","CRAM-MD5","DIGEST-MD5","GSSAPI"], metavar="", help="SASL mechanism for authentication. Used when the client connects to the destination broker (not for authentication between the source and destination brokers - that is specified using the [mechanisms] argument to 'add route'). SASL automatically picks the most secure available mechanism - use this option to override.") + parser.add_option("--sasl-mechanism", action="store", type="string", metavar="", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). Used when the client connects to the destination broker (not for authentication between the source and destination brokers - that is specified using the [mechanisms] argument to 'add route'). SASL automatically picks the most secure available mechanism - use this option to override.") opts, encArgs = parser.parse_args(args=argv) diff --git a/tools/src/py/qpid-stat b/tools/src/py/qpid-stat index 9061711987..c062126b7d 100755 --- a/tools/src/py/qpid-stat +++ b/tools/src/py/qpid-stat @@ -52,7 +52,7 @@ def OptionsAndArguments(argv): group1 = OptionGroup(parser, "General Options") group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="", help="Maximum time to wait for broker connection (in seconds)") - group1.add_option("--sasl-mechanism", action="store", choices=["EXTERNAL","ANONYMOUS","PLAIN","CRAM-MD5","DIGEST-MD5","GSSAPI"], metavar="", help="SASL mechanism for authentication. SASL automatically picks the most secure available mechanism - use this option to override.") + group1.add_option("--sasl-mechanism", action="store", type="string", metavar="", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.") parser.add_option_group(group1) group2 = OptionGroup(parser, "Display Options") -- cgit v1.2.1