activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [2/5] activemq-artemis git commit: ARTEMIS-300 deprecate basic security manager
Date Wed, 11 Nov 2015 21:35:49 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security-jaas/src/main/java/org/apache/activemq/artemis/jms/example/JaasSecurityExample.java
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-jaas/src/main/java/org/apache/activemq/artemis/jms/example/JaasSecurityExample.java b/examples/features/standard/security-jaas/src/main/java/org/apache/activemq/artemis/jms/example/JaasSecurityExample.java
deleted file mode 100644
index eae3fdd..0000000
--- a/examples/features/standard/security-jaas/src/main/java/org/apache/activemq/artemis/jms/example/JaasSecurityExample.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.activemq.artemis.jms.example;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.JMSSecurityException;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-import javax.naming.InitialContext;
-
-public class JaasSecurityExample {
-
-   public static void main(final String[] args) throws Exception {
-      boolean result = true;
-      Connection failConnection = null;
-      Connection billConnection = null;
-      Connection andrewConnection = null;
-      Connection frankConnection = null;
-      Connection samConnection = null;
-
-      InitialContext initialContext = null;
-      try {
-         // /Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
-         // Step 2. perform lookup on the topics
-         Topic genericTopic = (Topic) initialContext.lookup("topic/genericTopic");
-         Topic europeTopic = (Topic) initialContext.lookup("topic/europeTopic");
-         Topic usTopic = (Topic) initialContext.lookup("topic/usTopic");
-
-         // Step 3. perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
-
-         // Step 4. Try to create a JMS Connection without user/password. It will fail.
-         try {
-            failConnection = cf.createConnection();
-            result = false;
-         }
-         catch (JMSSecurityException e) {
-            System.out.println("Default user cannot get a connection. Details: " + e.getMessage());
-         }
-
-         // Step 5. bill tries to make a connection using wrong password
-         billConnection = null;
-         try {
-            billConnection = createConnection("bill", "activemq1", cf);
-            result = false;
-         }
-         catch (JMSException e) {
-            System.out.println("User bill failed to connect. Details: " + e.getMessage());
-         }
-
-         // Step 6. bill makes a good connection.
-         billConnection = createConnection("bill", "activemq", cf);
-         billConnection.start();
-
-         // Step 7. andrew makes a good connection.
-         andrewConnection = createConnection("andrew", "activemq1", cf);
-         andrewConnection.start();
-
-         // Step 8. frank makes a good connection.
-         frankConnection = createConnection("frank", "activemq2", cf);
-         frankConnection.start();
-
-         // Step 9. sam makes a good connection.
-         samConnection = createConnection("sam", "activemq3", cf);
-         samConnection.start();
-
-         // Step 10. Check every user can publish/subscribe genericTopics.
-         System.out.println("------------------------Checking permissions on " + genericTopic + "----------------");
-         checkUserSendAndReceive(genericTopic, billConnection, "bill");
-         checkUserSendAndReceive(genericTopic, andrewConnection, "andrew");
-         checkUserSendAndReceive(genericTopic, frankConnection, "frank");
-         checkUserSendAndReceive(genericTopic, samConnection, "sam");
-         System.out.println("-------------------------------------------------------------------------------------");
-
-         System.out.println("------------------------Checking permissions on " + europeTopic + "----------------");
-
-         // Step 11. Check permissions on news.europe.europeTopic for bill: can't send and can't receive
-         checkUserNoSendNoReceive(europeTopic, billConnection, "bill");
-
-         // Step 12. Check permissions on news.europe.europeTopic for andrew: can send but can't receive
-         checkUserSendNoReceive(europeTopic, andrewConnection, "andrew", frankConnection);
-
-         // Step 13. Check permissions on news.europe.europeTopic for frank: can't send but can receive
-         checkUserReceiveNoSend(europeTopic, frankConnection, "frank", andrewConnection);
-
-         // Step 14. Check permissions on news.europe.europeTopic for sam: can't send but can receive
-         checkUserReceiveNoSend(europeTopic, samConnection, "sam", andrewConnection);
-         System.out.println("-------------------------------------------------------------------------------------");
-
-         System.out.println("------------------------Checking permissions on " + usTopic + "----------------");
-
-         // Step 15. Check permissions on news.us.usTopic for bill: can't send and can't receive
-         checkUserNoSendNoReceive(usTopic, billConnection, "bill");
-
-         // Step 16. Check permissions on news.us.usTopic for andrew: can't send and can't receive
-         checkUserNoSendNoReceive(usTopic, andrewConnection, "andrew");
-
-         // Step 17. Check permissions on news.us.usTopic for frank: can both send and receive
-         checkUserSendAndReceive(usTopic, frankConnection, "frank");
-
-         // Step 18. Check permissions on news.us.usTopic for sam: can't send but can receive
-         checkUserReceiveNoSend(usTopic, samConnection, "sam", frankConnection);
-         System.out.println("-------------------------------------------------------------------------------------");
-      }
-      finally {
-         // Step 19. Be sure to close our JMS resources!
-         if (failConnection != null) {
-            failConnection.close();
-         }
-         if (billConnection != null) {
-            billConnection.close();
-         }
-         if (andrewConnection != null) {
-            andrewConnection.close();
-         }
-         if (frankConnection != null) {
-            frankConnection.close();
-         }
-         if (samConnection != null) {
-            samConnection.close();
-         }
-
-         // Also the initialContext
-         if (initialContext != null) {
-            initialContext.close();
-         }
-      }
-   }
-
-   // Check the user can receive message but cannot send message.
-   private static void checkUserReceiveNoSend(final Topic topic,
-                                              final Connection connection,
-                                              final String user,
-                                              final Connection sendingConn) throws JMSException {
-      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageProducer producer = session.createProducer(topic);
-      MessageConsumer consumer = session.createConsumer(topic);
-      TextMessage msg = session.createTextMessage("hello-world-1");
-
-      try {
-         producer.send(msg);
-         throw new IllegalStateException("Security setting is broken! User " + user +
-                                            " can send message [" +
-                                            msg.getText() +
-                                            "] to topic " +
-                                            topic);
-      }
-      catch (JMSException e) {
-         System.out.println("User " + user + " cannot send message [" + msg.getText() + "] to topic: " + topic);
-      }
-
-      // Now send a good message
-      Session session1 = sendingConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      producer = session1.createProducer(topic);
-      producer.send(msg);
-
-      TextMessage receivedMsg = (TextMessage) consumer.receive(2000);
-
-      if (receivedMsg != null) {
-         System.out.println("User " + user + " can receive message [" + receivedMsg.getText() + "] from topic " + topic);
-      }
-      else {
-         throw new IllegalStateException("Security setting is broken! User " + user + " cannot receive message from topic " + topic);
-      }
-
-      session1.close();
-      session.close();
-   }
-
-   // Check the user can send message but cannot receive message
-   private static void checkUserSendNoReceive(final Topic topic,
-                                              final Connection connection,
-                                              final String user,
-                                              final Connection receivingConn) throws JMSException {
-      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageProducer producer = session.createProducer(topic);
-      try {
-         session.createConsumer(topic);
-      }
-      catch (JMSException e) {
-         System.out.println("User " + user + " cannot receive any message from topic " + topic);
-      }
-
-      Session session1 = receivingConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageConsumer goodConsumer = session1.createConsumer(topic);
-
-      TextMessage msg = session.createTextMessage("hello-world-2");
-      producer.send(msg);
-
-      TextMessage receivedMsg = (TextMessage) goodConsumer.receive(2000);
-      if (receivedMsg != null) {
-         System.out.println("User " + user + " can send message [" + receivedMsg.getText() + "] to topic " + topic);
-      }
-      else {
-         throw new IllegalStateException("Security setting is broken! User " + user +
-                                            " cannot send message [" +
-                                            msg.getText() +
-                                            "] to topic " +
-                                            topic);
-      }
-
-      session.close();
-      session1.close();
-   }
-
-   // Check the user has neither send nor receive permission on topic
-   private static void checkUserNoSendNoReceive(final Topic topic,
-                                                final Connection connection,
-                                                final String user) throws JMSException {
-      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      MessageProducer producer = session.createProducer(topic);
-
-      try {
-         session.createConsumer(topic);
-      }
-      catch (JMSException e) {
-         System.out.println("User " + user + " cannot create consumer on topic " + topic);
-      }
-
-      TextMessage msg = session.createTextMessage("hello-world-3");
-      try {
-         producer.send(msg);
-         throw new IllegalStateException("Security setting is broken! User " + user +
-                                            " can send message [" +
-                                            msg.getText() +
-                                            "] to topic " +
-                                            topic);
-      }
-      catch (JMSException e) {
-         System.out.println("User " + user + " cannot send message [" + msg.getText() + "] to topic: " + topic);
-      }
-
-      session.close();
-   }
-
-   // Check the user connection has both send and receive permissions on the topic
-   private static void checkUserSendAndReceive(final Topic topic,
-                                               final Connection connection,
-                                               final String user) throws JMSException {
-      Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-      TextMessage msg = session.createTextMessage("hello-world-4");
-      MessageProducer producer = session.createProducer(topic);
-      MessageConsumer consumer = session.createConsumer(topic);
-      producer.send(msg);
-      TextMessage receivedMsg = (TextMessage) consumer.receive(5000);
-      if (receivedMsg != null) {
-         System.out.println("User " + user + " can send message: [" + msg.getText() + "] to topic: " + topic);
-         System.out.println("User " + user + " can receive message: [" + msg.getText() + "] from topic: " + topic);
-      }
-      else {
-         throw new IllegalStateException("Error! User " + user + " cannot receive the message! ");
-      }
-      session.close();
-   }
-
-   private static Connection createConnection(final String username,
-                                              final String password,
-                                              final ConnectionFactory cf) throws JMSException {
-      return cf.createConnection(username, password);
-   }
-}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-roles.properties b/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 243b341..0000000
--- a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-user=bill,andrew,frank,sam
-europe-user=andrew
-us-user=frank
-news-user=frank,sam
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-users.properties b/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 0a206c6..0000000
--- a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-bill=activemq
-andrew=activemq1
-frank=activemq2
-sam=activemq3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security-jaas/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/security-jaas/src/main/resources/activemq/server0/broker.xml
deleted file mode 100644
index e2dc187..0000000
--- a/examples/features/standard/security-jaas/src/main/resources/activemq/server0/broker.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version='1.0'?>
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xmlns="urn:activemq"
-               xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd">
-
-   <jms xmlns="urn:activemq:jms">
-      <topic name="genericTopic"/>
-
-      <topic name="news.europe.europeTopic"/>
-
-      <topic name="news.us.usTopic"/>
-   </jms>
-
-   <core xmlns="urn:activemq:core">
-
-      <bindings-directory>./data/messaging/bindings</bindings-directory>
-
-      <journal-directory>./data/messaging/journal</journal-directory>
-
-      <large-messages-directory>./data/messaging/largemessages</large-messages-directory>
-
-      <paging-directory>./data/messaging/paging</paging-directory>
-
-      <!-- Acceptors -->
-      <acceptors>
-         <acceptor name="netty-acceptor">tcp://localhost:61616</acceptor>
-      </acceptors>
-
-      <!-- Other config -->
-
-      <security-settings>
-         <!-- any user can have full control of generic topics -->
-         <security-setting match="jms.topic.#">
-            <permission type="createDurableQueue" roles="user"/>
-            <permission type="deleteDurableQueue" roles="user"/>
-            <permission type="createNonDurableQueue" roles="user"/>
-            <permission type="deleteNonDurableQueue" roles="user"/>
-            <permission type="send" roles="user"/>
-            <permission type="consume" roles="user"/>
-         </security-setting>
-
-         <security-setting match="jms.topic.news.europe.#">
-            <permission type="createDurableQueue" roles="user"/>
-            <permission type="deleteDurableQueue" roles="user"/>
-            <permission type="createNonDurableQueue" roles="user"/>
-            <permission type="deleteNonDurableQueue" roles="user"/>
-            <permission type="send" roles="europe-user"/>
-            <permission type="consume" roles="news-user"/>
-         </security-setting>
-
-         <security-setting match="jms.topic.news.us.#">
-            <permission type="createDurableQueue" roles="user"/>
-            <permission type="deleteDurableQueue" roles="user"/>
-            <permission type="createNonDurableQueue" roles="user"/>
-            <permission type="deleteNonDurableQueue" roles="user"/>
-            <permission type="send" roles="us-user"/>
-            <permission type="consume" roles="news-user"/>
-         </security-setting>
-      </security-settings>
-
-   </core>
-</configuration>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security-jaas/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/security-jaas/src/main/resources/jndi.properties b/examples/features/standard/security-jaas/src/main/resources/jndi.properties
deleted file mode 100644
index 0a3b640..0000000
--- a/examples/features/standard/security-jaas/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-topic.topic/genericTopic=genericTopic
-topic.topic/europeTopic=news.europe.europeTopic
-topic.topic/usTopic=news.us.usTopic

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/security/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/security/src/main/resources/activemq/server0/artemis-roles.properties b/examples/features/standard/security/src/main/resources/activemq/server0/artemis-roles.properties
index 09b3f5d..71e672d 100644
--- a/examples/features/standard/security/src/main/resources/activemq/server0/artemis-roles.properties
+++ b/examples/features/standard/security/src/main/resources/activemq/server0/artemis-roles.properties
@@ -14,7 +14,7 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-bill=user
-andrew=europe-user,user
-frank=us-user,news-user,user
-sam=news-user,user
\ No newline at end of file
+user=bill,andrew,frank,sam
+europe-user=andrew
+news-user=frank,sam
+us-user=frank
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/spring-integration/src/main/resources/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/spring-integration/src/main/resources/artemis-roles.properties b/examples/features/standard/spring-integration/src/main/resources/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/spring-integration/src/main/resources/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/spring-integration/src/main/resources/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/spring-integration/src/main/resources/artemis-users.properties b/examples/features/standard/spring-integration/src/main/resources/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/spring-integration/src/main/resources/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
index a67de73..274a8fa 100644
--- a/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
+++ b/examples/features/standard/spring-integration/src/main/resources/spring-jms-beans.xml
@@ -24,7 +24,8 @@ under the License.
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
 
-   <bean id="securityManager" class="org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl">
+   <bean id="securityManager" class="org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager">
+      <constructor-arg value="org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule"/>
       <constructor-arg>
          <bean class="org.apache.activemq.artemis.core.config.impl.SecurityConfiguration">
             <constructor-arg name="users">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties b/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties b/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/broker.xml b/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/broker.xml
index 9a7f87b..4bf6371 100644
--- a/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/broker.xml
+++ b/examples/features/standard/ssl-enabled/src/main/resources/activemq/server0/broker.xml
@@ -39,7 +39,7 @@ under the License.
 
       <!-- Acceptors -->
       <acceptors>
-         <acceptor name="netty-ssl-acceptor">tcp://localhost:5500?sslEnabled=true;keyStorePath=activemq/server0/activemq.example.keystore;keyStorePassword=activemqexample</acceptor>
+         <acceptor name="netty-ssl-acceptor">tcp://localhost:5500?sslEnabled=true;keyStorePath=${data.dir}/../etc/activemq.example.keystore;keyStorePassword=activemqexample</acceptor>
       </acceptors>
 
       <!-- Other config -->

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-roles.properties b/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-users.properties b/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/features/standard/static-selector/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-roles.properties b/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-users.properties b/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/protocols/amqp/proton-ruby/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/protocols/openwire/chat/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/protocols/openwire/chat/src/main/resources/activemq/server0/artemis-roles.properties b/examples/protocols/openwire/chat/src/main/resources/activemq/server0/artemis-roles.properties
index c8f2f3d..94b1329 100644
--- a/examples/protocols/openwire/chat/src/main/resources/activemq/server0/artemis-roles.properties
+++ b/examples/protocols/openwire/chat/src/main/resources/activemq/server0/artemis-roles.properties
@@ -14,7 +14,4 @@
 ## See the License for the specific language governing permissions and
 ## limitations under the License.
 ## ---------------------------------------------------------------------------
-guest=guest
-Chatter1=guest
-Chatter2=guest
-Chatter3=guest
+guest=guest,Chatter1,Chatter2,Chatter3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-roles.properties
----------------------------------------------------------------------
diff --git a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-roles.properties b/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-roles.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-roles.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-users.properties
----------------------------------------------------------------------
diff --git a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-users.properties b/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-users.properties
deleted file mode 100644
index 4e2d44c..0000000
--- a/examples/protocols/stomp/stomp-embedded-interceptor/src/main/resources/activemq/server0/artemis-users.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-guest=guest
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java
index 4a12d9d..1242002 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java
@@ -24,16 +24,15 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-
 import java.util.HashSet;
 import java.util.Set;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
-import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.Queue;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
+import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -100,9 +99,9 @@ public class AutoCreateJmsQueueTest extends JMSTestBase {
 
    @Test
    public void testAutoCreateOnSendToQueueSecurity() throws Exception {
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addRole("guest", "rejectAll");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addRole("guest", "rejectAll");
       Role role = new Role("rejectAll", false, false, false, false, false, false, false);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
@@ -184,9 +183,9 @@ public class AutoCreateJmsQueueTest extends JMSTestBase {
    @Override
    public void setUp() throws Exception {
       super.setUp();
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addRole("guest", "allowAll");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addRole("guest", "allowAll");
       Role role = new Role("allowAll", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
index 3724721..3ecee46 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
@@ -35,11 +35,12 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.config.Configuration;
+import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
 import org.apache.activemq.artemis.core.filter.Filter;
-import org.apache.activemq.artemis.core.journal.RecordInfo;
 import org.apache.activemq.artemis.core.io.SequentialFileFactory;
-import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.apache.activemq.artemis.core.io.nio.NIOSequentialFileFactory;
+import org.apache.activemq.artemis.core.journal.RecordInfo;
+import org.apache.activemq.artemis.core.journal.impl.JournalImpl;
 import org.apache.activemq.artemis.core.paging.cursor.PageSubscription;
 import org.apache.activemq.artemis.core.persistence.OperationContext;
 import org.apache.activemq.artemis.core.persistence.StorageManager;
@@ -62,8 +63,9 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
 import org.apache.activemq.artemis.spi.core.protocol.SessionCallback;
 import org.apache.activemq.artemis.spi.core.remoting.ReadyListener;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.utils.ExecutorFactory;
 import org.apache.activemq.artemis.utils.ReusableLatch;
@@ -93,7 +95,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
 
       Configuration config = createDefaultInVMConfig().setMessageExpiryScanPeriod(10);
 
-      ActiveMQSecurityManager securityManager = new ActiveMQSecurityManagerImpl();
+      ActiveMQSecurityManager securityManager = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), new SecurityConfiguration());
 
       server = addServer(new MyActiveMQServer(config, ManagementFactory.getPlatformMBeanServer(), securityManager));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SecurityFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SecurityFailoverTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SecurityFailoverTest.java
index e5af60e..2564189 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SecurityFailoverTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/failover/SecurityFailoverTest.java
@@ -26,7 +26,7 @@ import org.apache.activemq.artemis.core.config.ha.SharedStoreMasterPolicyConfigu
 import org.apache.activemq.artemis.core.config.ha.SharedStoreSlavePolicyConfiguration;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.impl.InVMNodeManager;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.tests.integration.cluster.util.TestableServer;
 
 public class SecurityFailoverTest extends FailoverTest {
@@ -83,7 +83,7 @@ public class SecurityFailoverTest extends FailoverTest {
       backupConfig = super.createDefaultInVMConfig().clearAcceptorConfigurations().addAcceptorConfiguration(getAcceptorTransportConfiguration(false)).setSecurityEnabled(true).setHAPolicyConfiguration(new SharedStoreSlavePolicyConfiguration()).addConnectorConfiguration(liveConnector.getName(), liveConnector).addConnectorConfiguration(backupConnector.getName(), backupConnector).addClusterConfiguration(basicClusterConnectionConfig(backupConnector.getName(), liveConnector.getName()));
 
       backupServer = createTestableServer(backupConfig);
-      ActiveMQSecurityManagerImpl securityManager = installSecurity(backupServer);
+      ActiveMQJAASSecurityManager securityManager = installSecurity(backupServer);
       securityManager.getConfiguration().setDefaultUser(null);
 
       liveConfig = super.createDefaultInVMConfig().clearAcceptorConfigurations().addAcceptorConfiguration(getAcceptorTransportConfiguration(true)).setSecurityEnabled(true).setHAPolicyConfiguration(new SharedStoreMasterPolicyConfiguration()).addClusterConfiguration(basicClusterConnectionConfig(liveConnector.getName())).addConnectorConfiguration(liveConnector.getName(), liveConnector);
@@ -100,8 +100,8 @@ public class SecurityFailoverTest extends FailoverTest {
    /**
     * @return
     */
-   protected ActiveMQSecurityManagerImpl installSecurity(TestableServer server) {
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getServer().getSecurityManager();
+   protected ActiveMQJAASSecurityManager installSecurity(TestableServer server) {
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getServer().getSecurityManager();
       securityManager.getConfiguration().addUser("a", "b");
       Role role = new Role("arole", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
index d507ce2..c915586 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/interceptors/InterceptorTest.java
@@ -38,6 +38,7 @@ import org.apache.activemq.artemis.api.core.client.ClientSession;
 import org.apache.activemq.artemis.api.core.client.ClientSessionFactory;
 import org.apache.activemq.artemis.api.core.client.ServerLocator;
 import org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl;
+import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
 import org.apache.activemq.artemis.core.protocol.core.Packet;
 import org.apache.activemq.artemis.core.protocol.core.ServerSessionPacketHandler;
 import org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl;
@@ -52,7 +53,7 @@ import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ServerMessage;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.spi.core.protocol.RemotingConnection;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
@@ -440,7 +441,7 @@ public class InterceptorTest extends ActiveMQTestBase {
    public void testInterceptUsernameOnQueues() throws Exception {
 
       SimpleString ANOTHER_QUEUE = QUEUE.concat("another");
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("dumb", "dumber");
       securityManager.getConfiguration().addUser("an", "other");
 
@@ -493,9 +494,9 @@ public class InterceptorTest extends ActiveMQTestBase {
    // This is testing if it's possible to intercept usernames and do some real stuff as users want
    @Test
    public void testInterceptUsernameOnConsumer() throws Exception {
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
-      securityManager.getConfiguration().addUser("dumb", "dumber");
-      securityManager.getConfiguration().addUser("an", "other");
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
+      ((SecurityConfiguration)securityManager.getConfiguration()).addUser("dumb", "dumber");
+      ((SecurityConfiguration)securityManager.getConfiguration()).addUser("an", "other");
 
       server.getRemotingService().addIncomingInterceptor(new InterceptUserOnCreateConsumer());
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/JMSSecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/JMSSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/JMSSecurityTest.java
index 1fd74df..9795dce 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/JMSSecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/JMSSecurityTest.java
@@ -22,7 +22,7 @@ import javax.jms.JMSSecurityRuntimeException;
 import javax.jms.QueueConnection;
 import javax.jms.QueueConnectionFactory;
 
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.junit.Before;
 import org.junit.Test;
@@ -42,7 +42,7 @@ public class JMSSecurityTest extends JMSTestBase {
 
    @Test
    public void testSecurityOnJMSContext() throws Exception {
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("IDo", "Exist");
       try {
          JMSContext ctx = cf.createContext("Idont", "exist");
@@ -57,7 +57,7 @@ public class JMSSecurityTest extends JMSTestBase {
 
    @Test
    public void testCreateQueueConnection() throws Exception {
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("IDo", "Exist");
       try {
          QueueConnection queueC = ((QueueConnectionFactory) cf).createQueueConnection("IDont", "Exist");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
index 64f052c..f8b3b80 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/JMSServerStartStopTest.java
@@ -16,34 +16,35 @@
  */
 package org.apache.activemq.artemis.tests.integration.jms.server;
 
+import javax.jms.Connection;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 import org.apache.activemq.artemis.core.config.FileDeploymentManager;
 import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
+import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 import org.apache.activemq.artemis.jms.server.JMSServerManager;
 import org.apache.activemq.artemis.jms.server.config.impl.FileJMSConfiguration;
 import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManager;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
+import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;
 import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageProducer;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-import java.util.HashSet;
-import java.util.Set;
-
 public class JMSServerStartStopTest extends ActiveMQTestBase {
 
    private static final IntegrationTestLogger log = IntegrationTestLogger.LOGGER;
@@ -65,7 +66,7 @@ public class JMSServerStartStopTest extends ActiveMQTestBase {
       deploymentManager.addDeployable(fileConfiguration);
       deploymentManager.readConfiguration();
 
-      ActiveMQSecurityManager sm = new ActiveMQSecurityManagerImpl();
+      ActiveMQJAASSecurityManager sm = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), new SecurityConfiguration());
 
       ActiveMQServer server = addServer(new ActiveMQServerImpl(fc, sm));
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
index 977511d..10cc376 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityManagementWithConfiguredAdminUserTest.java
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.artemis.tests.integration.management;
 
+import java.util.Set;
+
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
 import org.apache.activemq.artemis.core.settings.HierarchicalRepository;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.junit.Test;
 
-import java.util.Set;
-
 public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManagementTestBase {
 
    // Constants -----------------------------------------------------
@@ -81,7 +81,7 @@ public class SecurityManagementWithConfiguredAdminUserTest extends SecurityManag
       ActiveMQServer server = addServer(ActiveMQServers.newActiveMQServer(config, false));
       server.start();
       HierarchicalRepository<Set<Role>> securityRepository = server.getSecurityRepository();
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser(validAdminUser, validAdminPassword);
       securityManager.getConfiguration().addUser(invalidAdminUser, invalidAdminPassword);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java
index 19fd6cf..98ee6f7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/SecurityNotificationTest.java
@@ -33,7 +33,7 @@ import org.apache.activemq.artemis.core.security.CheckType;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServers;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.tests.util.RandomUtil;
 import org.junit.Assert;
@@ -93,7 +93,7 @@ public class SecurityNotificationTest extends ActiveMQTestBase {
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);
       server.getSecurityRepository().addMatch(address.toString(), roles);
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addRole("guest", "roleCanNotCreateQueue");
 
       SecurityNotificationTest.flush(notifConsumer);
@@ -133,7 +133,7 @@ public class SecurityNotificationTest extends ActiveMQTestBase {
 
       notifQueue = RandomUtil.randomSimpleString();
 
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("admin", "admin");
       securityManager.getConfiguration().addUser("guest", "guest");
       securityManager.getConfiguration().setDefaultUser("guest");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java
index 5d65894..675574e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/OpenWireTestBase.java
@@ -29,9 +29,6 @@ import java.util.Set;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.TransportConfiguration;
 import org.apache.activemq.artemis.api.jms.management.JMSServerControl;
-import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
-import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
-import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.registry.JndiBindingRegistry;
 import org.apache.activemq.artemis.core.security.Role;
@@ -40,7 +37,10 @@ import org.apache.activemq.artemis.core.settings.impl.AddressSettings;
 import org.apache.activemq.artemis.jms.server.config.ConnectionFactoryConfiguration;
 import org.apache.activemq.artemis.jms.server.config.impl.ConnectionFactoryConfigurationImpl;
 import org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
+import org.apache.activemq.artemis.tests.integration.management.ManagementControlHelper;
+import org.apache.activemq.artemis.tests.unit.util.InVMNamingContext;
+import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.After;
 import org.junit.Before;
 
@@ -75,7 +75,7 @@ public class OpenWireTestBase extends ActiveMQTestBase {
       extraServerConfig(serverConfig);
 
       if (enableSecurity) {
-         ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+         ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
          securityManager.getConfiguration().addRole("openwireSender", "sender");
          securityManager.getConfiguration().addUser("openwireSender", "SeNdEr");
          //sender cannot receive

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
index 883c6a6..13d1560 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/ActiveMQMessageHandlerSecurityTest.java
@@ -20,12 +20,13 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.concurrent.CountDownLatch;
 
+import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
 import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.ra.ActiveMQResourceAdapter;
 import org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.junit.Test;
 
 public class ActiveMQMessageHandlerSecurityTest extends ActiveMQRATestBase {
@@ -37,6 +38,8 @@ public class ActiveMQMessageHandlerSecurityTest extends ActiveMQRATestBase {
 
    @Test
    public void testSimpleMessageReceivedOnQueueWithSecurityFails() throws Exception {
+      SecurityConfiguration emptyConfiguration = new SecurityConfiguration();
+      ((ActiveMQJAASSecurityManager)server.getSecurityManager()).setConfiguration(emptyConfiguration);
       ActiveMQResourceAdapter qResourceAdapter = newResourceAdapter();
       MyBootstrapContext ctx = new MyBootstrapContext();
       qResourceAdapter.start(ctx);
@@ -61,7 +64,7 @@ public class ActiveMQMessageHandlerSecurityTest extends ActiveMQRATestBase {
 
    @Test
    public void testSimpleMessageReceivedOnQueueWithSecuritySucceeds() throws Exception {
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("testuser", "testpassword");
       securityManager.getConfiguration().addRole("testuser", "arole");
       Role role = new Role("arole", false, true, false, false, false, false, false);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/JMSContextTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/JMSContextTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/JMSContextTest.java
index 70c31f4..0fc7416 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/JMSContextTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/JMSContextTest.java
@@ -29,8 +29,8 @@ import org.apache.activemq.artemis.ra.ActiveMQRAConnectionFactoryImpl;
 import org.apache.activemq.artemis.ra.ActiveMQRAConnectionManager;
 import org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory;
 import org.apache.activemq.artemis.ra.ActiveMQResourceAdapter;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.artemis.service.extensions.ServiceUtils;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -51,7 +51,7 @@ public class JMSContextTest extends ActiveMQRATestBase {
    public void setUp() throws Exception {
       useDummyTransactionManager();
       super.setUp();
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("testuser", "testpassword");
       securityManager.getConfiguration().addUser("guest", "guest");
       securityManager.getConfiguration().setDefaultUser("guest");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTest.java
index a1cf442..10723a5 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTest.java
@@ -52,7 +52,7 @@ import org.apache.activemq.artemis.ra.ActiveMQRASession;
 import org.apache.activemq.artemis.ra.ActiveMQResourceAdapter;
 import org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapper;
 import org.apache.activemq.artemis.service.extensions.xa.ActiveMQXAResourceWrapperImpl;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 import org.apache.activemq.artemis.utils.VersionLoader;
 import org.junit.After;
@@ -76,7 +76,7 @@ public class OutgoingConnectionTest extends ActiveMQRATestBase {
    @Before
    public void setUp() throws Exception {
       super.setUp();
-      ActiveMQSecurityManagerImpl securityManager = (ActiveMQSecurityManagerImpl) server.getSecurityManager();
+      ActiveMQJAASSecurityManager securityManager = (ActiveMQJAASSecurityManager) server.getSecurityManager();
       securityManager.getConfiguration().addUser("testuser", "testpassword");
       securityManager.getConfiguration().addUser("guest", "guest");
       securityManager.getConfiguration().setDefaultUser("guest");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java
index 313f682..a1abc48 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/ra/OutgoingConnectionTestJTA.java
@@ -28,7 +28,6 @@ import javax.jms.Queue;
 import javax.jms.QueueConnection;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-
 import java.util.HashSet;
 import java.util.Set;
 
@@ -44,8 +43,8 @@ import org.apache.activemq.artemis.ra.ActiveMQRAConnectionFactoryImpl;
 import org.apache.activemq.artemis.ra.ActiveMQRAConnectionManager;
 import org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory;
 import org.apache.activemq.artemis.ra.ActiveMQResourceAdapter;
-import org.apache.activemq.artemis.spi.core.security.ActiveMQSecurityManagerImpl;
 import org.apache.activemq.artemis.service.extensions.ServiceUtils;
+import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -67,11 +66,11 @@ public class OutgoingConnectionTestJTA extends ActiveMQRATestBase {
    public void setUp() throws Exception {
       useDummyTransactionManager();
       super.setUp();
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addUser("testuser", "testpassword");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addRole("testuser", "arole");
-      ((ActiveMQSecurityManagerImpl) server.getSecurityManager()).getConfiguration().addRole("guest", "arole");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addUser("testuser", "testpassword");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addUser("guest", "guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().setDefaultUser("guest");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addRole("testuser", "arole");
+      ((ActiveMQJAASSecurityManager) server.getSecurityManager()).getConfiguration().addRole("guest", "arole");
       Role role = new Role("arole", true, true, true, true, true, true, true);
       Set<Role> roles = new HashSet<Role>();
       roles.add(role);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
index f5aeec5..e37414e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LDAPSecurityTest.java
@@ -335,8 +335,7 @@ public class LDAPSecurityTest extends AbstractLdapTestUnit {
    }
 
    private ActiveMQServer getActiveMQServer() {
-      ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager();
-      securityManager.setConfigurationName("LDAPLogin");
+      ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager("LDAPLogin");
       Configuration configuration = new ConfigurationImpl().setSecurityEnabled(true).addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()))
          .setJournalDirectory(ActiveMQTestBase.getJournalDir(testDir, 0, false))
          .setBindingsDirectory(ActiveMQTestBase.getBindingsDir(testDir, 0, false))

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/c40ab128/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LegacyLDAPSecuritySettingPluginTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LegacyLDAPSecuritySettingPluginTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LegacyLDAPSecuritySettingPluginTest.java
index 89de0e9..48f98bb 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LegacyLDAPSecuritySettingPluginTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/security/LegacyLDAPSecuritySettingPluginTest.java
@@ -300,8 +300,7 @@ public class LegacyLDAPSecuritySettingPluginTest extends AbstractLdapTestUnit {
          .setAuthentication("simple")
          .populateSecurityRoles();
 
-      ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager();
-      securityManager.setConfigurationName("LDAPLogin");
+      ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager("LDAPLogin");
       Configuration configuration = new ConfigurationImpl()
          .setSecurityEnabled(true)
          .addAcceptorConfiguration(new TransportConfiguration(InVMAcceptorFactory.class.getCanonicalName()))


Mime
View raw message