GitHub user karuturi opened a pull request:
https://github.com/apache/cloudstack/pull/841
Cloudstack 8868: use PasswordGenerator.generateRandomPassword() to generate
systemvm passwords
generateRandomPassword() is supposed to create root user passwords. Right
now it is only used on the guest VMs. The format of the passwords it creates
are of the form "random 3-character string with a lowercase character,
uppercase character, and a digit" + random n-character string with only
lowercase characters".
For whatever reason it was that we use generateRandomPassword() for guest
VM root user passwords(maybe more secure?) we should use the same function for
system VM root user passwords.
Tests:
manually tested that password is generated in proper format and am able to
login to cpvm with the new password. ex: zD2ztm, tR8snbwhq
```
$ mvn -pl server test
-Dtest=ConfigurationServerImplTest#testUpdateSystemvmPassword
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.cloud.server.ConfigurationServerImplTest
log4j:WARN No appenders could be found for logger
(com.cloud.utils.crypt.EncryptionSecretKeyChecker).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.487 sec -
in com.cloud.server.ConfigurationServerImplTest
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7.781 s
[INFO] Finished at: 2015-09-16T14:17:07+05:30
[INFO] Final Memory: 60M/466M
[INFO]
------------------------------------------------------------------------
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8868
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/841.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #841
----
commit c2e36f2bb96070b5ff30fe7dbf1417ecb720b817
Author: Rajani Karuturi <[email protected]>
Date: 2015-09-16T06:58:03Z
CLOUDSTACK-8868: use same method to generate passwords for system/guest vms
generateRandomPassword() is supposed to create root user passwords.
Right now it is only used on the guest VMs. The format of the passwords
it creates are of the form "random 3-character string with a lowercase
character, uppercase character, and a digit" + random n-character string
with only lowercase characters".
For whatever reason it was that we use generateRandomPassword() for
guest VM root user passwords(maybe more secure?) we should use the same
function for system VM root user passwords.
commit 4a6af1b6e368d773a26fced5ca4f7486c03bf873
Author: Rajani Karuturi <[email protected]>
Date: 2015-09-16T07:04:49Z
removed commented code
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---