DaanHoogland commented on code in PR #7134:
URL: https://github.com/apache/cloudstack/pull/7134#discussion_r1088840762


##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -810,7 +810,7 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
     protected StateMachine2<State, VirtualMachine.Event, VirtualMachine> 
_stateMachine;
 
     static final ConfigKey<Integer> vmPasswordLength = new 
ConfigKey<Integer>("Advanced", Integer.class, "vm.password.length", "6", 
"Specifies the length of a randomly generated password", false);
-    static final ConfigKey<String> vmPasswordComplexity = new 
ConfigKey<String>("Advanced", String.class, "vm.password.complexity", 
"^(?=.{6,})(?=.*[A-Z])(?=.*[a-z])(?=.*[@#%&^~.,!,?,:,;])", "Specifies the 
pattern for generated password", false);    

Review Comment:
   we could add the more complex regex to the docstring as example



##########
server/src/main/java/com/cloud/server/ManagementServerImpl.java:
##########
@@ -810,7 +810,7 @@ public class ManagementServerImpl extends ManagerBase 
implements ManagementServe
     protected StateMachine2<State, VirtualMachine.Event, VirtualMachine> 
_stateMachine;
 
     static final ConfigKey<Integer> vmPasswordLength = new 
ConfigKey<Integer>("Advanced", Integer.class, "vm.password.length", "6", 
"Specifies the length of a randomly generated password", false);
-    static final ConfigKey<String> vmPasswordComplexity = new 
ConfigKey<String>("Advanced", String.class, "vm.password.complexity", 
"^(?=.{6,})(?=.*[A-Z])(?=.*[a-z])(?=.*[@#%&^~.,!,?,:,;])", "Specifies the 
pattern for generated password", false);    
+    static final ConfigKey<String> vmPasswordComplexity = new 
ConfigKey<String>("Advanced", String.class, "vm.password.complexity", ".*", 
"Specifies the pattern for generated password", true);    

Review Comment:
   .* is possibly more complex and possibly simpler than what is generated, 
this is ok though. the generated one is 6 chars with at least lower case, upper 
case and numeral.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to