Skip to content

Commit b06717c

Browse files
Remove default admin credentials (#1134) (#1144)
* Remove default admin credentials * Replace default password with a placeholder in README files --------- (cherry picked from commit 7192d84) Signed-off-by: Jackie Han <jkhanjob@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 72b7d53 commit b06717c

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

.github/workflows/test_security.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,16 @@ jobs:
6868
if: env.imagePresent == 'true'
6969
run: |
7070
cd ..
71-
docker run -p 9200:9200 -d -p 9600:9600 -e "discovery.type=single-node" opensearch-ad:test
71+
docker run -p 9200:9200 -d -p 9600:9600 -e "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!" -e "discovery.type=single-node" opensearch-ad:test
7272
sleep 90
7373
- name: Run AD Test
7474
if: env.imagePresent == 'true'
7575
run: |
76-
security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:admin --insecure |grep opensearch-security|wc -l`
76+
security=`curl -XGET https://localhost:9200/_cat/plugins?v -u admin:myStrongPassword123! --insecure |grep opensearch-security|wc -l`
7777
if [ $security -gt 0 ]
7878
then
7979
echo "Security plugin is available"
80-
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin
80+
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=myStrongPassword123!
8181
else
8282
echo "Security plugin is NOT available, skipping integration tests"
8383
fi

DEVELOPER_GUIDE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Currently we just put RCF jar in lib as dependency. Plan to publish to Maven and
4242
2. `./gradlew :run` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed
4343
3. `./gradlew :integTest` launches a single node cluster with anomaly-detection (and job-scheduler) plugin installed and runs all integration tests except security
4444
4. ` ./gradlew :integTest --tests="**.test execute foo"` runs a single integration test class or method
45-
5. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=admin` launches integration tests against a local cluster and run tests with security
45+
5. `./gradlew integTestRemote -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Duser=admin -Dpassword=<admin-password>` launches integration tests against a local cluster and run tests with security
4646
6. `./gradlew spotlessApply` formats code. And/or import formatting rules in `.eclipseformat.xml` with IDE.
4747
7. `./gradlew adBwcCluster#mixedClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by upgrading one of the nodes with the current version of OpenSearch with anomaly-detection and job-scheduler creating a mixed cluster.
4848
8. `./gradlew adBwcCluster#rollingUpgradeClusterTask -Dtests.security.manager=false` launches a cluster with three nodes of bwc version of OpenSearch with anomaly-detection and job-scheduler and tests backwards compatibility by performing rolling upgrade of each node with the current version of OpenSearch with anomaly-detection and job-scheduler.

dataGeneration/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The dataset created will have two categorical fields to test a multi-entity AD (
3939
### Ingestion Parameters
4040

4141
| Parameter Name | Description | Default | Required
42-
| ----------- | ----------- | ----------- | ----------- |
42+
| ----------- | ----------- | ---------- | ----------- |
4343
| --endpoint | Endpoint OpenSearch cluster is running on | No default | Yes
4444
| --index-name | Name of index that will be created and ingested too | No default | Yes
4545
| --threads | Number of threads to be used for data ingestion | No deafult | Yes
@@ -51,7 +51,7 @@ The dataset created will have two categorical fields to test a multi-entity AD (
5151
| --number-of-process | number of 'process' entities (process is one of the categorical field that an entity is defined by)| 1000 | No
5252
| --number-of-historical-days | number of day of historical data to ingest | 2 | No
5353
| --username | username for authentication if security is true | admin | No
54-
| --password | password for authentication if security is true | admin | No
54+
| --password | password for authentication if security is true | <admin-password> | No
5555

5656

5757
### Ingestion Commands

dataGeneration/generate-cosine-data-multi-entity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
parser.add_argument("-np", "--number-of-process", type=int, default=1000, help="number of 'process' entities, deafult is set to 1000, there will be two keyword categories in this index (must be at least 1)" )
4343
parser.add_argument("-hd", "--number-of-historical-days", type=int, default=2, help="number of day of historical data to ingest, defaults to 2")
4444
parser.add_argument("-u", "--username", type=str, default="admin", help="username for authentication if security is true")
45-
parser.add_argument("-pass", "--password", type=str, default="admin", help="password for authentication if security is true")
45+
parser.add_argument("-pass", "--password", type=str, default="myStrongPassword123!", help="password for authentication if security is true")
4646

4747
args = parser.parse_args()
4848

0 commit comments

Comments
 (0)