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

hiera.yaml is word readable. Allow setting different permissions to hide secrets #266

Merged
merged 2 commits into from
Jun 20, 2019

Conversation

maxadamo
Copy link
Contributor

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: ANY
  • Ruby: ANY
  • Distribution: ANY
  • Module version: 3.4.1

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

puppet agent -t 🐱

What are you seeing

file permissions being set to 0644

What behaviour did you expect instead

let the user assign different permissions. I do have Redis token and Hashicorp Vault token set in hiera.yaml

Copy link

@pillarsdotnet pillarsdotnet left a comment

Choose a reason for hiding this comment

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

LGTM; should probably have tests, though.

Copy link
Member

@Dan33l Dan33l left a comment

Choose a reason for hiding this comment

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

LGTM.

@rnelson0
Copy link
Member

@maxadamo Could you add at least one test for this new parameter? Thanks.

commit 808b7b7
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 23:28:05 2019 +0200

    use ensure file to test mode on rspec

commit 5fa56e0
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 23:24:26 2019 +0200

    fix hiera.yaml location

commit dd66950
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 23:15:46 2019 +0200

    further fix

commit 0522809
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 22:59:30 2019 +0200

    correcting typos in rspec

commit 8972fcc
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 22:45:28 2019 +0200

    adding test against file mode

commit 2f0a875
Author: Massimiliano Adamo <[email protected]>
Date:   Wed Jun 19 21:45:13 2019 +0200

    add test for parameter mode
@maxadamo
Copy link
Contributor Author

@maxadamo Could you add at least one test for this new parameter? Thanks.
@rnelson0 I have added the test. It's something as following:

is_expected.to contain_file('/dev/null/hiera.yaml').with(
  'ensure' => 'file',
  'mode'   => '0640'
)

@Dan33l Dan33l merged commit 156ca9a into voxpupuli:master Jun 20, 2019
@Dan33l Dan33l added the enhancement New feature or request label Jun 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants