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

erlang_cookie echo'ed to agent output #837

Closed
nerdcorenet opened this issue Jun 2, 2020 · 2 comments · Fixed by #838
Closed

erlang_cookie echo'ed to agent output #837

nerdcorenet opened this issue Jun 2, 2020 · 2 comments · Fixed by #838
Labels
bug Something isn't working

Comments

@nerdcorenet
Copy link

nerdcorenet commented Jun 2, 2020

Since erlang_cookie is sensitive data (authentication credential for cluster members), it should not be shown in the output of puppet agent.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.15.0
  • Distribution: Ubuntu 18.04
  • Module version: Latest (master)

How to reproduce (e.g Puppet code you use)

class { 'rabbitmq':
  config_cluster           => true,
  cluster_nodes            => ['rabbit1', 'rabbit2'],
  cluster_node_type        => 'ram',
  erlang_cookie            => 'A_SECRET_COOKIE_STRING',
  wipe_db_on_cookie_change => true,
}

What are you seeing

Notice: /Stage[main]/Rabbitmq::Config/Rabbitmq_erlang_cookie[/var/lib/rabbitmq/.erlang.cookie]/content: current_value '', should be 'A_SECRET_COOKIE_STRING'

What behaviour did you expect instead

Notice: /Stage[main]/Rabbitmq::Config/Rabbitmq_erlang_cookie[/var/lib/rabbitmq/.erlang.cookie]/content: current_value '', should be {md5}df8c77441bb0be2876cdfe6fd69d70ce
@wyardley
Copy link
Contributor

wyardley commented Jun 2, 2020

It's been a while, but does anyone know the current state of the art about preventing sensitive information from being leaked? I know that Puppet has the "sensitive" type, but my memory is that, in the past, it was not actually that tricky to prevent things from being exposed.

https://puppet.com/blog/my-journey-securing-sensitive-data-puppet-code/ has some info that may be useful.

tobias-urdin added a commit to tobias-urdin/puppet-rabbitmq that referenced this issue Jun 3, 2020
Override the is_to_s and should_to_s
methods in the puppet property to make
sure it's not shown in outputs.

Closes: voxpupuli#837
tobias-urdin added a commit to tobias-urdin/puppet-rabbitmq that referenced this issue Jun 3, 2020
Override the is_to_s and should_to_s
methods in the puppet property to make
sure it's not shown in outputs.

Closes: voxpupuli#837
@nerdcorenet
Copy link
Author

The usual method for a File resource is to pass the parameter "show_diff => false" but I'm not sure what this causes to happen internally or how to apply this technique to other resource types

https://puppet.com/docs/puppet/latest/types/file.html#file-attribute-show_diff

tobias-urdin added a commit to tobias-urdin/puppet-rabbitmq that referenced this issue Jun 3, 2020
Override the is_to_s and should_to_s
methods in the puppet property to make
sure it's not shown in outputs.

Closes: voxpupuli#837
@wyardley wyardley added the bug Something isn't working label Jul 9, 2020
cegeka-jenkins pushed a commit to cegeka/puppet-rabbitmq that referenced this issue Mar 26, 2021
Override the is_to_s and should_to_s
methods in the puppet property to make
sure it's not shown in outputs.

Closes: voxpupuli#837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants