Skip to content

Commit

Permalink
Updating developer guide, adding back ML Commons security system indi…
Browse files Browse the repository at this point in the history
…ces to security plugin configuration

Signed-off-by: Joshua Palis <[email protected]>
  • Loading branch information
joshpalis committed Jan 12, 2024
1 parent 71fb85b commit 9402f58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 17 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"' +
Expand Down Expand Up @@ -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'

Expand Down

0 comments on commit 9402f58

Please sign in to comment.