CLOUDSTACK-10213: Allow specify SSH key lengh#2389
Conversation
| "5", | ||
| "Incorrect login attempts allowed before the user is disabled", | ||
| null), | ||
| SSHKeyLength( |
There was a problem hiding this comment.
Please remove from here, this is deprecated. The use of ConfigKey is alright.
DaanHoogland
left a comment
There was a problem hiding this comment.
We are mixing old and new style configuration methods here. Please use purely the new style.
|
|
||
| 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<Integer> SSHKeyLength = new ConfigKey<Integer>("Advanced", Integer.class, "ssh.key.length", |
There was a problem hiding this comment.
This configkey must be published in a getConfigKeys() implementation
|
PR updated, new style configuration methods used. Variable scope changed to "Account". |
|
Can you give a rationale as to why account scope, @dmytro-shevchenko ? Nowadays you can also use domain scope and for this even global would make sense. |
| } | ||
|
|
||
| public SSHKeysHelper() { | ||
| public SSHKeysHelper(Integer keyLenght) { |
There was a problem hiding this comment.
It's a typo. ShouldBe keyLength.
| 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<Integer> sshKeyLength = new ConfigKey<Integer>("Advanced", Integer.class, "ssh.key.length", | ||
| "2048", "User SSH key length (bit)", true, ConfigKey.Scope.Account); |
There was a problem hiding this comment.
Might the description be more meaningful for average user, like "Specifies minimal? amount of SSH key length permitted". Could you please take a look at this. May be it can be improved.
|
Reasonable, PR updated. Global scope for variable, description a little bit updated. This can be only exactly key length, not minimal. |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1622 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2079)
|
|
Tests ltgm, merging this based on code reviews and tests. |
SSH keys generated by the ACS are only 1024 bit (RSA). The common standard is now at least 2048 bit.
https://issues.apache.org/jira/browse/CLOUDSTACK-10213