Search in sources :

Example 1 with AuthorizationPlugin

use of org.apache.activemq.security.AuthorizationPlugin 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();
}
Also used : SimpleAuthorizationMap(org.apache.activemq.security.SimpleAuthorizationMap) AuthorizationPlugin(org.apache.activemq.security.AuthorizationPlugin) BrokerPlugin(org.apache.activemq.broker.BrokerPlugin)

Example 2 with AuthorizationPlugin

use of org.apache.activemq.security.AuthorizationPlugin in project activemq-artemis by apache.

the class SecureDLQTest method createBroker.

@Override
protected BrokerService createBroker() throws Exception {
    BrokerService broker = super.createBroker();
    AuthorizationPlugin authorizationPlugin = new AuthorizationPlugin(createAuthorizationMap());
    broker.setPlugins(new BrokerPlugin[] { authorizationPlugin, new SimpleSecurityBrokerSystemTest.SimpleAuthenticationFactory() });
    return broker;
}
Also used : SimpleSecurityBrokerSystemTest(org.apache.activemq.security.SimpleSecurityBrokerSystemTest) AuthorizationPlugin(org.apache.activemq.security.AuthorizationPlugin) BrokerService(org.apache.activemq.broker.BrokerService)

Aggregations

AuthorizationPlugin (org.apache.activemq.security.AuthorizationPlugin)2 BrokerPlugin (org.apache.activemq.broker.BrokerPlugin)1 BrokerService (org.apache.activemq.broker.BrokerService)1 SimpleAuthorizationMap (org.apache.activemq.security.SimpleAuthorizationMap)1 SimpleSecurityBrokerSystemTest (org.apache.activemq.security.SimpleSecurityBrokerSystemTest)1