-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Add loopback_users parameter (adds ability to allow guest user to login remotely) #699
Conversation
…fault policy of the loopback access
…t change the default behaviour of the module
Just wondering, should this be |
I'm not sure, the semantic of the parameter is not the best definitely, because the aim of this attribute is to allow the remote connections for a group of users, but by default with this configuration:
you're allowing the connection to another bind (not only the loopback interface) to the guest user, in my opinion this seems a bit extrange, and there's not so much documentation about this configuration attribute |
All right them, now the new module variable is called allow_remote_guest_connection as you suggested @wyardley I think it would be more appropriate |
I guess another way to do it would be to make a parameter I'm going to request feedback from @bastelfreak |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey people,
IMO the approach from @wyardley is slightly better because it allows more flexibility.
Thanks @bastelfreak |
Yes, of course, It make sense for me, the problem with this approach is the semantic of this configuration parameter, because I'm not sure what would be the default value for this list, I guest it could be something like that:
but I'm not sure and I didn't find good information about this, only a configuration example but it's enough. So let me make a try with this new approach. |
…opback interfaces
…est' user explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change (see notes); other than that, and fixing the rubocop failures (https://travis-ci.org/voxpupuli/puppet-rabbitmq/jobs/370510357), seems sensible and well implemented.
If you're able, can you try to squash the whole thing down to one commit in your feature branch?
manifests/init.pp
Outdated
@@ -278,6 +279,7 @@ | |||
Boolean $ssl_erl_dist = $rabbitmq::params::ssl_erl_dist, | |||
Optional[String] $rabbitmqadmin_package = $rabbitmq::params::rabbitmqadmin_package, | |||
Array $archive_options = $rabbitmq::params::archive_options, | |||
Optional[Array] $loopback_users = $rabbitmq::params::loopback_users, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a strange quirk of how Puppet works, but a param can't be Optional if it has a default. Well, technically, it can, but it can only be overridden with undef
using hiera, so it's safer to not make it optional, and pass in an empty array (many people's preferred pattern anyway) to set it to an empty list when necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, you're right, I'm working with puppet 4 and the automatic hiera bind then I forgot the "old" params pattern; I think an empty list as default value for this parameter is not the best choice to achieve the behaviour that you could expect, so I could make not optional this parameter a fix the default value to the list with the guest user, let's see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I think the right fix is to make the parameter not optional, and if users want to allow the guest user to login remotely as well, they can pass in an empty array. You could explicitly mention that in the param docs if you want to make it more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the default value should be ['guest']
and then just Array $loopback_users
. I think we're saying the same thing 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we're in the same page
ps - https://www.rabbitmq.com/configure.html#configuration-file does confirm that 'guest' is the default setting for that parameter, so I think we're good there. |
@jjuarez Merged, and thanks for the contribution! |
It has been a pleasure to collaborate, thanks @wyardley |
@jjuarez also interesting workaround noted here: #480 (comment) Obviously, not needed now, but might be handy if you need to tweak other config variables; I should have thought of that. |
Thanks @wyardley it looks very useful to help me “temporary” with my configuration issue |
Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Change-Id: I0c291bf5611f02983c430179206556bae3b38736
* Update tripleo-heat-templates from branch 'master' - Merge "Properly set loopback_users via rabbitmq::loopback_users" - Properly set loopback_users via rabbitmq::loopback_users Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Change-Id: I0c291bf5611f02983c430179206556bae3b38736
Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Change-Id: I0c291bf5611f02983c430179206556bae3b38736 (cherry picked from commit 04a5937)
Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Change-Id: I0c291bf5611f02983c430179206556bae3b38736 (cherry picked from commit 04a5937)
Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Note: not a 100% clean cherry pick due to tht path changes. (cherry picked from commit 04a5937) Change-Id: I0c291bf5611f02983c430179206556bae3b38736
Sorta resurrecting https://review.opendev.org/#/c/324016/ now that voxpupuli/puppet-rabbitmq#699 merged. This commit prevents a duplicate entry for loopback_users in the rabbitmq.config file: {loopback_users, [<<"guest">>]}, {loopback_users, []}, keeping only the expected empty array. Note: not a 100% clean cherry pick due to tht path changes. (cherry picked from commit 04a5937) Change-Id: I0c291bf5611f02983c430179206556bae3b38736
…in remotely) (voxpupuli#699) * Adds new parameter loopback_users, defaulting to ["guest"]
Pull Request (PR) description
The aim of this pull request is to give the possibility to allow remote connections with the guest user, of course this is not the default configuration, because it implies some security risks
This Pull Request (PR) fixes the following issues
Fixes #698