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

fixing permission of generated config #415

Merged
merged 2 commits into from Mar 11, 2017
Merged

fixing permission of generated config #415

merged 2 commits into from Mar 11, 2017

Conversation

dennybaa
Copy link
Contributor

@dennybaa dennybaa commented Mar 3, 2017

There's no need in such strict options for a configuration file. However if there is it should be configurable for an enduser.

@legal90
Copy link
Contributor

legal90 commented Mar 3, 2017

Hi @dennybaa,
Do you have any arguments why "there is no such need"?
Configuration file might contain secrets like encryption key, master token or AWS credentials.
The last two are not recommended to keep in the configuration file but anyway it should not be readable for other users, IMO.

cc: @johnbellone

@dennybaa
Copy link
Contributor Author

dennybaa commented Mar 3, 2017

@legal90 Hi, yes, please correct me if I'm wrong.

We are referring to a service or a check config not the main config, since the PR has nothing to do with that, right?
Consul doesn't require any parameters which should be sensitive: services and checks definitions.
So in 80% of cases users won't put anything sensitive into these files, for other 20% the mode might be configurable.

As for me now I couldn't reuse this cookbook for services configs generation, because the mode is strict and hardcoded :( In my case consul user/group is not known or viable during configs generation.

PS. I'm using the cookbook solely for services/checks configs generation.

@legal90
Copy link
Contributor

legal90 commented Mar 3, 2017

@dennybaa Ah, now got it, thank you for the clarification!
I'm sorry, I've misunderstood it at first and thought that it was about the consul service configuration (/etc/consul/consul.json), not check's config.

Then it looks good to me. But please, fix the TravisCI tests - this line should be changed to "0644" too: https://github.com/johnbellone/consul-cookbook/blob/49b4b3f/test/integration/default/default_spec.rb#L76

@dennybaa
Copy link
Contributor Author

dennybaa commented Mar 3, 2017

@legal90 well, np. I also suggest to update watch permissions :), though I'm not using em. 0640 also seems too much for a watch file.

@legal90 legal90 merged commit 793a33a into sous-chefs:master Mar 11, 2017
@legal90
Copy link
Contributor

legal90 commented Mar 11, 2017

Thanks 👍

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants