mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	CLOUDSTACK-1729: a partical resolution for user authenticators to unblock developers who are currently working on and relying on the fix
This commit is contained in:
		
							parent
							
								
									1ea5d6c169
								
							
						
					
					
						commit
						2bebb124cc
					
				@ -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" />
 | 
			
		||||
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user