-
Notifications
You must be signed in to change notification settings - Fork 277
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
Improve ownership and permissions of files in OpenSearch-Dashboards deb and rpm packages #3952
Improve ownership and permissions of files in OpenSearch-Dashboards deb and rpm packages #3952
Conversation
Cc @peterzhuamazon who worked on the OpenSearch part of this PR. |
Codecov Report
@@ Coverage Diff @@
## main #3952 +/- ##
=======================================
Coverage 92.06% 92.06%
=======================================
Files 187 187
Lines 5669 5673 +4
=======================================
+ Hits 5219 5223 +4
Misses 450 450 |
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.
Approved. Well done.
Taking a look on it soon. |
scripts/pkg/build_templates/opensearch-dashboards/rpm/opensearch-dashboards.rpm.spec
Outdated
Show resolved
Hide resolved
Similar to the issue fixed in opensearch-project#3898, OpenSearch-Dashboards package has unexpected files owner and permissions. This ensure the installed files are not owner by the opensearch-dashboards user (preventing the program to overwrite itself with malicious code if the service has some kind of vulnerability), and make sure logs and data cannot be accessed by random users. Signed-off-by: Romain Tartière <[email protected]>
fc480af
to
407415f
Compare
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.
Thanks @smortex, approved.
In opensearch-project#3952, the permissions where changed to fix some inconsistencies in the .deb and .rpm packaging. This change restricted access to the configuration files (which where previously readable by all users) but failed to adjust the files permissions so that the service can access these files. Ensure the configuration directory and files belong to the root user and the opensearch-dashboards group Signed-off-by: Romain Tartière <[email protected]>
In opensearch-project#3952, the permissions where changed to fix some inconsistencies in the .deb and .rpm packaging. This change restricted access to the configuration files (which where previously readable by all users) but failed to adjust the files ownership so that the service can access these files. Ensure the configuration directory and files belong to the root user and the opensearch-dashboards group Signed-off-by: Romain Tartière <[email protected]>
…packages (opensearch-project#3952)" This reverts commit b5f7ae2.
…opensearch-project#3952) Signed-off-by: Romain Tartière <[email protected]>
…opensearch-project#3952) Signed-off-by: Romain Tartière <[email protected]> Signed-off-by: Peter Zhu <[email protected]>
…opensearch-project#3952) Signed-off-by: Romain Tartière <[email protected]> Signed-off-by: Peter Zhu <[email protected]>
Description
Similar to the issue fixed in #3898, OpenSearch-Dashboards package has
unexpected files owner and permissions.
This ensure the installed files are not owner by the
opensearch-dashboards user (preventing the program to overwrite itself
with malicious code if the service has some kind of vulnerability), and
make sure logs and data cannot be accessed by random users.
Issues Resolved
Fixes #3815