summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/amqp-0-10-protocol
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2014-02-13 19:41:22 +0000
committerRobert Godfrey <rgodfrey@apache.org>2014-02-13 19:41:22 +0000
commit08b64b592cb844cbd746b33e5f17c94b2158a115 (patch)
treea46a4a554c3b04bb9109f02a203df370ac5ee6f6 /qpid/java/broker-plugins/amqp-0-10-protocol
parente800236056d84261ca34a849d8767405724de298 (diff)
downloadqpid-python-08b64b592cb844cbd746b33e5f17c94b2158a115.tar.gz
QPID-5551 : replace AMQSecurityException with QpidSecurityException in the broker
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1568015 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/amqp-0-10-protocol')
-rw-r--r--qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
index d3d53504be..3d50da6ed5 100644
--- a/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
+++ b/qpid/java/broker-plugins/amqp-0-10-protocol/src/main/java/org/apache/qpid/server/protocol/v0_10/ServerSessionDelegate.java
@@ -42,6 +42,7 @@ import org.apache.qpid.server.model.UUIDGenerator;
import org.apache.qpid.server.plugin.ExchangeType;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.QueueArgumentsConverter;
+import org.apache.qpid.server.security.QpidSecurityException;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
@@ -301,6 +302,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot subscribe to queue '" + queueName + "' with destination '" + destination);
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
}
}
@@ -786,6 +791,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot declare exchange '" + exchangeName);
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
@@ -898,6 +907,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot delete exchange '" + method.getExchange() );
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
private boolean nameNullOrEmpty(String name)
@@ -992,6 +1005,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot add binding '" + method.getBindingKey());
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
else
{
@@ -1045,6 +1062,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot remove binding '" + method.getBindingKey());
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
}
}
@@ -1272,6 +1293,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot delete '" + method.getQueue());
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
};
final ServerSession s = (ServerSession) session;
@@ -1324,6 +1349,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot declare queue '" + queueName);
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
}
@@ -1401,6 +1430,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot delete queue '" + queueName);
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
}
}
@@ -1432,6 +1465,10 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session, method, e, "Cannot purge queue '" + queueName);
}
+ catch (QpidSecurityException e)
+ {
+ exception(session, method, ExecutionErrorCode.UNAUTHORIZED_ACCESS, e.getMessage());
+ }
}
}
}