Skip to content

Commit

Permalink
Merge pull request #1420 from chef/praj/SEC-32-2
Browse files Browse the repository at this point in the history
[rabbitmq] Remove guest user by default
  • Loading branch information
PrajaktaPurohit authored Nov 7, 2017
2 parents b3eb9dc + 6ab5bc7 commit c44f90a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license "Apache 2.0"
description "Installs and configures Chef Server from Omnibus"
long_description "Installs and configures Chef Server from Omnibus"
version "0.1.0"
version "0.1.1"
recipe "chef-server", "Configures the Chef Server from Omnibus"

%w{ ubuntu debian redhat centos oracle scientific fedora amazon }.each do |os|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@
retries 10
end

# Remove default guest users
execute "#{rmq_ctl} delete_user guest" do
environment (rabbitmq_env)
user opc_username
only_if "#{rmq_ctl} list_users| grep guest", :environment => rabbitmq_env
end

[ rabbitmq['vhost'], rabbitmq['actions_vhost'] ].each do |vhost|
execute "#{rmq_ctl} add_vhost #{vhost}" do
environment (rabbitmq_env)
Expand Down

0 comments on commit c44f90a

Please sign in to comment.