-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Set Default file mode to 0600 #21
base: main
Are you sure you want to change the base?
Conversation
@cyberkov thanks for the PR, can you please rebase against our master branch? And is that really a backwards-incompatible change? |
I think it would be fine. The config file belonged to root before and now to the user otelcol. root would be able to read it anyway :) |
If we want to be very conservative, this should be considered a backwards-incompatible change for the rest of the applications: if one was picking in otelcol configuration to read something, the new behavior will prevent that. Another side note: if the service own the configuration file, it can change it permissions and content. That may not be an issue, but it is generally better in case of vulnerability for the configuration to be immutable by the pwned service and be owner by another user (root), belong to a group of the application, and have permission |
Config files could contain connection strings to databases, exporters,... this could result in (local) privilege escalation if every user is able to read those config files
So in terms of having a more secure base config, I think setting default file mode to 0600 prevents failures.