diff options
author | Alan Conway <aconway@apache.org> | 2011-12-06 15:56:40 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2011-12-06 15:56:40 +0000 |
commit | ae0f67263950f41ce6078a9fde79be78d47f4a11 (patch) | |
tree | c2f1105dc677a6739d3faca8e2bb860e12209329 /qpid/cpp/src/tests/InitialStatusMap.cpp | |
parent | 03d03c025427c234fedcfae3126f0092afa0e1e7 (diff) | |
download | qpid-python-ae0f67263950f41ce6078a9fde79be78d47f4a11.tar.gz |
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
Diffstat (limited to 'qpid/cpp/src/tests/InitialStatusMap.cpp')
-rw-r--r-- | qpid/cpp/src/tests/InitialStatusMap.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
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) { |