cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject [35/50] [abbrv] git commit: refs/heads/cisco-vnmc-api-integration - CLOUDSTACK-1729: a partical resolution for user authenticators to unblock developers who are currently working on and relying on the fix
Date Thu, 21 Mar 2013 05:22:22 GMT
CLOUDSTACK-1729: a partical resolution for user authenticators to unblock developers who are
currently working on and relying on the fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/2bebb124
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/2bebb124
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/2bebb124

Branch: refs/heads/cisco-vnmc-api-integration
Commit: 2bebb124cc0e2ab59143263de8fe1e85ba1194c2
Parents: 1ea5d6c
Author: Kelven Yang <kelveny@gmail.com>
Authored: Tue Mar 19 15:47:08 2013 -0700
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Tue Mar 19 15:47:22 2013 -0700

----------------------------------------------------------------------
 client/tomcatconf/componentContext.xml.in          |   20 +++++++++++++-
 .../src/com/cloud/server/ManagementServerImpl.java |   17 ++++++------
 server/src/com/cloud/user/AccountManagerImpl.java  |   11 ++++++--
 3 files changed, 35 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2bebb124/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 7b64f49..016df0a 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -36,9 +36,25 @@
   -->
   <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
   <bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker"
/>
-  
-  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" />
   <bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl"
/>
+  
+  <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" >
+    <property name="UserAuthenticators">
+        <list>
+            <ref bean="MD5UserAuthenticator"/>
+            <ref bean="LDAPUserAuthenticator"/>
+        </list>
+    </property>
+  </bean>
+ 
+  <bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
+    <property name="UserAuthenticators">
+        <list>
+            <ref bean="MD5UserAuthenticator"/>
+            <ref bean="LDAPUserAuthenticator"/>
+        </list>
+    </property>
+  </bean>
    
   <bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
   <bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl"
/>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2bebb124/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 1f1f12e..b689f93 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -414,13 +414,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     @Inject
     S3Manager _s3Mgr;
 
-/*
-    @Inject
-    ComponentContext _forceContextRef;			// create a dependency to ComponentContext so that
it can be loaded beforehead
-
-    @Inject
-    EventUtils	_forceEventUtilsRef;
-*/
     private final ScheduledExecutorService _eventExecutor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("EventChecker"));
     private final ScheduledExecutorService _alertExecutor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("AlertChecker"));
     private KeystoreManager _ksMgr;
@@ -429,7 +422,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
 
     private Map<String, Boolean> _availableIdsMap;
 
-    @Inject List<UserAuthenticator> _userAuthenticators;
+    List<UserAuthenticator> _userAuthenticators;
 
     @Inject ClusterManager _clusterMgr;
     private String _hashKey = null;
@@ -437,6 +430,14 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
     public ManagementServerImpl() {
     	setRunLevel(ComponentLifecycle.RUN_LEVEL_APPLICATION_MAINLOOP);
     }
+    
+    public List<UserAuthenticator> getUserAuthenticators() {
+    	return _userAuthenticators;
+    }
+    
+    public void setUserAuthenticators(List<UserAuthenticator> authenticators) {
+    	_userAuthenticators = authenticators;
+    }
 
 	@Override
 	public boolean configure(String name, Map<String, Object> params)

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2bebb124/server/src/com/cloud/user/AccountManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java
index be5f4f4..b69f314 100755
--- a/server/src/com/cloud/user/AccountManagerImpl.java
+++ b/server/src/com/cloud/user/AccountManagerImpl.java
@@ -48,7 +48,6 @@ import org.apache.cloudstack.api.command.admin.user.RegisterCmd;
 import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
 
 import com.cloud.api.ApiDBUtils;
 import com.cloud.api.query.dao.UserAccountJoinDao;
@@ -140,7 +139,6 @@ import com.cloud.vm.dao.InstanceGroupDao;
 import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.VMInstanceDao;
 
-@Component
 @Local(value = { AccountManager.class, AccountService.class })
 public class AccountManagerImpl extends ManagerBase implements AccountManager, Manager {
     public static final Logger s_logger = Logger.getLogger(AccountManagerImpl.class);
@@ -223,7 +221,6 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager,
M
     private AutoScaleManager _autoscaleMgr;
     @Inject VolumeManager volumeMgr;
 
-    @Inject
     private List<UserAuthenticator> _userAuthenticators;
 
     private final ScheduledExecutorService _executor = Executors.newScheduledThreadPool(1,
new NamedThreadFactory("AccountChecker"));
@@ -237,6 +234,14 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager,
M
     List<SecurityChecker> _securityCheckers;
     int _cleanupInterval;
 
+    public List<UserAuthenticator> getUserAuthenticators() {
+    	return _userAuthenticators;
+    }
+    
+    public void setUserAuthenticators(List<UserAuthenticator> authenticators) {
+    	_userAuthenticators = authenticators;
+    }
+    
     @Override
     public boolean configure(final String name, final Map<String, Object> params) throws
ConfigurationException {
         _systemAccount = _accountDao.findById(AccountVO.ACCOUNT_ID_SYSTEM);


Mime
View raw message