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

Removes support for txt file for specifying initial admin password and prevents password from being printed in the logs #3850

Conversation

DarshitChanpura
Copy link
Member

@DarshitChanpura DarshitChanpura commented Dec 14, 2023

Description

Storing an admin password in a text file that can be available to anyone that has access to config folder at any time could be potentially vulnerable. Although, originally added with the perception to support autonomous process to easily read from the config folder, we now only allow passing the admin password through environment variable as it is session-scoped. Further, we don't print the password to the logs to avoid any traces.

Testing

  • automated tests

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@DarshitChanpura
Copy link
Member Author

DarshitChanpura commented Dec 14, 2023

I'm updating the plugin install workflow rn, since it relied on text file being generated for passing admin password

Fixed.

Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #3850 (65fa400) into main (1846fd1) will increase coverage by 1.35%.
Report is 4 commits behind head on main.
The diff coverage is 70.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3850      +/-   ##
==========================================
+ Coverage   65.24%   66.59%   +1.35%     
==========================================
  Files         298      298              
  Lines       21197    21188       -9     
  Branches     3454     3453       -1     
==========================================
+ Hits        13830    14111     +281     
+ Misses       5669     5360     -309     
- Partials     1698     1717      +19     
Files Coverage Δ
...g/opensearch/security/support/ConfigConstants.java 95.23% <ø> (ø)
...pensearch/security/tools/democonfig/Installer.java 71.67% <100.00%> (+71.67%) ⬆️
...y/tools/democonfig/SecuritySettingsConfigurer.java 73.91% <64.70%> (+73.91%) ⬆️

... and 7 files with indirect coverage changes

Copy link
Collaborator

@derek-ho derek-ho left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Darshit Chanpura <[email protected]>
@peternied peternied merged commit 62aed21 into opensearch-project:main Dec 14, 2023
82 checks passed
DarshitChanpura added a commit to DarshitChanpura/security that referenced this pull request Dec 15, 2023
…d prevents password from being printed in the logs (opensearch-project#3850)

Signed-off-by: Darshit Chanpura <[email protected]>
cwperks pushed a commit that referenced this pull request Dec 18, 2023
…t for Bundled JDK for this tool and updates DEVELOPER_GUIDE.md (#3845)

### Description
Backports following commits related to demo configuration tool from main
to 2.x:

- [x]
[17748b9](17748b9)
from #3669
- [x]
[4496440](4496440)
from #3734
- [x]
[06d8c29](06d8c29)
from #3777
- [x]
[e698315](e698315)
from #3807
- [x]
[9d11524](9d11524)
from #3843
- [x]
[62aed21](62aed21)
from #3850
- [x]
[ceabe13](ceabe13)
from #3844

### Issues Resolved
- Related to #3827


### Testing
- automated tests

### Check List
- [x] New functionality includes testing
- [x] New functionality has been documented
- [x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and
signing off your commits, please check
[here](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Darshit Chanpura <[email protected]>
prabhask5 pushed a commit to prabhask5/opensearch-security that referenced this pull request Jan 11, 2024
…d prevents password from being printed in the logs (opensearch-project#3850)

Signed-off-by: Darshit Chanpura <[email protected]>
Signed-off-by: Prabhas Kurapati <[email protected]>
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
…d prevents password from being printed in the logs (opensearch-project#3850)

Signed-off-by: Darshit Chanpura <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2.12.0 Items targeting 2.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants