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

Fix permissions, based on scheme introduced by RabbitMQ 3.7.* #796

Closed
wants to merge 1 commit into from
Closed

Fix permissions, based on scheme introduced by RabbitMQ 3.7.* #796

wants to merge 1 commit into from

Conversation

dhoppe
Copy link
Member

@dhoppe dhoppe commented May 2, 2019

Fixes #703

@dhoppe dhoppe changed the title Fix permissions, baed on scheme introduced by RabbitMQ 3.7.* Fix permissions, based on scheme introduced by RabbitMQ 3.7.* May 2, 2019
Copy link
Contributor

@wyardley wyardley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do / can any of these contain sensitive strings that shouldn’t be world readable?

@@ -161,7 +161,7 @@
content => template($config),
owner => '0',
group => $rabbitmq_group,
mode => '0640',
mode => '0644',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the directories themselves are readable by the group, as are the files, I think these files can (and should?) stay 0640?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have my doubts, too. On the one hand, SSL certificates should not be readable by everyone, but on the other hand these defaults are given by the SGID bit via /etc/rabbitmq.

Maybe this question can be answered by someone who has more experience with RabbitMQ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean given by the sgid bit on the directory? You can have files with mode 0640 in a directory that’s world readable or executable w sgid bit (say 2755 or 2751). Sgid bit just affects default group ownership of files created in the directory afaik

@dhoppe dhoppe added the needs-feedback Further information is requested label May 3, 2019
@ekohl ekohl mentioned this pull request Dec 2, 2019
wyardley added a commit to wyardley/puppet-rabbitmq that referenced this pull request Apr 26, 2020
Narrower version of voxpupuli#796

* Set owner of config directories to rabbitmq user rather than root
* Set group of config directories explicitly to rabbitmq, and set setgid
bit
* Set more restrictive permissions on the SSL directories
* Update expectations, and test file permissions in acceptance tests
@wyardley
Copy link
Contributor

@dhoppe hope you don't mind - took a pass at a slightly narrower version of this in #835

cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this pull request Mar 26, 2021
Narrower version of voxpupuli#796

* Set owner of config directories to rabbitmq user rather than root
* Set group of config directories explicitly to rabbitmq, and set setgid
bit
* Set more restrictive permissions on the SSL directories
* Update expectations, and test file permissions in acceptance tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Owner of /etc/rabbitmq
2 participants