[jboss-cvs] JBoss Messaging SVN: r3644 - in trunk: src/etc/server/standalone/config/local and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 30 06:46:03 EST 2008
Author: ataylor
Date: 2008-01-30 06:46:03 -0500 (Wed, 30 Jan 2008)
New Revision: 3644
Added:
trunk/src/main/org/jboss/jms/server/security/NullAuthenticationManager.java
Removed:
trunk/src/main/org/jboss/messaging/microcontainer/AuthenticationManager.java
Modified:
trunk/docs/examples/embedded/src/org/jboss/example/embedded/MessagingServerFactory.java
trunk/src/etc/server/standalone/config/local/local.xml
trunk/src/etc/server/standalone/config/remote/remote.xml
trunk/src/main/org/jboss/messaging/core/impl/server/MessagingServerImpl.java
Log:
added NullAuthenticationManager that is used if no full AuthenticationManager is used, MessagingServer will default to this if no other is injected.
Modified: trunk/docs/examples/embedded/src/org/jboss/example/embedded/MessagingServerFactory.java
===================================================================
--- trunk/docs/examples/embedded/src/org/jboss/example/embedded/MessagingServerFactory.java 2008-01-30 03:33:27 UTC (rev 3643)
+++ trunk/docs/examples/embedded/src/org/jboss/example/embedded/MessagingServerFactory.java 2008-01-30 11:46:03 UTC (rev 3644)
@@ -22,6 +22,7 @@
package org.jboss.example.embedded;
import org.jboss.jms.server.plugin.contract.JMSUserManager;
+import org.jboss.jms.server.security.NullAuthenticationManager;
import org.jboss.messaging.core.Configuration;
import org.jboss.messaging.core.MessagingServer;
import org.jboss.messaging.core.impl.bdbje.BDBJEEnvironment;
@@ -29,7 +30,6 @@
import org.jboss.messaging.core.impl.bdbje.integration.RealBDBJEEnvironment;
import org.jboss.messaging.core.impl.server.MessagingServerImpl;
import org.jboss.messaging.core.remoting.impl.mina.MinaService;
-import org.jboss.messaging.microcontainer.AuthenticationManager;
/**
* @author <a href="ataylor at redhat.com">Andy Taylor</a>
@@ -78,7 +78,6 @@
bdbjeEnvironment.start();
persistenceManager.start();
messagingServer.setPersistenceManager(persistenceManager);
- messagingServer.setAuthenticationManager(new AuthenticationManager());
return messagingServer;
}
Modified: trunk/src/etc/server/standalone/config/local/local.xml
===================================================================
--- trunk/src/etc/server/standalone/config/local/local.xml 2008-01-30 03:33:27 UTC (rev 3643)
+++ trunk/src/etc/server/standalone/config/local/local.xml 2008-01-30 11:46:03 UTC (rev 3644)
@@ -27,7 +27,7 @@
<property name="bindTo">java:/jaas/messaging</property>
</bean>
- <bean name="Jaas" class="org.jboss.messaging.microcontainer.AuthenticationManager"/>
+ <bean name="Jaas" class="org.jboss.jms.server.security.NullAuthenticationManager"/>
<bean name="jboss.jca:name=DefaultDS,service=DataSourceBinding" class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<property name="url">jdbc:mysql://localhost/messaging</property>
Modified: trunk/src/etc/server/standalone/config/remote/remote.xml
===================================================================
--- trunk/src/etc/server/standalone/config/remote/remote.xml 2008-01-30 03:33:27 UTC (rev 3643)
+++ trunk/src/etc/server/standalone/config/remote/remote.xml 2008-01-30 11:46:03 UTC (rev 3644)
@@ -39,7 +39,7 @@
<property name="bindTo">java:/jaas/messaging</property>
</bean>
- <bean name="Jaas" class="org.jboss.messaging.microcontainer.AuthenticationManager"/>
+ <bean name="Jaas" class="org.jboss.jms.server.security.NullAuthenticationManager"/>
<bean name="jboss.jca:name=DefaultDS,service=DataSourceBinding" class="com.mysql.jdbc.jdbc2.optional.MysqlDataSource">
<property name="url">jdbc:mysql://localhost/messaging</property>
Copied: trunk/src/main/org/jboss/jms/server/security/NullAuthenticationManager.java (from rev 3643, trunk/src/main/org/jboss/messaging/microcontainer/AuthenticationManager.java)
===================================================================
--- trunk/src/main/org/jboss/jms/server/security/NullAuthenticationManager.java (rev 0)
+++ trunk/src/main/org/jboss/jms/server/security/NullAuthenticationManager.java 2008-01-30 11:46:03 UTC (rev 3644)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jms.server.security;
+
+import java.security.Principal;
+import java.util.Map;
+import java.util.Set;
+
+import javax.security.auth.Subject;
+
+import org.jboss.security.RealmMapping;
+
+/**
+ * This is an implementation of AuthenticationManager and RealmMapping to use when we run embedded. The one we use when in jBoss
+ * is not available. currently this does not have any functionality. A user can
+ * provide their own implementation if security is needed
+ * @author <a href="ataylor at redhat.com">Andy Taylor</a>
+ */
+public class NullAuthenticationManager implements org.jboss.security.AuthenticationManager, RealmMapping
+{
+ public String getSecurityDomain()
+ {
+ return "messaging";
+ }
+
+ public boolean isValid(Principal principal, Object object)
+ {
+ return true;
+ }
+
+ public boolean isValid(Principal principal, Object object, Subject subject)
+ {
+ return true;
+ }
+
+
+ public Subject getActiveSubject()
+ {
+ return null;
+ }
+
+
+ public Principal getPrincipal(Principal principal)
+ {
+ return null;
+ }
+
+ public boolean doesUserHaveRole(Principal principal, Set set)
+ {
+ return true;
+ }
+
+ public Set getUserRoles(Principal principal)
+ {
+ return null;
+ }
+
+
+ public boolean isValid(javax.security.auth.message.MessageInfo messageInfo, Subject subject, String string)
+ {
+ return false; //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public Principal getTargetPrincipal(Principal principal, Map<String, Object> map)
+ {
+ return null; //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
Modified: trunk/src/main/org/jboss/messaging/core/impl/server/MessagingServerImpl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/impl/server/MessagingServerImpl.java 2008-01-30 03:33:27 UTC (rev 3643)
+++ trunk/src/main/org/jboss/messaging/core/impl/server/MessagingServerImpl.java 2008-01-30 11:46:03 UTC (rev 3644)
@@ -32,6 +32,7 @@
import org.jboss.jms.server.plugin.contract.JMSUserManager;
import org.jboss.jms.server.security.Role;
import org.jboss.jms.server.security.SecurityMetadataStore;
+import org.jboss.jms.server.security.NullAuthenticationManager;
import org.jboss.logging.Logger;
import org.jboss.messaging.core.*;
import org.jboss.messaging.core.impl.ConditionImpl;
@@ -91,13 +92,13 @@
private SecurityMetadataStore securityStore;
private SimpleConnectionManager connectionManager;
- private MemoryManager memoryManager;
+ private MemoryManager memoryManager = new SimpleMemoryManager();
private MessageCounterManager messageCounterManager;
private TransactionRepository transactionRepository = new TransactionRepository();
private PostOffice postOffice;
private SecurityDeployer securityDeployer;
private QueueSettingsDeployer queueSettingsDeployer;
- private AuthenticationManager authenticationManager;
+ private AuthenticationManager authenticationManager = new NullAuthenticationManager();
// plugins
Deleted: trunk/src/main/org/jboss/messaging/microcontainer/AuthenticationManager.java
===================================================================
--- trunk/src/main/org/jboss/messaging/microcontainer/AuthenticationManager.java 2008-01-30 03:33:27 UTC (rev 3643)
+++ trunk/src/main/org/jboss/messaging/microcontainer/AuthenticationManager.java 2008-01-30 11:46:03 UTC (rev 3644)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.messaging.microcontainer;
-
-import java.security.Principal;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.Subject;
-
-import org.jboss.security.RealmMapping;
-
-/**
- * This is an implementation of AuthenticationManager and RealmMapping to use when we run embedded. The one we use when in jBoss
- * is not available. currently this does not have any functionality. This needs implementing or aleternatively a user can
- * provide their own implementation
- * @author <a href="ataylor at redhat.com">Andy Taylor</a>
- */
-public class AuthenticationManager implements org.jboss.security.AuthenticationManager, RealmMapping
-{
- public String getSecurityDomain()
- {
- return "messaging";
- }
-
- public boolean isValid(Principal principal, Object object)
- {
- return true;
- }
-
- public boolean isValid(Principal principal, Object object, Subject subject)
- {
- return true;
- }
-
-
- public Subject getActiveSubject()
- {
- return null;
- }
-
-
- public Principal getPrincipal(Principal principal)
- {
- return null;
- }
-
- public boolean doesUserHaveRole(Principal principal, Set set)
- {
- return true;
- }
-
- public Set getUserRoles(Principal principal)
- {
- return null;
- }
-
-
- public boolean isValid(javax.security.auth.message.MessageInfo messageInfo, Subject subject, String string)
- {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public Principal getTargetPrincipal(Principal principal, Map<String, Object> map)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-}
More information about the jboss-cvs-commits
mailing list