-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove references to admin:admin #1298
Changes from 4 commits
69eba91
911a23c
4c26601
859d45f
7bb465e
b47c3d9
a1ba4e3
2925971
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ import org.opensearch.gradle.test.RestIntegTestTask | |
|
||
buildscript { | ||
ext { | ||
System.setProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "myStrongPassword123!") | ||
isSnapshot = "true" == System.getProperty("build.snapshot", "true") | ||
opensearch_version = System.getProperty("opensearch.version", "3.0.0-SNAPSHOT") | ||
buildVersionQualifier = System.getProperty("build.version_qualifier", "") | ||
|
@@ -429,7 +430,7 @@ def configureCluster(OpenSearchCluster cluster, Boolean securityEnabled) { | |
} | ||
CrossClusterWaitForHttpResource wait = new CrossClusterWaitForHttpResource(protocol, cluster.getFirstNode().getHttpSocketURI(), cluster.nodes.size()) | ||
wait.setUsername("admin") | ||
wait.setPassword("admin") | ||
wait.setPassword(System.getProperty("OPENSEARCH_INITIAL_ADMIN_PASSWORD")) | ||
return wait.wait(500) | ||
} | ||
|
||
|
@@ -682,6 +683,7 @@ clusters.each { name -> | |
if (securityEnabled) { | ||
plugin(provider(securityPluginOld)) | ||
cliSetup("opensearch-security/install_demo_configuration.sh", "-y") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @DarshitChanpura how is this being used? How do we pass in "admin" as the password here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we don't pass it here. We have to export it as a separate command. And if you want to use admin as password you can pass in option |
||
|
||
} | ||
// Currently fetching the ARCHIVE distribution fails on mac as it tries to fetch the Mac specific "DARWIN" distribution | ||
// for Opensearch which is not publish yet. Changing this to INTEG_TEST to make it work on mac. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,9 +70,18 @@ then | |
SECURITY_ENABLED="true" | ||
fi | ||
|
||
IFS='.' read -ra version_array <<< "$version" | ||
|
||
|
||
|
||
if [ -z "$CREDENTIAL" ] | ||
then | ||
CREDENTIAL="admin:admin" | ||
# Starting in 2.12.0, security demo configuration script requires an initial admin password | ||
if (( ${version_array[0]} > 2 || (${version_array[0]} == 2 && ${version_array[1]} >= 12) )); then | ||
CREDENTIAL="admin:myStrongPassword123!" | ||
else | ||
CREDENTIAL="admin:admin" | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic to use strong password in 2.12.0 onwards |
||
fi | ||
|
||
USERNAME=`echo $CREDENTIAL | awk -F ':' '{print $1}'` | ||
|
@@ -118,4 +127,4 @@ else | |
TRANSPORT_PORT="9300" | ||
fi | ||
./gradlew singleClusterSanityTest -Dfollower.http_host="$BIND_ADDRESS:$BIND_PORT" -Dfollower.transport_host="$BIND_ADDRESS:$TRANSPORT_PORT" -Dsecurity_enabled=$SECURITY_ENABLED -Duser=$USERNAME -Dpassword=$PASSWORD --console=plain | ||
fi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should be setting this value based on versions. i.e. for 2.11 and lower, it should be
admin
else usemyStrongPassword123
. Tests for 2.11 and lower would fail otherwise as the integtest.sh is modified to followed the same conditional assignment