mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 01:32:18 +02: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 {
|
||||
Role role = getProjectKubernetesAccountRole();
|
||||
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.getDomainId(), null, null, null, null, User.Source.NATIVE);
|
||||
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);
|
||||
}
|
||||
|
||||
passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId());
|
||||
Account callingAccount = getCurrentCallingAccount();
|
||||
if (callingAccount.getId() != Account.ACCOUNT_ID_SYSTEM) {
|
||||
passwordPolicy.verifyIfPasswordCompliesWithPasswordPolicies(password, userName, getAccount(accountId).getDomainId());
|
||||
}
|
||||
|
||||
String encodedPassword = null;
|
||||
for (UserAuthenticator authenticator : _userPasswordEncoders) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user