Author: rgemmell
Date: 2011-07-21 05:58:55 -0400 (Thu, 21 Jul 2011)
New Revision: 4467
Modified:
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java
Log:
Updates to reflect changes in main broker codebase via QPID-3283
Applied patch by Keith Wall
Modified:
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java
===================================================================
---
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java 2011-07-19
20:00:56 UTC (rev 4466)
+++
store/branches/java/0.5.x-dev/src/tools/java/org/apache/qpid/server/util/NullApplicationRegistry.java 2011-07-21
09:58:55 UTC (rev 4467)
@@ -32,7 +32,8 @@
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.security.access.ACLManager;
import org.apache.qpid.server.security.access.plugins.AllowAll;
-import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabaseManager;
+import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabase;
+import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
import
org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
@@ -64,11 +65,9 @@
users.put("guest", "guest");
- _databaseManager = new PropertiesPrincipalDatabaseManager("default",
users);
-
_accessManager = new ACLManager(_configuration.getSecurityConfiguration(),
_pluginManager, AllowAll.FACTORY);
- _authenticationManager = new PrincipalDatabaseAuthenticationManager();
+ _authenticationManager = createAuthenticationManager();
_managedObjectRegistry = new NoopManagedObjectRegistry();
_virtualHostRegistry = new VirtualHostRegistry(this);
@@ -88,6 +87,37 @@
return Arrays.asList(hosts);
}
+ protected AuthenticationManager createAuthenticationManager() throws
ConfigurationException
+ {
+ final Properties users = new Properties();
+ users.put("guest","guest");
+ users.put("admin","admin");
+
+ final PropertiesPrincipalDatabase ppd = new PropertiesPrincipalDatabase(users);
+
+ final AuthenticationManager pdam = new PrincipalDatabaseAuthenticationManager()
+ {
+
+ @Override
+ public void initialise()
+ {
+ setPrincipalDatabase(ppd);
+
+ super.initialise();
+ }
+
+ @Override
+ protected void registerManagement()
+ {
+ // Noop for NullApplicationRegistry;
+ }
+ };
+
+ pdam.initialise();
+
+ return pdam;
+ }
+
@Override
public void close() throws Exception
{
Show replies by date