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@fd7c683ae93187b55e2d0dd763392de3228617bd
@@ -54,7 +54,7 @@ import org.elasticsearch.xpack.security.user.LogstashSystemUser;
*/
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);
private final CheckedFunction<Environment, CommandLineHttpClient, Exception> clientFunction;
