mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	CKS: generate a random UUID as password of CKS user in project (#11639)
This commit is contained in:
		
							parent
							
								
									70af55e848
								
							
						
					
					
						commit
						c631d6a480
					
				| @ -1551,7 +1551,7 @@ public class KubernetesClusterManagerImpl extends ManagerBase implements Kuberne | |||||||
|         try { |         try { | ||||||
|             Role role = getProjectKubernetesAccountRole(); |             Role role = getProjectKubernetesAccountRole(); | ||||||
|             UserAccount userAccount = accountService.createUserAccount(accountName, |             UserAccount userAccount = accountService.createUserAccount(accountName, | ||||||
|                     UuidUtils.first(UUID.randomUUID().toString()), PROJECT_KUBERNETES_ACCOUNT_FIRST_NAME, |                     UUID.randomUUID().toString(), PROJECT_KUBERNETES_ACCOUNT_FIRST_NAME, | ||||||
|                     PROJECT_KUBERNETES_ACCOUNT_LAST_NAME, null, null, accountName, Account.Type.NORMAL, role.getId(), |                     PROJECT_KUBERNETES_ACCOUNT_LAST_NAME, null, null, accountName, Account.Type.NORMAL, role.getId(), | ||||||
|                     project.getDomainId(), null, null, null, null, User.Source.NATIVE); |                     project.getDomainId(), null, null, null, null, User.Source.NATIVE); | ||||||
|             projectManager.assignAccountToProject(project, userAccount.getAccountId(), ProjectAccount.Role.Regular, |             projectManager.assignAccountToProject(project, userAccount.getAccountId(), ProjectAccount.Role.Regular, | ||||||
|  | |||||||
| @ -2747,7 +2747,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M | |||||||
|             logger.debug("Creating user: " + userName + ", accountId: " + accountId + " timezone:" + timezone); |             logger.debug("Creating user: " + userName + ", accountId: " + accountId + " timezone:" + timezone); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         Account callingAccount = getCurrentCallingAccount(); | ||||||
|  |         if (callingAccount.getId() != Account.ACCOUNT_ID_SYSTEM) { | ||||||
|             passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId()); |             passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId()); | ||||||
|  |         } | ||||||
| 
 | 
 | ||||||
|         String encodedPassword = null; |         String encodedPassword = null; | ||||||
|         for (UserAuthenticator authenticator : _userPasswordEncoders) { |         for (UserAuthenticator authenticator : _userPasswordEncoders) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user