Skip to content

Commit

Permalink
Setting password
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Jan 23, 2024
1 parent aa6b710 commit b66f263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Additionally, it is also possible to run a cluster with security enabled:
./gradlew run -Dsecurity.enabled=true
```

By default, if `-Dsecurity.enabled=true` is passed the following defaults will be used: `https=true`, `user=admin`. There is no default password and it is set as `password=<admin-password`.
By default, if `-Dsecurity.enabled=true` is passed the following defaults will be used: `https=true`, `user=admin`. There is no default password and it is to be set as `password=<admin-password>`.

Then, to access the cluster, we can run the below command. <admin-password> parameter is the password set by admin.
```bash
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ buildscript {
}
opensearch_group = "org.opensearch"
opensearch_no_snapshot = opensearch_build.replace("-SNAPSHOT","")
System.setProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!")
}

repositories {
Expand Down Expand Up @@ -63,6 +62,7 @@ def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absolu
opensearch_tmp_dir.mkdirs()

ext {
System.setProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
projectSubstitutions = [:]

Expand All @@ -86,9 +86,9 @@ ext {
cluster.getNodes().forEach { node ->
var creds = node.getCredentials()
if (creds.isEmpty()) {
creds.add(Map.of('username', 'admin', 'password', System.getProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD")))
creds.add(Map.of('username', 'admin', 'password', System.getProperty("password")))
} else {
creds.get(0).putAll(Map.of('username', 'admin', 'password', System.getProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD")))
creds.get(0).putAll(Map.of('username', 'admin', 'password', System.getProperty("password")))
}
}

Expand Down

0 comments on commit b66f263

Please sign in to comment.