diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-02-18 23:07:41 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-02-18 23:07:41 +0000 |
| commit | d6f465d6a10b4d1d9ced48a10ae980c98697ff5b (patch) | |
| tree | 69c47633c086c1b0c2f725c37a0acf80cd9fb34a /qpid/java/broker-plugins/amqp-1-0-protocol/src | |
| parent | 0ef258cebe7b0fbb4b1f1c6cbb5c74d24ea6115d (diff) | |
| download | qpid-python-d6f465d6a10b4d1d9ced48a10ae980c98697ff5b.tar.gz | |
QPID-5562 : [Java Broker] make all failed ACL checks throw AccessControlException
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1569552 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/amqp-1-0-protocol/src')
2 files changed, 4 insertions, 17 deletions
diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java index f7e2d2df50..d0e77b4878 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLink_1_0.java @@ -20,6 +20,7 @@ */ package org.apache.qpid.server.protocol.v1_0; +import java.security.AccessControlException; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; @@ -33,7 +34,6 @@ import org.apache.log4j.Logger; import org.apache.qpid.server.model.ExclusivityPolicy; import org.apache.qpid.server.model.LifetimePolicy; import org.apache.qpid.server.model.Queue; -import org.apache.qpid.server.security.QpidSecurityException; import org.apache.qpid.amqp_1_0.transport.DeliveryStateHandler; import org.apache.qpid.amqp_1_0.transport.LinkEndpoint; import org.apache.qpid.amqp_1_0.transport.SendingLinkEndpoint; @@ -64,7 +64,6 @@ import org.apache.qpid.server.queue.AMQQueue; import org.apache.qpid.server.consumer.Consumer; import org.apache.qpid.server.txn.AutoCommitTransaction; import org.apache.qpid.server.txn.ServerTransaction; -import org.apache.qpid.server.util.Action; import org.apache.qpid.server.util.ConnectionScopedRuntimeException; import org.apache.qpid.server.virtualhost.VirtualHost; import org.apache.qpid.server.virtualhost.QueueExistsException; @@ -312,11 +311,6 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS qd = new QueueDestination(queue); } - catch (QpidSecurityException e) - { - _logger.error("Security error", e); - throw new ConnectionScopedRuntimeException(e); - } catch (QueueExistsException e) { _logger.error("A randomly generated temporary queue name collided with an existing queue",e); @@ -357,12 +351,6 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS messageFilter == null ? null : new SimpleFilterManager(messageFilter), Message_1_0.class, name, options); } - catch (QpidSecurityException e) - { - //TODO - _logger.info("Error registering subscription", e); - throw new ConnectionScopedRuntimeException(e); - } catch (MessageSource.ExistingExclusiveConsumer e) { _logger.info("Cannot add a consumer to the destination as there is already an exclusive consumer"); @@ -416,7 +404,7 @@ public class SendingLink_1_0 implements SendingLinkListener, Link_1_0, DeliveryS { _vhost.removeQueue((AMQQueue)_queue); } - catch (QpidSecurityException e) + catch (AccessControlException e) { //TODO _logger.error("Error registering subscription", e); diff --git a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java index 6840c7344a..b96738e0f6 100644 --- a/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java +++ b/qpid/java/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java @@ -20,6 +20,7 @@ */ package org.apache.qpid.server.protocol.v1_0; +import java.security.AccessControlException; import java.text.MessageFormat; import org.apache.log4j.Logger; @@ -39,13 +40,11 @@ import org.apache.qpid.amqp_1_0.type.transport.*; import org.apache.qpid.amqp_1_0.type.transport.Error; import org.apache.qpid.server.model.*; -import org.apache.qpid.server.security.QpidSecurityException; import org.apache.qpid.protocol.AMQConstant; import org.apache.qpid.server.exchange.Exchange; import org.apache.qpid.server.logging.LogSubject; import org.apache.qpid.server.message.MessageDestination; import org.apache.qpid.server.message.MessageSource; -import org.apache.qpid.server.protocol.AMQConnectionModel; import org.apache.qpid.server.protocol.AMQSessionModel; import org.apache.qpid.server.protocol.LinkRegistry; import org.apache.qpid.server.queue.AMQQueue; @@ -380,7 +379,7 @@ public class Session_1_0 implements SessionEventListener, AMQSessionModel<Sessio final AMQQueue tempQueue = queue = _vhost.createQueue(this, attributes ); } - catch (QpidSecurityException e) + catch (AccessControlException e) { //TODO _logger.info("Security error", e); |
