From 9402f586ed2b14e807062c231d779ca74addc691 Mon Sep 17 00:00:00 2001 From: Joshua Palis Date: Fri, 12 Jan 2024 23:07:30 +0000 Subject: [PATCH] Updating developer guide, adding back ML Commons security system indices to security plugin configuration Signed-off-by: Joshua Palis --- DEVELOPER_GUIDE.md | 2 ++ build.gradle | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 16719a890..1a01a02da 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -42,6 +42,8 @@ This package uses the [Gradle](https://docs.gradle.org/current/userguide/usergui 5. `./gradlew test` to run the complete test suite. 6. `./gradlew integTest` to run only the non-security enabled integration tests 7. `./gradlew integTest -Dsecurity.enabled=true` to run only the security enabled integration tests +6. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=docker-cluster` to run only the non-security enabled integration tests on a remote cluster +7. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=docker-cluster -Dsecurity.enabled=true` to run only the security enabled integration tests on a remote cluster #### Building from the IDE diff --git a/build.gradle b/build.gradle index 723b26c5e..a58d42dce 100644 --- a/build.gradle +++ b/build.gradle @@ -238,6 +238,12 @@ ext{ cluster.setting('plugins.security.restapi.roles_enabled', '["all_access", "security_rest_api_access"]') cluster.setting('plugins.security.system_indices.enabled', "true") cluster.setting('plugins.security.system_indices.indices', '[' + + '".plugins-ml-config", ' + + '".plugins-ml-connector", ' + + '".plugins-ml-model-group", ' + + '".plugins-ml-model", ".plugins-ml-task", ' + + '".plugins-ml-conversation-meta", ' + + '".plugins-ml-conversation-interactions", ' + '".plugins-flow-framework-config", ' + '".plugins-flow-framework-templates", ' + '".plugins-flow-framework-state"' + @@ -379,10 +385,17 @@ testClusters.integTest { task integTestRemote(type: RestIntegTestTask) { testClassesDirs = sourceSets.test.output.classesDirs classpath = sourceSets.test.runtimeClasspath - - systemProperty "https", System.getProperty("https") - systemProperty "user", System.getProperty("user") - systemProperty "password", System.getProperty("password") + var is_https = System.getProperty('https') + var user = System.getProperty('user') + var password = System.getProperty('password') + if (System.getProperty('security.enabled') != null) { + is_https = is_https == null ? 'true' : is_https + user = user == null ? 'admin' : user + password = password == null ? 'admin' : password + } + systemProperty('https', is_https) + systemProperty('user', user) + systemProperty('password', password) systemProperty 'cluster.number_of_nodes', "${_numNodes}" systemProperty 'tests.security.manager', 'false'