use of org.apache.activemq.security.SimpleAuthorizationMap in project activemq-artemis by apache.
the class SecureDLQTest method createAuthorizationMap.
public static AuthorizationMap createAuthorizationMap() {
DestinationMap readAccess = new DefaultAuthorizationMap();
readAccess.put(new ActiveMQQueue("TEST"), ADMINS);
readAccess.put(new ActiveMQQueue("TEST"), USERS);
readAccess.put(new ActiveMQQueue("ActiveMQ.DLQ"), ADMINS);
DestinationMap writeAccess = new DefaultAuthorizationMap();
writeAccess.put(new ActiveMQQueue("TEST"), ADMINS);
writeAccess.put(new ActiveMQQueue("TEST"), USERS);
writeAccess.put(new ActiveMQQueue("ActiveMQ.DLQ"), ADMINS);
readAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), WILDCARD);
writeAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), WILDCARD);
DestinationMap adminAccess = new DefaultAuthorizationMap();
adminAccess.put(new ActiveMQQueue("TEST"), ADMINS);
adminAccess.put(new ActiveMQQueue("TEST"), USERS);
adminAccess.put(new ActiveMQQueue("ActiveMQ.DLQ"), ADMINS);
adminAccess.put(new ActiveMQTopic("ActiveMQ.Advisory.>"), WILDCARD);
return new SimpleAuthorizationMap(writeAccess, readAccess, adminAccess);
}
use of org.apache.activemq.security.SimpleAuthorizationMap in project activemq-artemis by apache.
the class AuthorizationFromAdminViewTest method createBroker.
private void createBroker() throws Exception {
broker = BrokerFactory.createBroker("broker:(vm://localhost)");
broker.setPersistent(false);
broker.setBrokerName(getName());
AuthorizationPlugin plugin = new AuthorizationPlugin();
plugin.setMap(new SimpleAuthorizationMap());
BrokerPlugin[] plugins = new BrokerPlugin[] { plugin };
broker.setPlugins(plugins);
broker.start();
}
Aggregations