From f150443d9a542062ad6f72624a51273bb0fadc6e Mon Sep 17 00:00:00 2001 From: Jay Modi Date: Mon, 10 Jun 2019 11:44:34 -0600 Subject: [PATCH] Default distro run creates elastic-admin user (#43004) When using gradle run by itself, this uses the default distro with a basic license and enables security. There is a setup command to create a elastic-admin user but only when the license is a trial license. Now that security is available with the basic license, we should always run this command when using the default distribution. --- distribution/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/build.gradle b/distribution/build.gradle index 65c7cbadb50..5f269f700b8 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -397,11 +397,11 @@ task run(type: RunTask) { setting 'xpack.graph.enabled', 'true' setting 'xpack.watcher.enabled', 'true' setting 'xpack.license.self_generated.type', 'trial' - setupCommand 'setupTestAdmin', - 'bin/elasticsearch-users', 'useradd', 'elastic-admin', '-p', 'elastic-password', '-r', 'superuser' } else if (licenseType != 'basic') { throw new IllegalArgumentException("Unsupported self-generated license type: [" + licenseType + "[basic] or [trial].") } + setupCommand 'setupTestAdmin', + 'bin/elasticsearch-users', 'useradd', 'elastic-admin', '-p', 'elastic-password', '-r', 'superuser' setting 'xpack.security.enabled', 'true' setting 'xpack.monitoring.enabled', 'true' setting 'xpack.sql.enabled', 'true'