opensearch-project / data-prepper

OpenSearch Data Prepper is a component of the OpenSearch project that accepts, filters, transforms, enriches, and routes data at scale.
https://opensearch.org/docs/latest/clients/data-prepper/index/
Apache License 2.0
262 stars 201 forks source link

[v2.12.0] Ensure CI/documentation reflect changes to default admin credentials #3978

Open DarshitChanpura opened 9 months ago

DarshitChanpura commented 9 months ago

Background

Previously, when installing the security plugin demo configuration, the cluster was spun up with the default admin credentials, admin:admin. A change was made in main and backported to 2.x for the 2.12.0 release, which now requires an initial admin password to be passed in via the environment variable OPENSEARCH_INITIAL_ADMIN_PASSWORD. This will break some CI/testing that relies on OpenSearch to come up without setting this environment variable. This tracking issue is to ensure compliance with the new changes.

Coming from: https://github.com/opensearch-project/security/issues/3624

Acceptance Criteria

DarshitChanpura commented 9 months ago

Resolved by: https://github.com/opensearch-project/data-prepper/pull/3869

dlvenable commented 9 months ago

@DarshitChanpura , @derek-ho ,

We have a few CI tests that are working currently because OpenSearch 2.12 is not yet released. These still assume the admin password.

  1. These work with older versions, so we probably need to set the password here to admin:

https://github.com/opensearch-project/data-prepper/blob/df2bde6cc4d752013dc9a6f9266f651b43668b23/.github/workflows/opensearch-sink-opensearch-integration-tests.yml#L23-L38

  1. Some of the Docker examples are using the latest version 2 and do not set or use the password.

https://github.com/search?q=repo%3Aopensearch-project%2Fdata-prepper+%22opensearch%3A2%22&type=code

dlvenable commented 9 months ago

Also, see this comment:

https://github.com/opensearch-project/data-prepper/pull/3869#issuecomment-1874618527

DarshitChanpura commented 9 months ago

@dlvenable These need to be addressed post 2.12 release. OR a PR can be raised now that conditionally uses the correct password based on the version. The new password can be with env variable and it will only be picked up for >= 2.12 and will not be used on installs <2.12