-
Notifications
You must be signed in to change notification settings - Fork 24
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
Addresses changes made to security demo config install tool #214
Merged
msfroh
merged 6 commits into
opensearch-project:main
from
DarshitChanpura:admin-cred-update
Jan 20, 2024
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
958d33b
Addresses changes made to security demo config install tool
DarshitChanpura b558a10
Addresses PR feedback
DarshitChanpura 6df16df
Merge branch 'main' into admin-cred-update
DarshitChanpura 7d7db74
Updates version selection logic
DarshitChanpura 901887e
Merge branch 'main' into admin-cred-update
DarshitChanpura a5da908
Require password as an argument on 2.12 and higher
msfroh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than hard-coding, we should probably take the admin password as a command-line arg.
@DarshitChanpura -- did earlier versions support the
OPENSEARCH_INITIAL_ADMIN_PASSWORD
env var? Or does that change come in 2.12?I'm wondering if it makes sense to change the scripts to require the initial admin password for all versions, where it will be required for 2.12 and a good idea for earlier versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting 2.12 a custom strong password is required.
This change is introduced in 2.12 and will be present for all versions 2.12 and above
That might be your design decision as a maintainer. Since the admin password is required only for 2.12 and above, IMO we can keep a version check in place and require it only for >= 2.12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't answer my question. Allow me to rephrase:
Is it POSSIBLE to set the admin password in
docker-compose.yml
before 2.12?If so, I will change the script to always require a custom password, for all versions, since it's a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can set the env variable
OPENSEARCH_INITIAL_ADMIN_PASSWORD
in the docker-compose.yml. This value will only be picked up for 2.12 and aboveYou, can change the script to have a default strong password, and then based on the version it will be picked.
Does that answer your query?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thank you.
In that case, it does make more sense to accept and enforce it for version 2.12 and higher only, because requiring the parameter on earlier versions and then ignoring it (leaving the default password as
admin
) would be a terrible user experience.In fact, we should reject the parameter (or at least output a warning that it's being ignored) if the version is pre-2.12.
I'll make those changes to the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made those changes and pushed the commit to this PR.
@DarshitChanpura, please let me know what you think. Thanks!