summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2012-07-09 21:35:38 +0000
committerAlan Conway <aconway@apache.org>2012-07-09 21:35:38 +0000
commitabc2296a258c83e69c5b64ac18f33c4cc2b172c7 (patch)
tree835b541a034ae36b214c3ff564c87cf913268707 /tools
parent1e06f5f3365899f093d7b6b1c62784f7895b4d0b (diff)
downloadqpid-python-abc2296a258c83e69c5b64ac18f33c4cc2b172c7.tar.gz
QPID-4118: HA does not work with authentication and authorization.
- Updated test framework to use credentials - Updated BrokerReplicator to use HA identity to create configuration - Updated documentation with a HA security section. - Updated qpid-ha to take --sasl-mechanism git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1359412 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
-rwxr-xr-xtools/src/py/qpid-ha9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/src/py/qpid-ha b/tools/src/py/qpid-ha
index 38609eef43..6ddde93967 100755
--- a/tools/src/py/qpid-ha
+++ b/tools/src/py/qpid-ha
@@ -46,15 +46,18 @@ class Command:
usage="%s [options] %s\n\n%s"%(name, " ".join(arg_names), help)
self.help = help
self.op=optparse.OptionParser(usage)
- self.op.add_option("-b", "--broker", metavar="<url>", help="Connect to broker at <url>")
+ self.op.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", 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.")
+ self.op.add_option("-b", "--broker", action="store", type="string", default="localhost:5672", metavar="<address>", help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
def execute(self, args):
opts, args = self.op.parse_args(args)
if len(args) != len(self.arg_names)+1:
self.op.print_help()
raise Exception("Wrong number of arguments")
- broker = opts.broker or "localhost:5672"
- connection = Connection.establish(broker, client_properties={"qpid.ha-admin":1})
+ connection = Connection.establish(
+ opts.broker,
+ sasl_mechanisms=opts.sasl_mechanism,
+ client_properties={"qpid.ha-admin":1})
qmf_broker = BrokerAgent(connection)
ha_broker = qmf_broker.getHaBroker()
if not ha_broker: raise Exception("HA module is not loaded on broker at %s"%broker)