From ae0f67263950f41ce6078a9fde79be78d47f4a11 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 6 Dec 2011 15:56:40 +0000 Subject: QPID-3652: Fix cluster authentication. Only allow brokers that authenticate as the cluster-username to join a cluster. New broker first connects to a cluster broker authenticates as the cluster-username and sends its CPG member ID to the qpid.cluster-credentials exchange. The cluster broker that subsequently acts as updater verifies that the credentials are valid before connecting to give the update. NOTE 1: If you are using an ACL, the cluster-username must be allowed to publish to the qpid.cluster-credentials exchange. E.g. in your ACL file: acl allow foo@QPID publish exchange name=qpid.cluster-credentials NOTE 2: This changes the cluster initialization protocol, you will need to restart the cluster with all new version brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1210989 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/InitialStatusMap.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'qpid/cpp/src/tests/InitialStatusMap.cpp') diff --git a/qpid/cpp/src/tests/InitialStatusMap.cpp b/qpid/cpp/src/tests/InitialStatusMap.cpp index ecbe2d4161..95806737e3 100644 --- a/qpid/cpp/src/tests/InitialStatusMap.cpp +++ b/qpid/cpp/src/tests/InitialStatusMap.cpp @@ -36,21 +36,25 @@ QPID_AUTO_TEST_SUITE(InitialStatusMapTestSuite) typedef InitialStatusMap::Status Status; -Status activeStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet()) { +Status activeStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), + const framing::Array& urls=framing::Array()) +{ return Status(ProtocolVersion(), 0, true, id, STORE_STATE_NO_STORE, Uuid(), - encodeMemberSet(ms)); + encodeMemberSet(ms), urls); } -Status newcomerStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet()) { +Status newcomerStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), + const framing::Array& urls=framing::Array()) +{ return Status(ProtocolVersion(), 0, false, id, STORE_STATE_NO_STORE, Uuid(), - encodeMemberSet(ms)); + encodeMemberSet(ms), urls); } Status storeStatus(bool active, StoreState state, Uuid start=Uuid(), Uuid stop=Uuid(), - const MemberSet& ms=MemberSet()) + const MemberSet& ms=MemberSet(), const framing::Array& urls=framing::Array()) { - return Status(ProtocolVersion(), 0, active, start, state, stop, - encodeMemberSet(ms)); + return Status(ProtocolVersion(), 0, active, start, state, stop, + encodeMemberSet(ms), urls); } QPID_AUTO_TEST_CASE(testFirstInCluster) { -- cgit v1.2.1