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

[Bug]: [Docker] Security plugin demo config install script executes even if security plugin is disabled #4445

Closed
DarshitChanpura opened this issue Feb 13, 2024 · 2 comments · Fixed by #4446
Assignees
Labels
bug Something isn't working docker v2.12.0

Comments

@DarshitChanpura
Copy link
Member

Describe the bug

The code in opensearch-docker-entrypoint.sh currently installs demo config first if enabled and then check whether security plugin is disabled. See here

To reproduce

Run:

docker pull opensearchstaging/opensearch:2.12.0.9399 && docker run -it -p 9200:9200 -e "DISABLE_SECURITY_PLUGIN=true" -e "discovery.type=single-node" opensearchstaging/opensearch:2.12.0.9399
2.12.0.9399: Pulling from opensearchstaging/opensearch

Expected behavior

Cluster should start without any errors related to security-plugin.

Screenshots

If applicable, add screenshots to help explain your problem.

Host / Environment

No response

Additional context

No response

Relevant log output

~ docker pull opensearchstaging/opensearch:2.12.0.9399 && docker run -it -p 9200:9200 -e "DISABLE_SECURITY_PLUGIN=true" -e "discovery.type=single-node" opensearchstaging/opensearch:2.12.0.9399
2.12.0.9399: Pulling from opensearchstaging/opensearch
Digest: sha256:87b2c2bed78237714aea05572b71757470b9b0622867615dde14c1ac3e2eeb27
Status: Image is up to date for opensearchstaging/opensearch:2.12.0.9399
docker.io/opensearchstaging/opensearch:2.12.0.9399

What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview opensearchstaging/opensearch:2.12.0.9399
Enabling execution of install_demo_configuration.sh for OpenSearch Security Plugin
OpenSearch 2.12.0 onwards, the OpenSearch Security Plugin a change that requires an initial password for 'admin' user.
Please define an environment variable 'OPENSEARCH_INITIAL_ADMIN_PASSWORD' with a strong password string.
If a password is not provided, the setup will quit.
 For more details, please visit: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/
### OpenSearch Security Demo Installer
### ** Warning: Do not use on production or public reachable systems **
OpenSearch install type: rpm/deb on Linux 6.6.12-linuxkit aarch64
OpenSearch config dir: /usr/share/opensearch/config/
OpenSearch config file: /usr/share/opensearch/config/opensearch.yml
OpenSearch bin dir: /usr/share/opensearch/bin/
OpenSearch plugins dir: /usr/share/opensearch/plugins/
OpenSearch lib dir: /usr/share/opensearch/lib/
Detected OpenSearch Version: 2.12.0
Detected OpenSearch Security Version: 2.12.0.0
No custom admin password found. Please provide a password via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD.
➜  ~
@rishabh6788
Copy link
Collaborator

Please update the README on the PR.

@DarshitChanpura
Copy link
Member Author

done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docker v2.12.0
Projects
3 participants