qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject svn commit: r1469937 [1/2] - in /qpid/trunk/qpid/java: broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/ broker-plugin...
Date Fri, 19 Apr 2013 16:16:21 GMT
Author: orudyy
Date: Fri Apr 19 16:16:20 2013
New Revision: 1469937

URL: http://svn.apache.org/r1469937
Log:
QPID-4753: move ACL config from broker attribute to a top level entity

Added:
    qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/FileAccessControlProviderAttributeDescriptions.properties
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/action/ListAccessControlProviderAttributes.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/showAclFile.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AccessControlProvider.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/AclFile.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAccessControlProvider.html
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AccessControlProviderRecoverer.java
      - copied, changed from r1469917, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/AccessControlProvider.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderAdapter.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/AccessControlProviderFactory.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/FileAccessControlProviderConstants.java
Modified:
    qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
    qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java
    qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactoryTest.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/controller.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/BrokerRecoverer.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Model.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/plugin/AccessControlFactory.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/AccessControl.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/startup/BrokerRecovererTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/store/ConfigurationEntryStoreTestCase.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/store/JsonConfigurationEntryStoreTest.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/util/BrokerTestHelper.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/VirtualHostImplTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestHttpsTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
    qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/TestBrokerConfiguration.java

Modified: qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControl.java Fri Apr 19 16:16:20 2013
@@ -29,6 +29,7 @@ import javax.security.auth.Subject;
 import org.apache.commons.configuration.ConfigurationException;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.log4j.Logger;
+import org.apache.qpid.server.configuration.IllegalConfigurationException;
 import org.apache.qpid.server.security.Result;
 import org.apache.qpid.server.security.SecurityManager;
 import org.apache.qpid.server.security.AccessControl;
@@ -44,6 +45,7 @@ public class DefaultAccessControl implem
     private static final Logger _logger = Logger.getLogger(DefaultAccessControl.class);
 
     private RuleSet _ruleSet;
+    private File _aclFile;
 
     public DefaultAccessControl(String fileName)
     {
@@ -51,10 +53,8 @@ public class DefaultAccessControl implem
         {
             _logger.debug("Creating AccessControl instance using file: " + fileName);
         }
-        File aclFile = new File(fileName);
 
-        ConfigurationFile configFile = new PlainConfiguration(aclFile);
-        _ruleSet = configFile.load();
+        _aclFile = new File(fileName);
     }
 
     DefaultAccessControl(RuleSet rs) throws ConfigurationException
@@ -62,6 +62,45 @@ public class DefaultAccessControl implem
         _ruleSet = rs;
     }
 
+    public void open()
+    {
+        if(_aclFile != null)
+        {
+            if (!_aclFile.exists())
+            {
+                throw new IllegalConfigurationException("ACL file '" + _aclFile + "' is not found");
+            }
+
+            ConfigurationFile configFile = new PlainConfiguration(_aclFile);
+            _ruleSet = configFile.load();
+        }
+    }
+
+    @Override
+    public void close()
+    {
+        //no-op
+    }
+
+    @Override
+    public void onDelete()
+    {
+        //no-op
+    }
+
+    @Override
+    public void onCreate()
+    {
+        //verify file exists
+        if(_aclFile != null)
+        {
+            if (!_aclFile.exists())
+            {
+                throw new IllegalConfigurationException("ACL file '" + _aclFile + "' is not found");
+            }
+        }
+    }
+
     public Result getDefault()
     {
         return _ruleSet.getDefault();
@@ -119,4 +158,5 @@ public class DefaultAccessControl implem
             return Result.DENIED;
         }
     }
+
 }

Modified: qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactory.java Fri Apr 19 16:16:20 2013
@@ -20,40 +20,60 @@
  */
 package org.apache.qpid.server.security.access.plugins;
 
-import java.io.File;
+import static org.apache.qpid.server.security.access.FileAccessControlProviderConstants.ACL_FILE_PROVIDER_TYPE;
+import static org.apache.qpid.server.security.access.FileAccessControlProviderConstants.PATH;
+import static org.apache.qpid.server.util.MapValueConverter.getStringAttribute;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
 import java.util.Map;
 
 import org.apache.qpid.server.configuration.IllegalConfigurationException;
 import org.apache.qpid.server.plugin.AccessControlFactory;
 import org.apache.qpid.server.security.AccessControl;
+import org.apache.qpid.server.util.ResourceBundleLoader;
 
 public class DefaultAccessControlFactory implements AccessControlFactory
 {
-    public static final String ATTRIBUTE_ACL_FILE = "aclFile";
+    public static final String RESOURCE_BUNDLE = "org.apache.qpid.server.security.access.plugins.FileAccessControlProviderAttributeDescriptions";
+
+    public static final Collection<String> ATTRIBUTES = Collections.<String> unmodifiableList(Arrays.asList(
+            ATTRIBUTE_TYPE,
+            PATH
+            ));
 
-    public AccessControl createInstance(Map<String, Object> aclConfiguration)
+    public AccessControl createInstance(Map<String, Object> attributes)
     {
-        if (aclConfiguration != null)
+        if(attributes == null || !ACL_FILE_PROVIDER_TYPE.equals(attributes.get(ATTRIBUTE_TYPE)))
+        {
+            return null;
+        }
+
+        String path =  getStringAttribute(PATH, attributes, null);
+        if (path == null || "".equals(path.trim()))
         {
-            Object aclFile = aclConfiguration.get(ATTRIBUTE_ACL_FILE);
-            if (aclFile != null)
-            {
-                if (aclFile instanceof String)
-                {
-                    String aclPath = (String) aclFile;
-                    if (!new File(aclPath).exists())
-                    {
-                        throw new IllegalConfigurationException("ACL file '" + aclPath + "' is not found");
-                    }
-                    return new DefaultAccessControl(aclPath);
-                }
-                else
-                {
-                    throw new IllegalConfigurationException("Expected '" + ATTRIBUTE_ACL_FILE + "' attribute value of type String but was " + aclFile.getClass()
-                            + ": " + aclFile);
-                }
-            }
+            throw new IllegalConfigurationException("Path to ACL was not specified!");
         }
-        return null;
+
+        return new DefaultAccessControl(path);
+    }
+
+    @Override
+    public String getType()
+    {
+        return ACL_FILE_PROVIDER_TYPE;
+    }
+
+    @Override
+    public Collection<String> getAttributeNames()
+    {
+        return ATTRIBUTES;
+    }
+
+    @Override
+    public Map<String, String> getAttributeDescriptions()
+    {
+        return ResourceBundleLoader.getResources(RESOURCE_BUNDLE);
     }
 }

Added: qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/FileAccessControlProviderAttributeDescriptions.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/FileAccessControlProviderAttributeDescriptions.properties?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/FileAccessControlProviderAttributeDescriptions.properties (added)
+++ qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/FileAccessControlProviderAttributeDescriptions.properties Fri Apr 19 16:16:20 2013
@@ -0,0 +1,19 @@
+#
+#  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.
+
+path=File location*
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactoryTest.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactoryTest.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/DefaultAccessControlFactoryTest.java Fri Apr 19 16:16:20 2013
@@ -6,7 +6,9 @@ import java.util.Map;
 import java.util.regex.Pattern;
 
 import org.apache.qpid.server.configuration.IllegalConfigurationException;
+import org.apache.qpid.server.model.GroupProvider;
 import org.apache.qpid.server.security.AccessControl;
+import org.apache.qpid.server.security.access.FileAccessControlProviderConstants;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.test.utils.TestFileUtils;
 
@@ -25,8 +27,10 @@ public class DefaultAccessControlFactory
         File aclFile = TestFileUtils.createTempFile(this, ".acl", "ACL ALLOW all all");
         DefaultAccessControlFactory factory = new DefaultAccessControlFactory();
         Map<String, Object> attributes = new HashMap<String, Object>();
-        attributes.put(DefaultAccessControlFactory.ATTRIBUTE_ACL_FILE, aclFile.getAbsolutePath());
+        attributes.put(GroupProvider.TYPE, FileAccessControlProviderConstants.ACL_FILE_PROVIDER_TYPE);
+        attributes.put(FileAccessControlProviderConstants.PATH, aclFile.getAbsolutePath());
         AccessControl acl = factory.createInstance(attributes);
+        acl.open();
 
         assertNotNull("ACL was not created from acl file: " + aclFile.getAbsolutePath(), acl);
     }
@@ -37,33 +41,17 @@ public class DefaultAccessControlFactory
         assertFalse("ACL file " + aclFile.getAbsolutePath() + " actually exists but should not", aclFile.exists());
         DefaultAccessControlFactory factory = new DefaultAccessControlFactory();
         Map<String, Object> attributes = new HashMap<String, Object>();
-        attributes.put(DefaultAccessControlFactory.ATTRIBUTE_ACL_FILE, aclFile.getAbsolutePath());
+        attributes.put(GroupProvider.TYPE, FileAccessControlProviderConstants.ACL_FILE_PROVIDER_TYPE);
+        attributes.put(FileAccessControlProviderConstants.PATH, aclFile.getAbsolutePath());
         try
         {
-            factory.createInstance(attributes);
-            fail("It should not be possible to create ACL from non existing file");
+            AccessControl control = factory.createInstance(attributes);
+            control.open();
+            fail("It should not be possible to create and initialise ACL with non existing file");
         }
         catch (IllegalConfigurationException e)
         {
-            assertTrue("Unexpected exception message", Pattern.matches("ACL file '.*' is not found", e.getMessage()));
-        }
-    }
-
-    public void testCreateInstanceWhenAclFileIsSpecifiedAsNonString()
-    {
-        DefaultAccessControlFactory factory = new DefaultAccessControlFactory();
-        Map<String, Object> attributes = new HashMap<String, Object>();
-        Integer aclFile = new Integer(0);
-        attributes.put(DefaultAccessControlFactory.ATTRIBUTE_ACL_FILE, aclFile);
-        try
-        {
-            factory.createInstance(attributes);
-            fail("It should not be possible to create ACL from Integer");
-        }
-        catch (IllegalConfigurationException e)
-        {
-            assertEquals("Unexpected exception message", "Expected '" + DefaultAccessControlFactory.ATTRIBUTE_ACL_FILE
-                    + "' attribute value of type String but was " + Integer.class + ": " + aclFile, e.getMessage());
+            assertTrue("Unexpected exception message: " + e.getMessage(), Pattern.matches("ACL file '.*' is not found", e.getMessage()));
         }
     }
 }

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java Fri Apr 19 16:16:20 2013
@@ -47,6 +47,7 @@ import org.apache.qpid.server.management
 import org.apache.qpid.server.management.plugin.servlet.rest.RestServlet;
 import org.apache.qpid.server.management.plugin.servlet.rest.SaslServlet;
 import org.apache.qpid.server.management.plugin.servlet.rest.StructureServlet;
+import org.apache.qpid.server.model.AccessControlProvider;
 import org.apache.qpid.server.model.AuthenticationProvider;
 import org.apache.qpid.server.model.Binding;
 import org.apache.qpid.server.model.Broker;
@@ -283,6 +284,7 @@ public class HttpManagement extends Abst
         addRestServlet(root, "broker");
         addRestServlet(root, "virtualhost", VirtualHost.class);
         addRestServlet(root, "authenticationprovider", AuthenticationProvider.class);
+        addRestServlet(root, "accesscontrolprovider", AccessControlProvider.class);
         addRestServlet(root, "user", AuthenticationProvider.class, User.class);
         addRestServlet(root, "groupprovider", GroupProvider.class);
         addRestServlet(root, "group", GroupProvider.class, Group.class);

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/HelperServlet.java Fri Apr 19 16:16:20 2013
@@ -31,6 +31,7 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.qpid.server.management.plugin.servlet.rest.action.ListAccessControlProviderAttributes;
 import org.apache.qpid.server.management.plugin.servlet.rest.action.ListAuthenticationProviderAttributes;
 import org.apache.qpid.server.management.plugin.servlet.rest.action.ListGroupProviderAttributes;
 import org.apache.qpid.server.management.plugin.servlet.rest.action.ListMessageStoreTypes;
@@ -55,6 +56,8 @@ public class HelperServlet extends Abstr
         _actions.put(listMessageStoreTypes.getName(), listMessageStoreTypes);
         Action groupProviderAttributes = new ListGroupProviderAttributes();
         _actions.put(groupProviderAttributes.getName(), groupProviderAttributes);
+        Action aclProviderAttributes = new ListAccessControlProviderAttributes();
+        _actions.put(aclProviderAttributes.getName(), aclProviderAttributes);
     }
 
     @Override

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/action/ListAccessControlProviderAttributes.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/action/ListAccessControlProviderAttributes.java?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/action/ListAccessControlProviderAttributes.java (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/action/ListAccessControlProviderAttributes.java Fri Apr 19 16:16:20 2013
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.qpid.server.management.plugin.servlet.rest.action;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.qpid.server.management.plugin.servlet.rest.Action;
+import org.apache.qpid.server.model.Broker;
+import org.apache.qpid.server.plugin.AccessControlFactory;
+import org.apache.qpid.server.plugin.QpidServiceLoader;
+
+public class ListAccessControlProviderAttributes  implements Action
+{
+    private static final String ATTRIBUTES = "attributes";
+    private static final String DESCRIPTIONS = "descriptions";
+    private Map<String, AccessControlFactory> _factories;
+
+    public ListAccessControlProviderAttributes()
+    {
+        _factories = new TreeMap<String, AccessControlFactory>();
+        Iterable<AccessControlFactory> factories = new QpidServiceLoader<AccessControlFactory>()
+                .instancesOf(AccessControlFactory.class);
+        for (AccessControlFactory factory : factories)
+        {
+            _factories.put(factory.getType(), factory);
+        }
+    }
+
+    @Override
+    public String getName()
+    {
+        return ListAccessControlProviderAttributes.class.getSimpleName();
+    }
+
+    @Override
+    public Object perform(Map<String, Object> request, Broker broker)
+    {
+        Map<String, Object> attributes = new TreeMap<String, Object>();
+        for (String providerType : _factories.keySet())
+        {
+            AccessControlFactory factory = _factories.get(providerType);
+
+            Map<String, Object> data = new HashMap<String, Object>();
+            data.put(ATTRIBUTES, factory.getAttributeNames());
+            Map<String, String> resources = factory.getAttributeDescriptions();
+            if (resources != null)
+            {
+                data.put(DESCRIPTIONS, resources);
+            }
+
+            attributes.put(factory.getType(), data);
+        }
+        return attributes;
+    }
+
+}

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/showAclFile.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/showAclFile.html?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/showAclFile.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/accesscontrolprovider/showAclFile.html Fri Apr 19 16:16:20 2013
@@ -0,0 +1,24 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<div class="AclFileProvider">
+    <span style="">Path:</span><span class="path" style="position:absolute; left:6em"></span>
+    <br/>
+</div>

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AccessControlProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AccessControlProvider.js?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AccessControlProvider.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/AccessControlProvider.js Fri Apr 19 16:16:20 2013
@@ -0,0 +1,131 @@
+/*
+ *
+ * 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.
+ *
+ */
+define(["dojo/_base/xhr",
+        "dojo/parser",
+        "dojo/query",
+        "dojo/_base/connect",
+        "qpid/common/properties",
+        "qpid/common/updater",
+        "qpid/common/util",
+        "qpid/common/UpdatableStore",
+        "dojox/grid/EnhancedGrid",
+        "dijit/registry",
+        "dojo/_base/event",
+        "dojox/grid/enhanced/plugins/Pagination",
+        "dojox/grid/enhanced/plugins/IndirectSelection",
+        "dojo/domReady!"],
+       function (xhr, parser, query, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, event) {
+
+           function AccessControlProvider(name, parent, controller) {
+               this.name = name;
+               this.controller = controller;
+               this.modelObj = { type: "accesscontrolprovider", name: name };
+               if(parent) {
+                    this.modelObj.parent = {};
+                    this.modelObj.parent[ parent.type] = parent;
+                }
+           }
+
+           AccessControlProvider.prototype.getTitle = function() {
+               return "AccessControlProvider: " + this.name ;
+           };
+
+           AccessControlProvider.prototype.open = function(contentPane) {
+               var that = this;
+               this.contentPane = contentPane;
+               xhr.get({url: "showAccessControlProvider.html",
+                        sync: true,
+                        load:  function(data) {
+                            contentPane.containerNode.innerHTML = data;
+                            parser.parse(contentPane.containerNode);
+
+                            that.accessControlProviderUpdater = new AccessControlProviderUpdater(contentPane.containerNode, that.modelObj, that.controller);
+
+                            var deleteButton = query(".deleteAccessControlProviderButton", contentPane.containerNode)[0];
+                            var deleteWidget = registry.byNode(deleteButton);
+                            connect.connect(deleteWidget, "onClick",
+                                            function(evt){
+                                                event.stop(evt);
+                                                that.deleteAccessControlProvider();
+                                            });
+                        }});
+           };
+
+           AccessControlProvider.prototype.close = function() {
+             if (this.accessControlProviderUpdater.details)
+             {
+               this.accessControlProviderUpdater.details.close();
+             }
+           };
+
+           AccessControlProvider.prototype.deleteAccessControlProvider = function() {
+             if(confirm("Are you sure you want to delete access control provider '" + this.name + "'?")) {
+                 var query = "rest/accesscontrolprovider/" +encodeURIComponent(this.name);
+                 this.success = true
+                 var that = this;
+                 xhr.del({url: query, sync: true, handleAs: "json"}).then(
+                     function(data) {
+                         that.close();
+                         that.contentPane.onClose()
+                         that.controller.tabContainer.removeChild(that.contentPane);
+                         that.contentPane.destroyRecursive();
+                     },
+                     function(error) {that.success = false; that.failureReason = error;});
+                 if(!this.success ) {
+                     alert("Error:" + this.failureReason);
+                 }
+             }
+         };
+
+           function AccessControlProviderUpdater(node, groupProviderObj, controller)
+           {
+               this.controller = controller;
+               this.name = query(".name", node)[0];
+               this.type = query(".type", node)[0];
+               this.query = "rest/accesscontrolprovider/"+encodeURIComponent(groupProviderObj.name);
+
+               var that = this;
+
+               xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"})
+                   .then(function(data)
+                         {
+                             that.accessControlProviderData = data[0];
+
+                             util.flattenStatistics( that.accessControlProviderData );
+
+                             that.updateHeader();
+
+                             var ui = that.accessControlProviderData.type;
+                             require(["qpid/management/accesscontrolprovider/"+ ui],
+                                 function(SpecificProvider) {
+                                 that.details = new SpecificProvider(query(".providerDetails", node)[0], groupProviderObj, controller);
+                             });
+                         });
+           }
+
+           AccessControlProviderUpdater.prototype.updateHeader = function()
+           {
+               this.name.innerHTML = this.accessControlProviderData[ "name" ];
+               this.type.innerHTML = this.accessControlProviderData[ "type" ];
+           };
+
+           return AccessControlProvider;
+       });

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js Fri Apr 19 16:16:20 2013
@@ -33,6 +33,7 @@ define(["dojo/_base/xhr",
         "qpid/management/addPort",
         "qpid/management/addKeystore",
         "qpid/management/addGroupProvider",
+        "qpid/management/addAccessControlProvider",
         "dojox/grid/enhanced/plugins/Pagination",
         "dojox/grid/enhanced/plugins/IndirectSelection",
         "dijit/layout/AccordionContainer",
@@ -43,7 +44,7 @@ define(["dojo/_base/xhr",
         "dijit/form/CheckBox",
         "dojo/store/Memory",
         "dojo/domReady!"],
-       function (xhr, parser, query, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, addAuthenticationProvider, addVirtualHost, addPort, addKeystore, addGroupProvider) {
+       function (xhr, parser, query, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, addAuthenticationProvider, addVirtualHost, addPort, addKeystore, addGroupProvider, addAccessControlProvider) {
 
            function Broker(name, parent, controller) {
                this.name = name;
@@ -80,15 +81,6 @@ define(["dojo/_base/xhr",
                            name: "defaultVirtualHost"})
                        }
                }, {
-                       name: "aclFile",
-                       createWidget: function(brokerData) {
-                          return new dijit.form.ValidationTextBox({
-                            required: false,
-                            value: brokerData.aclFile,
-                            label: "ACL file location:",
-                            name: "aclFile"})
-                       }
-               }, {
                        name: "statisticsReportingPeriod",
                        createWidget: function(brokerData) {
                          return new dijit.form.ValidationTextBox({
@@ -473,6 +465,21 @@ define(["dojo/_base/xhr",
                                                 warning + "Are you sure you want to delete group provider");
                                 }
                             );
+
+                            var addAccessControlButton = query(".addAccessControlProvider", contentPane.containerNode)[0];
+                            connect.connect(registry.byNode(addAccessControlButton), "onClick",
+                                function(evt){addAccessControlProvider.show();});
+
+                            var deleteAccessControlProviderButton = query(".deleteAccessControlProvider", contentPane.containerNode)[0];
+                            connect.connect(registry.byNode(deleteAccessControlProviderButton), "onClick",
+                                    function(evt){
+                                        util.deleteGridSelections(
+                                                that.brokerUpdater,
+                                                that.brokerUpdater.accessControlProvidersGrid.grid,
+                                                "rest/accesscontrolprovider",
+                                                "Are you sure you want to delete access control provider");
+                                }
+                            );
                         }});
            };
 
@@ -626,7 +633,20 @@ define(["dojo/_base/xhr",
                                                            that.controller.show("groupprovider", name, brokerObj);
                                                        });
                                                }, gridProperties, EnhancedGrid);
-
+                             var aclData = that.brokerData.accesscontrolproviders ? that.brokerData.accesscontrolproviders :[];
+                             that.accessControlProvidersGrid =
+                               new UpdatableStore(aclData, query(".broker-access-control-providers")[0],
+                                               [ { name: "Name",    field: "name",      width: "60%"},
+                                                 { name: "Type", field: "type", width: "40%"}
+                                               ], function(obj) {
+                                                       connect.connect(obj.grid, "onRowDblClick", obj.grid,
+                                                       function(evt){
+                                                           var idx = evt.rowIndex,
+                                                               theItem = this.getItem(idx);
+                                                           var name = obj.dataStore.getValue(theItem,"name");
+                                                           that.controller.show("accesscontrolprovider", name, brokerObj);
+                                                       });
+                                               }, gridProperties, EnhancedGrid);
                          });
 
                xhr.get({url: "rest/logrecords", sync: properties.useSyncGet, handleAs: "json"})
@@ -725,6 +745,11 @@ define(["dojo/_base/xhr",
                                                                                        {
                                                                                          that.groupProvidersGrid.update(that.brokerData.groupproviders);
                                                                                        }
+                                                                                       if (that.accessControlProvidersGrid)
+                                                                                       {
+                                                                                         var data = that.brokerData.accesscontrolproviders ? that.brokerData.accesscontrolproviders :[];
+                                                                                         that.accessControlProvidersGrid.update(data);
+                                                                                       }
                                                                                    });
 
 

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/AclFile.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/AclFile.js?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/AclFile.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/accesscontrolprovider/AclFile.js Fri Apr 19 16:16:20 2013
@@ -0,0 +1,95 @@
+/*
+ *
+ * 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.
+ *
+ */
+define(["dojo/_base/xhr",
+        "dojo/dom",
+        "dojo/parser",
+        "dojo/query",
+        "dojo/dom-construct",
+        "dojo/_base/connect",
+        "dojo/_base/window",
+        "dojo/_base/event",
+        "dojo/_base/json",
+        "dijit/registry",
+        "qpid/common/util",
+        "qpid/common/properties",
+        "qpid/common/updater",
+        "qpid/common/UpdatableStore",
+        "dojox/grid/EnhancedGrid",
+        "dojox/grid/enhanced/plugins/Pagination",
+        "dojox/grid/enhanced/plugins/IndirectSelection",
+        "dojox/validate/us", "dojox/validate/web",
+        "dijit/Dialog",
+        "dijit/form/TextBox",
+        "dijit/form/ValidationTextBox",
+        "dijit/form/TimeTextBox", "dijit/form/Button",
+        "dijit/form/Form",
+        "dijit/form/DateTextBox",
+        "dojo/domReady!"],
+    function (xhr, dom, parser, query, construct, connect, win, event, json, registry, util, properties, updater, UpdatableStore, EnhancedGrid) {
+        function AclFile(containerNode, aclProviderObj, controller) {
+            var node = construct.create("div", null, containerNode, "last");
+            var that = this;
+            this.name = aclProviderObj.name;
+            xhr.get({url: "accesscontrolprovider/showAclFile.html",
+                                    sync: true,
+                                    load:  function(data) {
+                                        node.innerHTML = data;
+                                        parser.parse(node);
+
+                                        that.groupDatabaseUpdater= new AclFileUpdater(node, aclProviderObj, controller);
+
+                                        updater.add( that.groupDatabaseUpdater);
+
+                                        that.groupDatabaseUpdater.update();
+
+
+                                    }});
+        }
+
+        AclFile.prototype.close = function() {
+            updater.remove( this.groupDatabaseUpdater );
+        };
+
+        function AclFileUpdater(node, aclProviderObj, controller)
+        {
+            this.controller = controller;
+            this.query = "rest/accesscontrolprovider/"+encodeURIComponent(aclProviderObj.name);
+            this.name = aclProviderObj.name;
+            this.path = query(".path", node)[0];
+        }
+
+        AclFileUpdater.prototype.update = function()
+        {
+            var that = this;
+
+            xhr.get({url: this.query, sync: properties.useSyncGet, handleAs: "json"})
+                .then(function(data) {
+                  if (data[0])
+                  {
+                    that.aclProviderData = data[0];
+                    that.path.innerHTML = that.aclProviderData.path;
+                  }
+                });
+
+        };
+
+        return AclFile;
+    });

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAccessControlProvider.js Fri Apr 19 16:16:20 2013
@@ -0,0 +1,177 @@
+/*
+ *
+ * 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.
+ *
+ */
+define(["dojo/_base/lang",
+        "dojo/_base/xhr",
+        "dojo/dom",
+        "dojo/dom-construct",
+        "dijit/registry",
+        "dojo/parser",
+        "dojo/_base/array",
+        "dojo/_base/event",
+        'dojo/_base/json',
+        "qpid/common/util",
+        "dojo/store/Memory",
+        "dojox/validate/us",
+        "dojox/validate/web",
+        "dijit/Dialog",
+        "dijit/form/CheckBox",
+        "dijit/form/Textarea",
+        "dijit/form/ComboBox",
+        "dijit/form/TextBox",
+        "dijit/form/ValidationTextBox",
+        "dijit/form/Button",
+        "dijit/form/Form",
+        "dijit/layout/ContentPane",
+        "dojox/layout/TableContainer",
+        "dojo/domReady!"],
+    function (lang, xhr, dom, construct, registry, parser, array, event, json, util) {
+
+        var addAccessControlProvider = {};
+
+        addAccessControlProvider.show = function(accessControlProvider) {
+          var fields = [{
+              name: "name",
+              createWidget: function(accessControlProvider) {
+                  return new dijit.form.ValidationTextBox({
+                    required: true,
+                    value: accessControlProvider.name,
+                    disabled: accessControlProvider.name ? true : false,
+                    label: "Name*:",
+                    regexp: "^[\x20-\x2e\x30-\x7F]{1,255}$",
+                    name: "name"});
+              }
+          }, {
+              name: "type",
+              createWidget: function(accessControlProvider) {
+
+                  var typeContainer = construct.create("div");
+
+                  var typeListContainer = new dojox.layout.TableContainer({
+                      cols: 1,
+                      "labelWidth": "300",
+                      customClass: "formLabel",
+                      showLabels: true,
+                      orientation: "horiz"
+                  });
+
+                  typeContainer.appendChild(typeListContainer.domNode);
+
+                  var providers =  [];
+                  var fieldSetContainers = {};
+                  xhr.get({
+                    url: "rest/helper?action=ListAccessControlProviderAttributes",
+                    handleAs: "json",
+                    sync: true
+                  }).then(
+                  function(data) {
+                       var providerIndex = 0;
+
+                       for (var providerType in data) {
+                           if (data.hasOwnProperty(providerType)) {
+                               providers[providerIndex++] = {id: providerType, name: providerType};
+
+                               var attributes = data[providerType].attributes;
+                               var descriptions = data[providerType].descriptions;
+
+                               var layout = new dojox.layout.TableContainer( {
+                                   cols: 1,
+                                   "labelWidth": "300",
+                                   customClass: "formLabel",
+                                   showLabels: true,
+                                   orientation: "horiz"
+                               });
+
+                               for(var i=0; i < attributes.length; i++) {
+                                   if ("type" == attributes[i])
+                                   {
+                                       continue;
+                                   }
+                                   var labelValue = attributes[i];
+                                   if (descriptions && descriptions[attributes[i]])
+                                   {
+                                       labelValue = descriptions[attributes[i]];
+                                   }
+                                   var text = new dijit.form.TextBox({
+                                       label: labelValue + ":",
+                                       name: attributes[i]
+                                   });
+                                   layout.addChild(text);
+                               }
+
+                               typeContainer.appendChild(layout.domNode);
+                               fieldSetContainers[providerType] = layout;
+                           }
+                       }
+                });
+
+                var providersStore = new dojo.store.Memory({ data: providers });
+
+                var typeList = new dijit.form.FilteringSelect({
+                  required: true,
+                  value: accessControlProvider.type,
+                  store: providersStore,
+                  label: "Type*:",
+                  name: "type"});
+
+                typeListContainer.addChild(typeList);
+
+                var onChangeHandler = function onChangeHandler(newValue){
+                  for (var i in fieldSetContainers) {
+                    var container = fieldSetContainers[i];
+                    var descendants = container.getChildren();
+                    for(var i in descendants){
+                      var descendant = descendants[i];
+                      var propName = descendant.name;
+                      if (propName) {
+                        descendant.set("disabled", true);
+                      }
+                    }
+                    container.domNode.style.display = "none";
+                  }
+                  var container = fieldSetContainers[newValue];
+                  if (container)
+                  {
+                    container.domNode.style.display = "block";
+                    var descendants = container.getChildren();
+                    for(var i in descendants){
+                      var descendant = descendants[i];
+                      var propName = descendant.name;
+                      if (propName) {
+                        descendant.set("disabled", false);
+                      }
+                    }
+                  }
+                };
+                typeList.on("change", onChangeHandler);
+                onChangeHandler(typeList.value);
+                return new dijit.layout.ContentPane({content: typeContainer, style:{padding: 0}});
+              }
+              }];
+
+          util.showSetAttributesDialog(
+              fields,
+              accessControlProvider ? accessControlProvider : {},
+              "rest/accesscontrolprovider" + (name ? "/" + encodeURIComponent(name.name) : ""),
+              accessControlProvider ? "Edit access control provider - " + accessControlProvider.name : "Add access control provider",
+              accessControlProvider ? false : true);
+        };
+        return addAccessControlProvider;
+    });
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/controller.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/controller.js?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/controller.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/controller.js Fri Apr 19 16:16:20 2013
@@ -31,15 +31,17 @@ define(["dojo/dom",
         "qpid/management/group/Group",
         "qpid/management/KeyStore",
         "qpid/management/TrustStore",
+        "qpid/management/AccessControlProvider",
         "dojo/ready",
         "dojo/domReady!"],
-       function (dom, registry, ContentPane, Broker, VirtualHost, Exchange, Queue, Connection, AuthProvider, GroupProvider, Group, KeyStore, TrustStore, ready) {
+       function (dom, registry, ContentPane, Broker, VirtualHost, Exchange, Queue, Connection, AuthProvider, GroupProvider, Group, KeyStore, TrustStore, AccessControlProvider, ready) {
            var controller = {};
 
            var constructors = { broker: Broker, virtualhost: VirtualHost, exchange: Exchange,
                                 queue: Queue, connection: Connection,
                                 authenticationprovider: AuthProvider, groupprovider: GroupProvider,
-                                group: Group, keystore: KeyStore, truststore: TrustStore };
+                                group: Group, keystore: KeyStore, truststore: TrustStore,
+                                accesscontrolprovider: AccessControlProvider};
 
            var tabDiv = dom.byId("managedViews");
 

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js Fri Apr 19 16:16:20 2013
@@ -281,6 +281,8 @@ define(["dojo/_base/xhr",
                  controller.show("keystore", details.keystore, {broker: {type:"broker", name:""}});
                } else if (details.type == 'truststore') {
                  controller.show("truststore", details.truststore, {broker: {type:"broker", name:""}});
+               } else if (details.type == 'accesscontrolprovider') {
+                 controller.show("accesscontrolprovider", details.accesscontrolprovider, {broker: {type:"broker", name:""}});
                }
            };
 

Added: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAccessControlProvider.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAccessControlProvider.html?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAccessControlProvider.html (added)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showAccessControlProvider.html Fri Apr 19 16:16:20 2013
@@ -0,0 +1,31 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<div class="accessControlProvider">
+    <span style="">Name:</span><span class="name" style="position:absolute; left:6em"></span>
+    <br/>
+    <span style="">Type:</span><span class="type" style="position:absolute; left:6em"></span>
+    <br/>
+    <div class="providerDetails"></div>
+    <div class="dijitDialogPaneActionBar">
+        <input class="deleteAccessControlProviderButton" type="button" value="Delete Access Control provider" label="Delete Access Control Provider" dojoType="dijit.form.Button" />
+    </div>
+</div>
+<br/>
\ No newline at end of file

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html Fri Apr 19 16:16:20 2013
@@ -53,18 +53,10 @@
                 <div class="formLabel-labelCell" style="float:left; width: 250px;">Broker store location:</div>
                 <div id="brokerAttribute.storePath" style="float:left;"></div>
             </div>
-            <div id="brokerAttribute.defaultAuthenticationProvider.container" style="display: none; clear:both">
-                <div class="formLabel-labelCell" style="float:left; width: 250px;">Default authentication provider:</div>
-                <div id="brokerAttribute.defaultAuthenticationProvider" style="float:left;"></div>
-            </div>
             <div id="brokerAttribute.defaultVirtualHost.container" style="display: none; clear:both; clear:both;">
                 <div class="formLabel-labelCell" style="float:left; width: 250px;">Default virtual host:</div>
                 <div id="brokerAttribute.defaultVirtualHost" style="float:left;"></div>
             </div>
-            <div id="brokerAttribute.aclFile.container" style="display: none; clear:both">
-                <div class="formLabel-labelCell" style="float:left; width: 250px;">ACL file location:</div>
-                <div id="brokerAttribute.aclFile" style="float:left;"></div>
-            </div>
             <div id="brokerAttribute.statisticsReportingPeriod.container" style="display: none; clear:both">
                 <div class="formLabel-labelCell" style="float:left; width: 250px;">Statistics reporting period:</div>
                 <div id="brokerAttribute.statisticsReportingPeriod" style="float:left;"></div>
@@ -191,6 +183,12 @@
         <button data-dojo-type="dijit.form.Button" class="deleteGroupProvider">Delete Group Provider</button>
     </div>
     <br/>
+    <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Access Control Providers'">
+        <div class="broker-access-control-providers"></div>
+        <button data-dojo-type="dijit.form.Button" class="addAccessControlProvider">Add Access Control Provider</button>
+        <button data-dojo-type="dijit.form.Button" class="deleteAccessControlProvider">Delete Access Control Provider</button>
+    </div>
+    <br/>
     <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Log File',  open: false">
         <div class="broker-logfile"></div>
     </div>

Copied: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AccessControlProviderRecoverer.java (from r1469917, qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AccessControlProviderRecoverer.java?p2=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AccessControlProviderRecoverer.java&p1=qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java&r1=1469917&r2=1469937&rev=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AccessControlProviderRecoverer.java Fri Apr 19 16:16:20 2013
@@ -25,31 +25,30 @@ import java.util.Map;
 import org.apache.qpid.server.configuration.ConfigurationEntry;
 import org.apache.qpid.server.configuration.ConfiguredObjectRecoverer;
 import org.apache.qpid.server.configuration.RecovererProvider;
-import org.apache.qpid.server.model.AuthenticationProvider;
+import org.apache.qpid.server.model.AccessControlProvider;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.ConfiguredObject;
-import org.apache.qpid.server.model.adapter.AuthenticationProviderFactory;
+import org.apache.qpid.server.model.adapter.AccessControlProviderFactory;
 
-public class AuthenticationProviderRecoverer implements ConfiguredObjectRecoverer<AuthenticationProvider>
+public class AccessControlProviderRecoverer implements ConfiguredObjectRecoverer<AccessControlProvider>
 {
-    private final AuthenticationProviderFactory _authenticationProviderFactory;
+    private final AccessControlProviderFactory _accessControlProviderFactory;
 
-    public AuthenticationProviderRecoverer(AuthenticationProviderFactory authenticationProviderFactory)
+    public AccessControlProviderRecoverer(AccessControlProviderFactory authenticationProviderFactory)
     {
-        _authenticationProviderFactory = authenticationProviderFactory;
+        _accessControlProviderFactory = authenticationProviderFactory;
     }
 
     @Override
-    public AuthenticationProvider create(RecovererProvider recovererProvider, ConfigurationEntry configurationEntry, ConfiguredObject... parents)
+    public AccessControlProvider create(RecovererProvider recovererProvider, ConfigurationEntry configurationEntry, ConfiguredObject... parents)
     {
         Broker broker = RecovererHelper.verifyOnlyBrokerIsParent(parents);
         Map<String, Object> attributes = configurationEntry.getAttributes();
-        AuthenticationProvider authenticationProvider = _authenticationProviderFactory.create(
+        AccessControlProvider authenticationProvider = _accessControlProviderFactory.recover(
                 configurationEntry.getId(),
                 broker,
                 attributes);
 
         return authenticationProvider;
     }
-
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/AuthenticationProviderRecoverer.java Fri Apr 19 16:16:20 2013
@@ -51,5 +51,4 @@ public class AuthenticationProviderRecov
 
         return authenticationProvider;
     }
-
 }

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/BrokerRecoverer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/BrokerRecoverer.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/BrokerRecoverer.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/BrokerRecoverer.java Fri Apr 19 16:16:20 2013
@@ -40,6 +40,7 @@ import org.apache.qpid.server.model.Brok
 import org.apache.qpid.server.model.ConfiguredObject;
 import org.apache.qpid.server.model.KeyStore;
 import org.apache.qpid.server.model.TrustStore;
+import org.apache.qpid.server.model.adapter.AccessControlProviderFactory;
 import org.apache.qpid.server.model.adapter.AuthenticationProviderFactory;
 import org.apache.qpid.server.model.adapter.BrokerAdapter;
 import org.apache.qpid.server.model.adapter.GroupProviderFactory;
@@ -54,18 +55,20 @@ public class BrokerRecoverer implements 
     private final LogRecorder _logRecorder;
     private final RootMessageLogger _rootMessageLogger;
     private final AuthenticationProviderFactory _authenticationProviderFactory;
+    private final AccessControlProviderFactory _accessControlProviderFactory;
     private final PortFactory _portFactory;
     private final TaskExecutor _taskExecutor;
     private final BrokerOptions _brokerOptions;
     private final GroupProviderFactory _groupProviderFactory;
 
     public BrokerRecoverer(AuthenticationProviderFactory authenticationProviderFactory, GroupProviderFactory groupProviderFactory,
-            PortFactory portFactory, StatisticsGatherer statisticsGatherer, VirtualHostRegistry virtualHostRegistry,
-            LogRecorder logRecorder, RootMessageLogger rootMessageLogger, TaskExecutor taskExecutor, BrokerOptions brokerOptions)
+            AccessControlProviderFactory accessControlProviderFactory, PortFactory portFactory, StatisticsGatherer statisticsGatherer,
+            VirtualHostRegistry virtualHostRegistry, LogRecorder logRecorder, RootMessageLogger rootMessageLogger, TaskExecutor taskExecutor, BrokerOptions brokerOptions)
     {
         _groupProviderFactory = groupProviderFactory;
         _portFactory = portFactory;
         _authenticationProviderFactory = authenticationProviderFactory;
+        _accessControlProviderFactory = accessControlProviderFactory;
         _statisticsGatherer = statisticsGatherer;
         _virtualHostRegistry = virtualHostRegistry;
         _logRecorder = logRecorder;
@@ -79,8 +82,8 @@ public class BrokerRecoverer implements 
     {
         StoreConfigurationChangeListener storeChangeListener = new StoreConfigurationChangeListener(entry.getStore());
         BrokerAdapter broker = new BrokerAdapter(entry.getId(), entry.getAttributes(), _statisticsGatherer, _virtualHostRegistry,
-                _logRecorder, _rootMessageLogger, _authenticationProviderFactory, _groupProviderFactory, _portFactory,
-                _taskExecutor, entry.getStore(), _brokerOptions);
+                _logRecorder, _rootMessageLogger, _authenticationProviderFactory, _groupProviderFactory, _accessControlProviderFactory,
+                _portFactory, _taskExecutor, entry.getStore(), _brokerOptions);
 
         broker.addChangeListener(storeChangeListener);
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/startup/DefaultRecovererProvider.java Fri Apr 19 16:16:20 2013
@@ -25,6 +25,7 @@ import org.apache.qpid.server.configurat
 import org.apache.qpid.server.configuration.RecovererProvider;
 import org.apache.qpid.server.logging.LogRecorder;
 import org.apache.qpid.server.logging.RootMessageLogger;
+import org.apache.qpid.server.model.AccessControlProvider;
 import org.apache.qpid.server.model.AuthenticationProvider;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.GroupProvider;
@@ -33,10 +34,12 @@ import org.apache.qpid.server.model.Plug
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.TrustStore;
 import org.apache.qpid.server.model.VirtualHost;
+import org.apache.qpid.server.model.adapter.AccessControlProviderFactory;
 import org.apache.qpid.server.model.adapter.AuthenticationProviderFactory;
 import org.apache.qpid.server.model.adapter.GroupProviderFactory;
 import org.apache.qpid.server.model.adapter.PortFactory;
 import org.apache.qpid.server.configuration.updater.TaskExecutor;
+import org.apache.qpid.server.plugin.AccessControlFactory;
 import org.apache.qpid.server.plugin.AuthenticationManagerFactory;
 import org.apache.qpid.server.plugin.GroupManagerFactory;
 import org.apache.qpid.server.plugin.PluginFactory;
@@ -52,6 +55,7 @@ public class DefaultRecovererProvider im
     private final LogRecorder _logRecorder;
     private final RootMessageLogger _rootMessageLogger;
     private final AuthenticationProviderFactory _authenticationProviderFactory;
+    private final AccessControlProviderFactory _accessControlProviderFactory;
     private final PortFactory _portFactory;
     private final GroupProviderFactory _groupProviderFactory;
     private final QpidServiceLoader<PluginFactory> _pluginFactoryServiceLoader;
@@ -62,6 +66,7 @@ public class DefaultRecovererProvider im
             LogRecorder logRecorder, RootMessageLogger rootMessageLogger, TaskExecutor taskExecutor, BrokerOptions brokerOptions)
     {
         _authenticationProviderFactory = new AuthenticationProviderFactory(new QpidServiceLoader<AuthenticationManagerFactory>());
+        _accessControlProviderFactory = new AccessControlProviderFactory(new QpidServiceLoader<AccessControlFactory>());
         _groupProviderFactory = new GroupProviderFactory(new QpidServiceLoader<GroupManagerFactory>());
         _portFactory = new PortFactory();
         _brokerStatisticsGatherer = brokerStatisticsGatherer;
@@ -78,13 +83,17 @@ public class DefaultRecovererProvider im
     {
         if (Broker.class.getSimpleName().equals(type))
         {
-            return new BrokerRecoverer(_authenticationProviderFactory, _groupProviderFactory, _portFactory, _brokerStatisticsGatherer, _virtualHostRegistry,
-                    _logRecorder, _rootMessageLogger, _taskExecutor, _brokerOptions);
+            return new BrokerRecoverer(_authenticationProviderFactory, _groupProviderFactory, _accessControlProviderFactory, _portFactory, _brokerStatisticsGatherer,
+                    _virtualHostRegistry, _logRecorder, _rootMessageLogger, _taskExecutor, _brokerOptions);
         }
         else if(VirtualHost.class.getSimpleName().equals(type))
         {
             return new VirtualHostRecoverer(_brokerStatisticsGatherer);
         }
+        else if(AccessControlProvider.class.getSimpleName().equals(type))
+        {
+            return new AccessControlProviderRecoverer(_accessControlProviderFactory);
+        }
         else if(AuthenticationProvider.class.getSimpleName().equals(type))
         {
             return new AuthenticationProviderRecoverer(_authenticationProviderFactory);

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/store/ManagementModeStoreHandler.java Fri Apr 19 16:16:20 2013
@@ -12,6 +12,7 @@ import org.apache.qpid.server.BrokerOpti
 import org.apache.qpid.server.configuration.ConfigurationEntry;
 import org.apache.qpid.server.configuration.ConfigurationEntryStore;
 import org.apache.qpid.server.configuration.IllegalConfigurationException;
+import org.apache.qpid.server.model.AccessControlProvider;
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.Protocol;
 import org.apache.qpid.server.model.State;
@@ -25,6 +26,7 @@ public class ManagementModeStoreHandler 
     private static final String MANAGEMENT_MODE_PORT_PREFIX = "MANAGEMENT-MODE-PORT-";
     private static final String PORT_TYPE = Port.class.getSimpleName();
     private static final String VIRTUAL_HOST_TYPE = VirtualHost.class.getSimpleName();
+    private static final String ACCESS_CONTROL_PROVIDER_TYPE = AccessControlProvider.class.getSimpleName();
     private static final String ATTRIBUTE_STATE = VirtualHost.STATE;
     private static final Object MANAGEMENT_MODE_AUTH_PROVIDER = "mm-auth";
 
@@ -253,6 +255,10 @@ public class ManagementModeStoreHandler 
             {
                 quiesce = true;
             }
+            else if (ACCESS_CONTROL_PROVIDER_TYPE.equals(entryType))
+            {
+                quiesce = true;
+            }
             else if (PORT_TYPE.equalsIgnoreCase(entryType))
             {
                 if (attributes == null)

Added: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/AccessControlProvider.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/AccessControlProvider.java?rev=1469937&view=auto
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/AccessControlProvider.java (added)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/AccessControlProvider.java Fri Apr 19 16:16:20 2013
@@ -0,0 +1,56 @@
+/*
+ * 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.qpid.server.model;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.apache.qpid.server.security.AccessControl;
+
+public interface AccessControlProvider extends ConfiguredObject
+{
+    public static final String ID = "id";
+    public static final String DESCRIPTION = "description";
+    public static final String NAME = "name";
+    public static final String STATE = "state";
+    public static final String DURABLE = "durable";
+    public static final String LIFETIME_POLICY = "lifetimePolicy";
+    public static final String TIME_TO_LIVE = "timeToLive";
+    public static final String CREATED = "created";
+    public static final String UPDATED = "updated";
+    public static final String TYPE = "type";
+
+    public static final Collection<String> AVAILABLE_ATTRIBUTES =
+            Collections.unmodifiableList(
+                    Arrays.asList(ID,
+                                  NAME,
+                                  DESCRIPTION,
+                                  STATE,
+                                  DURABLE,
+                                  LIFETIME_POLICY,
+                                  TIME_TO_LIVE,
+                                  CREATED,
+                                  UPDATED,
+                                  TYPE));
+
+    //retrieve the underlying AccessControl object
+    AccessControl getAccessControl();
+}

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Broker.java Fri Apr 19 16:16:20 2013
@@ -21,11 +21,9 @@
 package org.apache.qpid.server.model;
 
 import java.net.SocketAddress;
-import java.security.AccessControlException;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Map;
 
 import org.apache.qpid.server.logging.LogRecorder;
 import org.apache.qpid.server.logging.RootMessageLogger;
@@ -81,12 +79,6 @@ public interface Broker extends Configur
     String VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE = "virtualhost.storeTransactionOpenTimeoutClose";
     String VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_WARN  = "virtualhost.storeTransactionOpenTimeoutWarn";
 
-    /*
-     * A temporary attribute to pass the path to ACL file.
-     * TODO: It should be a part of AuthorizationProvider.
-     */
-    String ACL_FILE = "aclFile";
-
     // Attributes
     Collection<String> AVAILABLE_ATTRIBUTES =
             Collections.unmodifiableList(
@@ -129,8 +121,7 @@ public interface Broker extends Configur
                               VIRTUALHOST_STORE_TRANSACTION_IDLE_TIMEOUT_CLOSE,
                               VIRTUALHOST_STORE_TRANSACTION_IDLE_TIMEOUT_WARN,
                               VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_CLOSE,
-                              VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_WARN,
-                              ACL_FILE
+                              VIRTUALHOST_STORE_TRANSACTION_OPEN_TIMEOUT_WARN
                               ));
 
     //children
@@ -140,9 +131,7 @@ public interface Broker extends Configur
 
     Collection<AuthenticationProvider> getAuthenticationProviders();
 
-    VirtualHost createVirtualHost(String name, State initialState, boolean durable,
-                                  LifetimePolicy lifetime, long ttl, Map<String, Object> attributes)
-            throws AccessControlException, IllegalArgumentException;
+    Collection<AccessControlProvider> getAccessControlProviders();
 
     Collection<GroupProvider> getGroupProviders();
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Model.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Model.java?rev=1469937&r1=1469936&r2=1469937&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Model.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/model/Model.java Fri Apr 19 16:16:20 2013
@@ -52,6 +52,7 @@ public class Model
     {
         addRelationship(Broker.class, VirtualHost.class);
         addRelationship(Broker.class, Port.class);
+        addRelationship(Broker.class, AccessControlProvider.class);
         addRelationship(Broker.class, AuthenticationProvider.class);
         addRelationship(Broker.class, GroupProvider.class);
         addRelationship(Broker.class, TrustStore.class);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message