Skip to content
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 reference to default credentials #217

Merged
merged 8 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions .github/actions/opensearch/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ do
--env "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
--env "http.port=${port}" \
--env "action.destructive_requires_name=false" \
--env "OPENSEARCH_INITIAL_ADMIN_PASSWORD=myStrongPassword123!" \
--env "plugins.security.disabled=${DISABLE_SECURITY}" \
--ulimit nofile=65536:65536 \
--ulimit memlock=-1:-1 \
Expand All @@ -55,18 +56,35 @@ if [[ $DISABLE_SECURITY = true ]]; then
--silent \
http://os1:$PORT
else
docker run \
--network cluster \
--rm \
appropriate/curl \
--max-time 120 \
--retry 120 \
--retry-delay 1 \
--retry-connrefused \
--show-error \
--silent \
--insecure \
https://admin:admin@os1:$PORT
if [[ $CLUSTER_VERSION = 'latest' ]]; then
derek-ho marked this conversation as resolved.
Show resolved Hide resolved
# Since 2.12.0, security demo configuration requires an initial admin password, which is set to
# myStrongPassword123!
docker run \
--network cluster \
--rm \
appropriate/curl \
--max-time 120 \
--retry 120 \
--retry-delay 1 \
--retry-connrefused \
--show-error \
--silent \
--insecure \
https://admin:myStrongPassword123!@os1:$PORT
else
docker run \
--network cluster \
--rm \
appropriate/curl \
--max-time 120 \
--retry 120 \
--retry-delay 1 \
--retry-connrefused \
--show-error \
--silent \
--insecure \
https://admin:admin!@os1:$PORT
fi
fi

sleep 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

test-opensearch-security:
env:
TEST_OPENSEARCH_SERVER: https://admin:admin@localhost:9200
TEST_OPENSEARCH_SERVER: https://admin:myStrongPassword123!@localhost:9200
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to hard code this here since from now on, "latest" will be > 2.12

PORT: 9200
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
### Added
- Pass in an initial admin password, required by security after 2.12.0 release ([#217](https://github.com/opensearch-project/opensearch-ruby/issues/217))
### Changed
### Deprecated
### Removed
Expand Down
Loading