summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins
diff options
context:
space:
mode:
authorRobert Gemmell <robbie@apache.org>2014-01-11 21:22:51 +0000
committerRobert Gemmell <robbie@apache.org>2014-01-11 21:22:51 +0000
commit7e6c487fdfebe029b36dc7be0e3e06e99a1b7033 (patch)
tree8e629d8eadb6262520acaf50353ca331154c20b5 /qpid/java/broker-plugins
parent779f500156ed6ec8a3654bdf10e5e2f64d7e93ac (diff)
downloadqpid-python-7e6c487fdfebe029b36dc7be0e3e06e99a1b7033.tar.gz
QPID-5373: move retrieval of the peer Principal into the connection IO thread, retrieving from the NetworkConnection during the AMQP handshak after the SSL handshake must have already been completed.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1557467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
-rwxr-xr-xqpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngine_0_10.java10
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java8
-rw-r--r--qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java5
-rw-r--r--qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java7
4 files changed, 3 insertions, 27 deletions
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngine_0_10.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngine_0_10.java
index 9e41a5234c..b8fcdbfe6d 100755
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngine_0_10.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ProtocolEngine_0_10.java
@@ -60,15 +60,8 @@ public class ProtocolEngine_0_10 extends InputHandler implements ServerProtocol
if(network != null)
{
- setNetworkConnection(network);
+ setNetworkConnection(network, network.getSender());
}
-
-
- }
-
- public void setNetworkConnection(NetworkConnection network)
- {
- setNetworkConnection(network, network.getSender());
}
public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
@@ -77,7 +70,6 @@ public class ProtocolEngine_0_10 extends InputHandler implements ServerProtocol
_connection.setNetworkConnection(network);
_connection.setSender(new Disassembler(wrapSender(sender), MAX_FRAME_SIZE));
- _connection.setPeerPrincipal(_network.getPeerPrincipal());
// FIXME Two log messages to maintain compatibility with earlier protocol versions
_connection.getLogActor().message(ConnectionMessages.OPEN(null, null, null, null, false, false, false, false));
_connection.getLogActor().message(ConnectionMessages.OPEN(null, "0-10", null, null, false, true, false, false));
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java
index 72d6a0832d..b4d591a72f 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerConnection.java
@@ -73,7 +73,6 @@ public class ServerConnection extends Connection implements AMQConnectionModel,
private Port _port;
private AtomicLong _lastIoTime = new AtomicLong();
private boolean _blocking;
- private Principal _peerPrincipal;
private NetworkConnection _networkConnection;
private Transport _transport;
private volatile boolean _stopped;
@@ -529,12 +528,7 @@ public class ServerConnection extends Connection implements AMQConnectionModel,
public Principal getPeerPrincipal()
{
- return _peerPrincipal;
- }
-
- public void setPeerPrincipal(Principal peerPrincipal)
- {
- _peerPrincipal = peerPrincipal;
+ return _networkConnection.getPeerPrincipal();
}
@Override
diff --git a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java
index 5b1e5af7bd..f1dfc52ba4 100644
--- a/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java
+++ b/qpid/java/broker-plugins/amqp-0-8-protocol/src/test/java/org/apache/qpid/server/protocol/v0_8/InternalTestProtocolSession.java
@@ -314,11 +314,6 @@ public class InternalTestProtocolSession extends AMQProtocolEngine implements Pr
}
@Override
- public void setPeerPrincipal(Principal principal)
- {
- }
-
- @Override
public Principal getPeerPrincipal()
{
return null;
diff --git a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java
index b44ed70040..095ac993ae 100644
--- a/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java
+++ b/qpid/java/broker-plugins/websocket/src/main/java/org/apache/qpid/server/transport/websocket/WebSocketProvider.java
@@ -268,14 +268,9 @@ class WebSocketProvider implements AcceptingTransport
}
@Override
- public void setPeerPrincipal(final Principal principal)
- {
- _principal = principal;
- }
-
- @Override
public Principal getPeerPrincipal()
{
+ //TODO: how do we populate this?
return _principal;
}