Make generated passwords shell safe (elastic/x-pack-elasticsearch#3253)

Generate passwords from  [A-Za-z0-9] so that they are safe to be
used in shell scripts.
Entropy deterioration is not significant (124.9 -> 119), generated
passwords still meet guidelines and best practices regarding length
and complexity.

Resolves elastic/x-pack-elasticsearch#3087

Original commit: elastic/x-pack-elasticsearch@078639e7c2
This commit is contained in:
Ioannis Kakavas 2017-12-08 18:03:13 +02:00 committed by GitHub
parent 4082d6fa48
commit aff5cc840f
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ import org.elasticsearch.xpack.security.user.LogstashSystemUser;
*/ */
public class SetupPasswordTool extends LoggingAwareMultiCommand { public class SetupPasswordTool extends LoggingAwareMultiCommand {
private static final char[] CHARS = ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~!@#$%^&*-_=+?").toCharArray(); private static final char[] CHARS = ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789").toCharArray();
public static final List<String> USERS = Arrays.asList(ElasticUser.NAME, KibanaUser.NAME, LogstashSystemUser.NAME); public static final List<String> USERS = Arrays.asList(ElasticUser.NAME, KibanaUser.NAME, LogstashSystemUser.NAME);
private final CheckedFunction<Environment, CommandLineHttpClient, Exception> clientFunction; private final CheckedFunction<Environment, CommandLineHttpClient, Exception> clientFunction;