Skip to content

Commit a0574b2

Browse files
removed default admin credentials for alerting (#1399)
Co-authored-by: Dennis Toepker <[email protected]> (cherry picked from commit 3c50f7d) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 5448173 commit a0574b2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/security-test-workflow.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,20 +73,20 @@ jobs:
7373
if: env.imagePresent == 'true'
7474
run: |
7575
cd ..
76-
docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-alerting:test
76+
docker run -p 9200:9200 -d -p 9600:9600 -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!" -e "discovery.type=single-node" opensearch-alerting:test
7777
sleep 120
7878
7979
- name: Run Alerting Test for security enabled test cases
8080
if: env.imagePresent == 'true'
8181
run: |
82-
cluster_running=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure`
82+
cluster_running=`curl -XGET https://localhost:9200/_cat/plugins -u admin:myStrongPassword123! --insecure`
8383
echo $cluster_running
84-
security=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure |grep opensearch-security|wc -l`
84+
security=`curl -XGET https://localhost:9200/_cat/plugins -u admin:myStrongPassword123! --insecure |grep opensearch-security|wc -l`
8585
echo $security
8686
if [ $security -gt 0 ]
8787
then
8888
echo "Security plugin is available"
89-
./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=docker-cluster -Dsecurity=true -Dhttps=true -Duser=admin -Dpassword=admin
89+
./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=docker-cluster -Dsecurity=true -Dhttps=true -Duser=admin -Dpassword=myStrongPassword123!
9090
else
9191
echo "Security plugin is NOT available skipping this run as tests without security have already been run"
9292
fi

DEVELOPER_GUIDE.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ When launching a cluster using one of the above commands, logs are placed in `al
7676

7777
1. Setup a local opensearch cluster with security plugin.
7878

79-
- `./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin`
79+
- `./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=<admin-password>`
8080

81-
- `./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin --tests "org.opensearch.alerting.MonitorRunnerIT.test execute monitor returns search result"`
81+
- `./gradlew :alerting:integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername=opensearch -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=<admin-password> --tests "org.opensearch.alerting.MonitorRunnerIT.test execute monitor returns search result"`
8282

8383

8484
#### Building from the IDE

0 commit comments

Comments
 (0)