Skip to content

Commit 00c4f07

Browse files
Remove instances of hard admin credentials (#981) (#992)
* Remove instances of hard admin credentials opensearch-project/opensearch-build#4302 Signed-off-by: Derek Ho <[email protected]> (cherry picked from commit 8391566) Co-authored-by: Derek Ho <[email protected]>
1 parent 791ce6d commit 00c4f07

14 files changed

+49
-23
lines changed

.github/workflows/release-e2e-workflow-template-windows.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
TERM: xterm
2323
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
2424
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
25+
# 2.12 onwards security demo configuration require a custom admin password
26+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
2527
steps:
2628
- name: Set up JDK
2729
uses: actions/setup-java@v1
@@ -62,8 +64,8 @@ jobs:
6264
else
6365
echo "Keep OpenSearch Security"
6466
nohup ./opensearch-windows-install.bat &
65-
timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do echo sleeping 5; sleep 5; done'
66-
curl -sk https://localhost:9200/_cluster/health?pretty -u admin:admin
67+
timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do echo sleeping 5; sleep 5; done'
68+
curl -sk https://localhost:9200/_cluster/health?pretty -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }}
6769
fi
6870
netstat -anP tcp | grep LISTEN | grep 9200 || netstat -ntlp | grep 9200
6971
shell: bash
@@ -104,8 +106,8 @@ jobs:
104106
else
105107
echo "Keep Dashboards Security"
106108
bin/opensearch-dashboards.bat &
107-
timeout 300 bash -c 'while [[ "$(curl -k http://localhost:5601/api/status -u admin:admin | jq -r '.status.overall.state')" != "green" ]]; do echo sleeping 5; sleep 5; done'
108-
curl -sk localhost:5601/api/status -u admin:admin | jq
109+
timeout 300 bash -c 'while [[ "$(curl -k http://localhost:5601/api/status -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} | jq -r '.status.overall.state')" != "green" ]]; do echo sleeping 5; sleep 5; done'
110+
curl -sk localhost:5601/api/status -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} | jq
109111
fi
110112
netstat -anP tcp | grep LISTEN | grep 5601 || netstat -ntlp | grep 5601
111113
shell: bash

.github/workflows/release-e2e-workflow-template.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
TERM: xterm
2626
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
2727
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
28+
# 2.12 onwards security demo configuration require a custom admin password
29+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
2830
steps:
2931
- name: Set up JDK
3032
uses: actions/setup-java@v1
@@ -61,8 +63,8 @@ jobs:
6163
else
6264
echo "Keep OpenSearch Security"
6365
./opensearch-tar-install.sh &
64-
timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
65-
curl https://localhost:9200 -u admin:admin --insecure
66+
timeout 900 bash -c 'while [[ "$(curl -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
67+
curl https://localhost:9200 -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} --insecure
6668
fi
6769
- name: Get OpenSearch-Dashboards
6870
run: |
@@ -92,8 +94,8 @@ jobs:
9294
else
9395
echo "Keep Dashboards Security"
9496
bin/opensearch-dashboards serve ${{ inputs.osd-serve-args }} &
95-
timeout 300 bash -c 'while [[ "$(curl -u admin:admin -k http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
96-
curl http://localhost:5601/api/status -u admin:admin --insecure
97+
timeout 300 bash -c 'while [[ "$(curl -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
98+
curl http://localhost:5601/api/status -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} --insecure
9799
fi
98100
- name: Get Cypress version
99101
id: cypress_version

.github/workflows/release-signoff-chrome.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-ad-only.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-ism-only.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-tests-in-memory-0.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-tests-in-memory-10.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-tests-in-memory-20.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium-tests-in-memory-5.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

.github/workflows/release-signoff-chromium.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
TERM: xterm
1414
# make Node run in ipv4 first so that cypress can detect 5601 port in CI environment
1515
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
16+
# 2.12 onwards security demo configuration require a custom admin password
17+
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'
1618
steps:
1719
- name: Checkout functional-test
1820
uses: actions/checkout@v2
@@ -29,7 +31,7 @@ jobs:
2931
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
3032
cd opensearch-${{ env.VERSION }}/
3133
./opensearch-tar-install.sh &
32-
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34+
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
3335
- name: Get OpenSearch-Dashboards
3436
run: |
3537
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz

0 commit comments

Comments
 (0)