Skip to content

Commit d054aba

Browse files
committed
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
1 parent 548cdd7 commit d054aba

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

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

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ integTestCluster {
1212
setting 'xpack.watcher.enabled', 'false'
1313
setting 'xpack.monitoring.enabled', 'false'
1414
setting 'xpack.ml.enabled', 'false'
15+
setting 'xpack.license.self_generated.type', 'trial'
1516
extraConfigFile 'roles.yml', 'roles.yml'
1617
setupCommand 'setup-test-user', 'bin/elasticsearch-users', 'useradd', 'test-user', '-p', 'x-pack-test-password', '-r', 'test'
1718
setupCommand 'setup-super-user', 'bin/elasticsearch-users', 'useradd', 'super-user', '-p', 'x-pack-super-password', '-r', 'superuser'

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

+1
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ integTestCluster {
176176
setting 'xpack.monitoring.exporters._http.auth.password', 'x-pack-test-password'
177177
setting 'xpack.monitoring.exporters._http.ssl.verification_mode', 'full'
178178

179+
setting 'xpack.license.self_generated.type', 'trial'
179180
setting 'xpack.security.enabled', 'true'
180181
setting 'xpack.security.http.ssl.enabled', 'true'
181182
setting 'xpack.security.http.ssl.keystore.path', nodeKeystore.name

x-pack/qa/smoke-test-plugins/build.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each
1616

1717
integTestCluster {
1818
setting 'xpack.security.enabled', 'true'
19+
setting 'xpack.license.self_generated.type', 'trial'
1920
setupCommand 'setupDummyUser',
2021
'bin/elasticsearch-users', 'useradd', 'test_user', '-p', 'x-pack-test-password', '-r', 'superuser'
2122
waitCondition = { node, ant ->

x-pack/qa/sql/security/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ subprojects {
2626
setting 'xpack.security.audit.enabled', 'true'
2727
setting 'xpack.security.audit.outputs', 'logfile'
2828
setting 'xpack.security.enabled', 'true'
29+
setting 'xpack.license.self_generated.type', 'trial'
2930
// Setup roles used by tests
3031
extraConfigFile 'roles.yml', '../roles.yml'
3132
/* Setup the one admin user that we run the tests as.
@@ -45,6 +46,7 @@ subprojects {
4546
setting 'xpack.security.audit.enabled', 'true'
4647
setting 'xpack.security.audit.outputs', 'logfile'
4748
setting 'xpack.security.enabled', 'true'
49+
setting 'xpack.license.self_generated.type', 'trial'
4850
// Setup roles used by tests
4951
extraConfigFile 'roles.yml', '../roles.yml'
5052
/* Setup the one admin user that we run the tests as.

0 commit comments

Comments
 (0)