org.apache.qpid.server.security.acl
Class SimpleACLTest
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.qpid.test.utils.QpidTestCase
org.apache.qpid.test.utils.QpidBrokerTestCase
org.apache.qpid.server.security.acl.AbstractACLTestCase
org.apache.qpid.server.security.acl.SimpleACLTest
- All Implemented Interfaces:
- junit.framework.Test, org.apache.qpid.jms.ConnectionListener
- Direct Known Subclasses:
- ExternalACLTest
public class SimpleACLTest
- extends AbstractACLTestCase
Basic access control list tests.
These tests require an access control security plugin to be configured in the broker, and carry out various broker
operations that will succeed or fail depending on the user and virtual host. See the config-systests-acl-setup.xml
configuration file for the SimpleXML version of the ACLs used by the Java broker only, or the various .txt
files in the system tests directory for the external version 3 ACL files used by both the Java and C++ brokers.
This class can be extended and the AbstractACLTestCase.getConfig()
method overridden to run the same tests with a different type
of access control mechanism. Extension classes should differ only in the configuration file used, but extra tests can be
added that are specific to a particular configuration.
The tests perform basic AMQP operations like creating queues or excahnges and publishing and consuming messages, using
JMS to contact the broker.
- See Also:
ExternalACLTest
Fields inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
_broker, _brokerLanguage, _brokerLogPrefix, _brokerOutputStream, _brokerPersistent, _brokers, _configFile, _connectionFactory, _connections, _initialContext, _interleaveBrokerLog, _logger, _output, _outputFile, _testName, BROKER_READY, CONTENT, CPP, DEFAULT_MANAGEMENT_PORT, DEFAULT_MESSAGE_SIZE, DEFAULT_PORT, DEFAULT_SSL_PORT, DEFAULT_VM_PORT, EXTERNAL, INDEX, JAVA, LOGMONITOR_TIMEOUT, QPID_HOME, QpidHome, QUEUE, RECEIVE_TIMEOUT, TOPIC, VM |
Fields inherited from class org.apache.qpid.test.utils.QpidTestCase |
MEMORY_STORE_CLASS_NAME, MS_CLASS_NAME_KEY |
Methods inherited from class org.apache.qpid.server.security.acl.AbstractACLTestCase |
bytesReceived, bytesSent, check403Exception, createConnectionURL, failoverComplete, getConfig, getConnection, getHostList, preFailover, preResubscribe, setUp, setUpACLFile, tearDown, writeACLFile |
Methods inherited from class org.apache.qpid.test.utils.QpidBrokerTestCase |
cleanBroker, createMessage, createNextMessage, drainQueue, getBroker, getBrokerCommand, getClientConnection, getConfigurationStringProperty, getConnection, getConnection, getConnection, getConnectionFactory, getConnectionFactory, getConnectionURL, getInitialContext, getLogger, getManagementPort, getMessageSize, getPort, getPort, getTestConfigFile, getTestQueue, getTestQueueName, getTestVirtualhostsFile, isBroker010, isBroker08, isBrokerStorePersistent, isCppBroker, isExternalBroker, isJavaBroker, makeVirtualHostPersistent, reloadBrokerSecurityConfig, restartBroker, restartBroker, revertLoggingLevels, revertSystemProperties, runBare, saveTestConfiguration, saveTestVirtualhosts, sendMessage, sendMessage, sendMessage, setBrokerEnvironment, setBrokerOnlySystemProperty, setConfigurationProperty, setLoggerLevel, setMessageSize, setSystemProperty, setSystemProperty, setTestClientSystemProperty, startBroker, startBroker, stopBroker, stopBroker |
Methods inherited from class org.apache.qpid.test.utils.QpidTestCase |
getTestProfileMessageStoreClassName, run |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame |
SimpleACLTest
public SimpleACLTest()
testAccessAuthorizedSuccess
public void testAccessAuthorizedSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
Exception
testAccessVhostAuthorisedGuestSuccess
public void testAccessVhostAuthorisedGuestSuccess()
throws IOException,
Exception
- Throws:
IOException
Exception
testAccessNoRightsFailure
public void testAccessNoRightsFailure()
throws Exception
- Throws:
Exception
testClientDeleteQueueSuccess
public void testClientDeleteQueueSuccess()
throws Exception
- Throws:
Exception
testServerDeleteQueueFailure
public void testServerDeleteQueueFailure()
throws Exception
- Throws:
Exception
testClientConsumeFromTempQueueSuccess
public void testClientConsumeFromTempQueueSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
Exception
testClientConsumeFromNamedQueueFailure
public void testClientConsumeFromNamedQueueFailure()
throws NamingException,
Exception
- Throws:
NamingException
Exception
testClientCreateTemporaryQueueSuccess
public void testClientCreateTemporaryQueueSuccess()
throws JMSException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
JMSException
org.apache.qpid.url.URLSyntaxException
Exception
testClientCreateNamedQueueFailure
public void testClientCreateNamedQueueFailure()
throws NamingException,
JMSException,
org.apache.qpid.AMQException,
Exception
- Throws:
NamingException
JMSException
org.apache.qpid.AMQException
Exception
testClientPublishUsingTransactionSuccess
public void testClientPublishUsingTransactionSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
Exception
testClientPublishValidQueueSuccess
public void testClientPublishValidQueueSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
Exception
testClientPublishInvalidQueueSuccess
public void testClientPublishInvalidQueueSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
JMSException,
NamingException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
JMSException
NamingException
Exception
testServerConsumeFromNamedQueueValid
public void testServerConsumeFromNamedQueueValid()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
Exception
testServerConsumeFromNamedQueueInvalid
public void testServerConsumeFromNamedQueueInvalid()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
NamingException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
NamingException
Exception
testServerConsumeFromTemporaryQueue
public void testServerConsumeFromTemporaryQueue()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
NamingException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
NamingException
Exception
testServerCreateNamedQueueValid
public void testServerCreateNamedQueueValid()
throws JMSException,
org.apache.qpid.url.URLSyntaxException,
Exception
- Throws:
JMSException
org.apache.qpid.url.URLSyntaxException
Exception
testServerCreateNamedQueueInvalid
public void testServerCreateNamedQueueInvalid()
throws JMSException,
org.apache.qpid.url.URLSyntaxException,
org.apache.qpid.AMQException,
NamingException,
Exception
- Throws:
JMSException
org.apache.qpid.url.URLSyntaxException
org.apache.qpid.AMQException
NamingException
Exception
testServerCreateTemporaryQueueInvalid
public void testServerCreateTemporaryQueueInvalid()
throws NamingException,
Exception
- Throws:
NamingException
Exception
testServerCreateAutoDeleteQueueInvalid
public void testServerCreateAutoDeleteQueueInvalid()
throws NamingException,
JMSException,
org.apache.qpid.AMQException,
Exception
- Throws:
NamingException
JMSException
org.apache.qpid.AMQException
Exception
testServerPublishUsingTransactionSuccess
public void testServerPublishUsingTransactionSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
JMSException,
NamingException,
Exception
- This test uses both the cilent and sender to validate that the Server is able to publish to a temporary queue.
The reason the client must be involved is that the Server is unable to create its own Temporary Queues.
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
JMSException
NamingException
Exception
testServerPublishInvalidQueueSuccess
public void testServerPublishInvalidQueueSuccess()
throws org.apache.qpid.AMQException,
org.apache.qpid.url.URLSyntaxException,
JMSException,
NamingException,
Exception
- Throws:
org.apache.qpid.AMQException
org.apache.qpid.url.URLSyntaxException
JMSException
NamingException
Exception
Licensed to the Apache Software Foundation