Browse Source

Test: use trial license in qa tests with security

QA tests that use security need to use a trial license instead of a
basic license. Basic licenses do not enable security so these tests are
not running in the expected configuration. This can also lead to issues
that seem completely unrelated such as authentication failures right
after cluster formation.

The authentication failure right after cluster formation happens since
a request makes it past the authentication license checks and the
request starts the authentication process. During authentication the
cluster forms and the license is updated to a basic license, which
disables all realms. The request that is being authenticated then tries
to iterate over the realms, but the realms are empty and the request
cannot be authenticated. This results in a authentication failure even
though the credentials provided are correct.

Closes #30306
jaymode 7 years ago
parent
commit
9573492a9e

+ 1 - 1
x-pack/qa/multi-node/build.gradle

@@ -12,7 +12,7 @@ integTestCluster {
   setting 'xpack.watcher.enabled', 'false'
   setting 'xpack.monitoring.enabled', 'false'
   setting 'xpack.ml.enabled', 'false'
-  setting 'logger.org.elasticsearch.xpack.security.authc', 'TRACE'
+  setting 'xpack.license.self_generated.type', 'trial'
   extraConfigFile 'roles.yml', 'roles.yml'
   setupCommand 'setup-test-user', 'bin/elasticsearch-users', 'useradd', 'test-user', '-p', 'x-pack-test-password', '-r', 'test'
   setupCommand 'setup-super-user', 'bin/elasticsearch-users', 'useradd', 'super-user', '-p', 'x-pack-super-password', '-r', 'superuser'

+ 1 - 0
x-pack/qa/smoke-test-plugins-ssl/build.gradle

@@ -178,6 +178,7 @@ integTestCluster {
   setting 'xpack.monitoring.exporters._http.auth.password', 'x-pack-test-password'
   setting 'xpack.monitoring.exporters._http.ssl.verification_mode', 'full'
 
+  setting 'xpack.license.self_generated.type', 'trial'
   setting 'xpack.security.enabled', 'true'
   setting 'xpack.security.http.ssl.enabled', 'true'
   setting 'xpack.security.http.ssl.keystore.path', nodeKeystore.name

+ 1 - 2
x-pack/qa/smoke-test-plugins/build.gradle

@@ -1,6 +1,4 @@
 import org.elasticsearch.gradle.MavenFilteringHack
-import org.elasticsearch.gradle.plugin.MetaPluginBuildPlugin
-import org.elasticsearch.gradle.plugin.PluginBuildPlugin
 
 apply plugin: 'elasticsearch.standalone-rest-test'
 apply plugin: 'elasticsearch.rest-test'
@@ -18,6 +16,7 @@ project(':plugins').getChildProjects().each { pluginName, pluginProject ->
 
 integTestCluster {
   setting 'xpack.security.enabled', 'true'
+  setting 'xpack.license.self_generated.type', 'trial'
   setupCommand 'setupDummyUser',
                'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser'
   waitCondition = { node, ant ->

+ 2 - 0
x-pack/qa/sql/security/build.gradle

@@ -26,6 +26,7 @@ subprojects {
     setting 'xpack.security.audit.enabled', 'true'
     setting 'xpack.security.audit.outputs', 'logfile'
     setting 'xpack.security.enabled', 'true'
+    setting 'xpack.license.self_generated.type', 'trial'
     // Setup roles used by tests
     extraConfigFile 'roles.yml', '../roles.yml'
     /* Setup the one admin user that we run the tests as.
@@ -45,6 +46,7 @@ subprojects {
     setting 'xpack.security.audit.enabled', 'true'
     setting 'xpack.security.audit.outputs', 'logfile'
     setting 'xpack.security.enabled', 'true'
+    setting 'xpack.license.self_generated.type', 'trial'
     // Setup roles used by tests
     extraConfigFile 'roles.yml', '../roles.yml'
     /* Setup the one admin user that we run the tests as.