-
Notifications
You must be signed in to change notification settings - Fork 287
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] Password set in OPENSEARCH_INITIAL_ADMIN_PASSWORD actually not used, OpenSearch uses the default password #4939
Comments
Does your cluster fail to start with an error along the lines of "this password doesn't meet complexity requirements"? Try with a password that we know works, like |
Hi @svok , The volume attached to the docker container, does it already contain the security index? If possible can you destroy the volume or attach a new one to see if it takes effect? |
|
@gaiksaya
|
@svok were you able to resolve the issue? I am changing the env variable, but it assumes the default password. |
Yes. The variable affects only on the first start. All other starts ignore it in spite of this variable remains mandatory. |
If the volume is not created from scratch but from an older deployment then the var will not set new password and will keep the old password. Transfer to security repo as they are the developer to this setup. Thanks. |
[Triage] Thank you for filing this issue @svok. As others have mentioned, make sure to remove any container volumes before starting the cluster so that the security index initializes from scratch. I'm closing this issue, please re-open if you suspect a bug. |
Describe the bug
I use docker-compose file with the following content:
In this docker-compose I set OPENSEARCH_INITIAL_ADMIN_PASSWORD with 'adm-Password0' for OpenSearch. Fluentbit uses OpenSearch for disposing logs. But it doesn't work with password of OpenSearch. It works actually only with the default password 'admin'.
According to https://opensearch.org/blog/replacing-default-admin-credentials/ I have to use 'adm-Password0' indeed. But the test from this blog is not passing. It is getting passed if I use the default password 'admin'.
On the other hand, variable OPENSEARCH_INITIAL_ADMIN_PASSWORD is used indeed. If I remove it from the configuration I get the following error:
Related component
Other
To Reproduce
curl -ku admin:adm-Password0 https://localhost:9200/_cluster/health?pretty
Expected behavior
OpenSearch should use password that is set via OPENSEARCH_INITIAL_ADMIN_PASSWORD variable. Requests with default password
admin
should cause 403 error.Additional Details
Plugins
By default in docker image of OpenSearch
Screenshots
Not applicable
Host/Environment (please complete the following information):
Additional context
Nothing special
The text was updated successfully, but these errors were encountered: