You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Credential-containing config file is world-readable (644). This is a security risk because it gives access to the credentials of various services to any valid system user.
Steps to Reproduce:
Use a wrapper cookbook to run supermarket-omnibus-cookbook, setting (for example) your Postgres server to something custom
Examine the ownership and permissions of /etc/supermarket/supermarket.json
Expected Result:
supermarket.json, containing credentials to AWS, Postgres, etc should not be world readable. The permissions should be 600. The file should probably be owned by supermarket.
Actual Result:
supermarket.json is mode 644. (-rw-r--r--)
This file in particular is also owned by root, whereas the other files in the directory are owned by supermarket.
The text was updated successfully, but these errors were encountered:
Sidenote: this problem may be better fixed with a change to chef_ingredient allowing ownership/mode to be set on the config property, or even further upstream in the supermarket RPM itself. I'm not familiar with the patterns (ie chef_ingredient) used in this omnibus cookbook, but I thought this would be the best place to start.
Yes, chef-ingredient is the first place we should consider addressing the permissions on that file.
The supermarket-omnibus-cookbook's supermarket_server resource uses the chef_ingredient resource which uses the ingredient_config resource to manage a product's config file.
Cookbook version
3.0.0
Chef-client version
13.8.5
Platform Details
AWS, CentOS 7
Scenario:
Credential-containing config file is world-readable (
644
). This is a security risk because it gives access to the credentials of various services to any valid system user.Steps to Reproduce:
/etc/supermarket/supermarket.json
Expected Result:
supermarket.json
, containing credentials to AWS, Postgres, etc should not be world readable. The permissions should be600
. The file should probably be owned by supermarket.Actual Result:
supermarket.json
is mode644
. (-rw-r--r--
)This file in particular is also owned by root, whereas the other files in the directory are owned by supermarket.
The text was updated successfully, but these errors were encountered: