summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java')
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java27
1 files changed, 13 insertions, 14 deletions
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
index 72dadb736f..072bd6a87f 100644
--- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlTest.java
@@ -33,7 +33,6 @@ import javax.security.auth.Subject;
import junit.framework.TestCase;
-import org.apache.commons.configuration.ConfigurationException;
import org.apache.qpid.server.connection.ConnectionPrincipal;
import org.apache.qpid.server.logging.EventLogger;
import org.apache.qpid.server.logging.EventLoggerProvider;
@@ -70,12 +69,12 @@ public class DefaultAccessControlTest extends TestCase
_plugin = null;
}
- private void setUpGroupAccessControl() throws ConfigurationException
+ private void setUpGroupAccessControl()
{
configureAccessControl(createGroupRuleSet());
}
- private void configureAccessControl(final RuleSet rs) throws ConfigurationException
+ private void configureAccessControl(final RuleSet rs)
{
_plugin = new DefaultAccessControl(rs);
}
@@ -100,7 +99,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* ACL plugin must always abstain if there is no subject attached to the thread.
*/
- public void testNoSubjectAlwaysAbstains() throws ConfigurationException
+ public void testNoSubjectAlwaysAbstains()
{
setUpGroupAccessControl();
final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
@@ -111,7 +110,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that an allow rule expressed with a username allows an operation performed by a thread running
* with the same username.
*/
- public void testUsernameAllowsOperation() throws ConfigurationException
+ public void testUsernameAllowsOperation()
{
setUpGroupAccessControl();
Subject.doAs(TestPrincipalUtils.createTestSubject("user1"), new PrivilegedAction<Object>()
@@ -130,7 +129,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that an allow rule expressed with an <b>ACL groupname</b> allows an operation performed by a thread running
* by a user who belongs to the same group..
*/
- public void testGroupMembershipAllowsOperation() throws ConfigurationException
+ public void testGroupMembershipAllowsOperation()
{
setUpGroupAccessControl();
@@ -143,7 +142,7 @@ public class DefaultAccessControlTest extends TestCase
* Tests that a deny rule expressed with a <b>groupname</b> denies an operation performed by a thread running
* by a user who belongs to the same group.
*/
- public void testGroupMembershipDeniesOperation() throws ConfigurationException
+ public void testGroupMembershipDeniesOperation()
{
setUpGroupAccessControl();
authoriseAndAssertResult(Result.DENIED, "user3", DENIED_GROUP);
@@ -152,7 +151,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that the catch all deny denies the operation and logs with the logging actor.
*/
- public void testCatchAllRuleDeniesUnrecognisedUsername() throws ConfigurationException
+ public void testCatchAllRuleDeniesUnrecognisedUsername()
{
setUpGroupAccessControl();
Subject.doAs(TestPrincipalUtils.createTestSubject("unknown", "unkgroup1", "unkgroup2"),
@@ -179,7 +178,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on any component
*/
- public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -205,7 +204,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on a specified component
*/
- public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenAllAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -305,7 +304,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that a grant access method rule allows any access operation to be performed on a specified component
*/
- public void testAuthoriseAccessMethodWhenSpecifiedAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenSpecifiedAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -342,7 +341,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of all method rights on a method allows a specified operation to be performed on any component
*/
- public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnSpecifiedMethodForAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnSpecifiedMethodForAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -381,7 +380,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of all method rights allows any operation to be performed on any component
*/
- public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnAllMethodsInAllComponents() throws ConfigurationException
+ public void testAuthoriseAccessUpdateMethodWhenAllRightsGrantedOnAllMethodsInAllComponents()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));
@@ -419,7 +418,7 @@ public class DefaultAccessControlTest extends TestCase
/**
* Tests that granting of access method rights with mask allows matching operations to be performed on the specified component
*/
- public void testAuthoriseAccessMethodWhenMatchingAccessOperationsAllowedOnSpecifiedComponent() throws ConfigurationException
+ public void testAuthoriseAccessMethodWhenMatchingAccessOperationsAllowedOnSpecifiedComponent()
{
final RuleSet rs = new RuleSet(mock(EventLoggerProvider.class));