Skip to content

Commit a64f409

Browse files
authored
Remove references to default admin creds (#3869)
Signed-off-by: Derek Ho <[email protected]>
1 parent e0ed91c commit a64f409

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

data-prepper-plugins/opensearch/opensearch_security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sink:
88
- opensearch:
99
...
1010
username: "admin"
11-
password: "admin"
11+
password: "<admin password>"
1212
```
1313

1414
or by using user credential assigned with a role that has the below required permissions.

docs/log_analytics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ log-pipeline:
113113
hosts: [ "https://localhost:9200" ]
114114
# Change to your credentials
115115
username: "admin"
116-
password: "admin"
116+
password: "<admin password>"
117117
# Add a certificate file if you are accessing an OpenSearch cluster with a self-signed certificate
118118
#cert: /path/to/cert
119119
# If you are connecting to an Amazon OpenSearch Service domain without

docs/trace_analytics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ raw-pipeline:
123123
hosts: [ "https://localhost:9200" ]
124124
# Change to your credentials
125125
username: "admin"
126-
password: "admin"
126+
password: "<admin password>"
127127
# Add a certificate file if you are accessing an OpenSearch cluster with a self-signed certificate
128128
#cert: /path/to/cert
129129
# If you are connecting to an Amazon OpenSearch Service domain without
@@ -137,7 +137,7 @@ raw-pipeline:
137137
index_type: trace-analytics-raw
138138
# Change to your credentials
139139
username: "admin"
140-
password: "admin"
140+
password: "<admin password>"
141141
# Add a certificate file if you are accessing an OpenSearch cluster with a self-signed certificate
142142
#cert: /path/to/cert
143143
# If you are connecting to an Amazon OpenSearch Service domain without
@@ -174,7 +174,7 @@ service-map-pipeline:
174174
index_type: trace-analytics-service-map
175175
# Change to your credentials
176176
username: "admin"
177-
password: "admin"
177+
password: "<admin password>"
178178
# Add a certificate file if you are accessing an OpenSearch cluster with a self-signed certificate
179179
#cert: /path/to/cert
180180
# If you are connecting to an Amazon OpenSearch Service domain without

examples/dev/trace-analytics-sample-app/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ services:
8484
- "9600:9600"
8585
environment:
8686
- discovery.type=single-node
87+
- "OPENSEARCH_INIITAL_ADMIN_PASSWORD=myStrongPassword123!"
8788
networks:
8889
- my_network
8990

examples/dev/trace-analytics-sample-app/resources/data-prepper-wait-for-opensearch-and-start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# SPDX-License-Identifier: Apache-2.0
66
#
77

8-
until [[ $(curl --write-out %{http_code} --output /dev/null --silent --head --fail https://node-0.example.com:9200 -u admin:admin --insecure) == 200 ]]; do
8+
until [[ $(curl --write-out %{http_code} --output /dev/null --silent --head --fail https://node-0.example.com:9200 -u admin:myStrongPassword123! --insecure) == 200 ]]; do
99
echo "Waiting for OpenSearch to be ready"
1010
sleep 1
1111
done

release/smoke-tests/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ data-prepper_1 | 2021-12-03T19:57:31,925 [grok-pipeline-prepper-worker-7
7676
```
7777
### 3. Confirm Open Search is running
7878
```
79-
curl -s -k -u 'admin:admin' 'https://localhost:9200/_cat/indices'
79+
curl -s -k -u 'admin:<admin password>' 'https://localhost:9200/_cat/indices'
8080
```
8181
If indicies are displayed Open Search is running.
8282
```
@@ -90,14 +90,14 @@ yellow open otel-v1-apm-span-000001 3pN9V1YNSjSMY5ggHa2TfA 1 1 12 0 28.3k
9090
**To confirm if Open Search is receiving log data run**
9191
Use the following cURL command to query the index `test-grok-index` for any documents. **Note**: The results may not show all documents received.
9292
```
93-
curl -k -u 'admin:admin' https://localhost:9200/test-grok-index/_search
93+
curl -k -u 'admin:<admin password>' https://localhost:9200/test-grok-index/_search
9494
```
9595
If in your results the JSON path `.hits.total.value` has a value of 0 Open Search is not receiving log data. Confirm with the Data Prepper logs records are being processed from the buffer and no error messages are displayed.
9696

9797
**To confirm if Open Search is receiving trace data run**
9898
Use the following cURL command to query the `otel-v1-apm-span-000001` index for documents containing **PythonService**. These documents will be generated by the **otel-span-exporter**, sent to **otel-collector**, then sent to **data-prepper**, then sent to **opensearch**.
9999
```
100-
curl -k -u 'admin:admin' https://localhost:9200/otel-v1-apm-span-000001/_search?q=PythonService
100+
curl -k -u 'admin:<admin password>' https://localhost:9200/otel-v1-apm-span-000001/_search?q=PythonService
101101
```
102102
If in your results the JSON path `.hits.total.value` has a value of 0 Open Search is not receiving trace data. Confirm OTel opentelemetry-collector logs are continueally displaying metrics and no errors are printing. Next confirm with the Data Prepper logs records are being processed from the buffer and no error messages are displayed.
103103

release/smoke-tests/data-prepper/config/pipelines.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ grok-pipeline:
99
- opensearch:
1010
hosts: [ "https://node-0.example.com:9200" ]
1111
username: "admin"
12-
password: "admin"
12+
password: "myStrongPassword123!"
1313
index: "test-grok-index"
1414

1515
entry-pipeline:
@@ -32,7 +32,7 @@ raw-pipeline:
3232
- opensearch:
3333
hosts: [ "https://node-0.example.com:9200" ]
3434
username: "admin"
35-
password: "admin"
35+
password: "myStrongPassword123!"
3636
index_type: trace-analytics-raw
3737

3838
service-map-pipeline:
@@ -46,5 +46,5 @@ service-map-pipeline:
4646
- opensearch:
4747
hosts: ["https://node-0.example.com:9200"]
4848
username: "admin"
49-
password: "admin"
49+
password: "myStrongPassword123!"
5050
index_type: trace-analytics-service-map

release/smoke-tests/run-smoke-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function usage() {
5353
function query_hits_gt_zero () {
5454
local URL=$1
5555
local SEARCH_RESPONSE
56-
SEARCH_RESPONSE=$(curl -s -k -u 'admin:admin' "${URL}")
56+
SEARCH_RESPONSE=$(curl -s -k -u 'admin:myStrongPassword123!' "${URL}")
5757
local LOG_COUNT=0
5858

5959
if command -v jq &> /dev/null
@@ -138,7 +138,7 @@ WAITING_FOR_DATAPREPPER=true
138138
echo -n "Waiting for Data Prepper to start "
139139
while ${WAITING_FOR_DATAPREPPER}
140140
do
141-
if curl -s -k -u 'admin:admin' 'https://localhost:9200/_cat/indices' > /dev/null && curl -s -k -H "Content-Type: application/json" -d '[{"log": "smoke test log "}]' 'http://localhost:2021/log/ingest' > /dev/null
141+
if curl -s -k -u 'admin:myStrongPassword123!' 'https://localhost:9200/_cat/indices' > /dev/null && curl -s -k -H "Content-Type: application/json" -d '[{"log": "smoke test log "}]' 'http://localhost:2021/log/ingest' > /dev/null
142142
then
143143
WAITING_FOR_DATAPREPPER=false
144144
else

0 commit comments

Comments
 (0)