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

File permissions on config files should allow more restrictive setting #965

Closed
leitzler opened this issue Dec 6, 2018 · 1 comment · Fixed by #966
Closed

File permissions on config files should allow more restrictive setting #965

leitzler opened this issue Dec 6, 2018 · 1 comment · Fixed by #966
Labels
bug Something isn't working good first issue Great issues for new Athenians to work on!
Milestone

Comments

@leitzler
Copy link
Contributor

leitzler commented Dec 6, 2018

The config files must have 0640 as file permission, otherwise the proxy won't start. This check should be a mask check to allow a more restrictive permission (like 0600, 0400, etc)

athens/pkg/config/config.go

Lines 149 to 151 in 48f7ca7

// Assume unix based system (MacOS and Linux)
if fInfo.Mode() != 0640 {
return errors.E(op, f+" should have 0640 as permission")

Environment (please complete the following information):

  • OS: linux
  • Go version : 1.11.2
  • Buffalo Version : -
  • Proxy version : master
  • Storage (fs/mongodb/s3 etc.) : mem/file
@arschles arschles added the bug Something isn't working label Dec 6, 2018
@arschles arschles added this to the v0.3.0 milestone Dec 6, 2018
@arschles arschles added the good first issue Great issues for new Athenians to work on! label Dec 6, 2018
@leitzler
Copy link
Contributor Author

leitzler commented Dec 8, 2018

Ok, so I also noticed that is is only the filter file that is checked.
I would say that is way more important to check the actual config file permissions since it can contain secrets like credentials for 3rd party services and such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Great issues for new Athenians to work on!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants