Conversation
|
This looks reasonable to me, how are we planning on testing it? |
|
Testing via spec testing here then validation in our environment |
|
@binford2k - If you have time I could use some help understanding how to mock the encrypt and decrypt functions... I thought I had it figured out but nothing I have tired works. |
|
Well this is the first time that I've seen The way I mock functions like this in onceover is by doing a: let(:pre_condition) {
pp = <<-END
function node_encrypt::secret ($foo) { $foo }
END
} |
|
Thanks @dylanratcliffe! That works locally :) Can you remind me what the |
ae7407b to
a436d1e
Compare
a436d1e to
325b951
Compare
325b951 to
dc91801
Compare
|
@mikkergimenez how do you feel about the testing changes that are part of this PR? Do they cover things well enough? |
|
Note: This is built on top of #15 - do not merge before that one. The real diff is available at release_100...use_node_encrypt |
|
@genebean The |
0ceef7d to
e4fbc70
Compare
|
@dylanratcliffe Turns out Rubocop said I had to kill off the let(:pre_condition) do
'function node_encrypt::secret ($foo) { $foo }'
end |
e4fbc70 to
343b324
Compare
|
This needs testing before merging. |
7053bcd to
6b5cc83
Compare
|
tested on our canary nodes then verified I could still log in with name and password |
|
@dylanratcliffe / @binford2k - I have rearranged a couple of things here and the seem to be working based on running this branch on some canary nodes. Having said that, now that I am taking a variable that is a Sensitive string and wrapping it in Deferred the way I am mocking node_encrypt is no longer working. Below is a copy of how I am currently mocking this... would love any help you can provide let(:pre_condition) do
'function node_encrypt::secret ($foo) { $foo }'
endThe failing test is of Aside from the testing issue I am not totally sure that I am correctly using |
This is a breaking change for Puppet < 6 as it requires the use of the Deferred type.
6b5cc83 to
89b08bf
Compare
|
Just rebased. Will work on getting this merged soon (it got forgotten about) |
This is a breaking change for Puppet < 6 as it requires the use of the Deferred type. The idea here is to limit the exposure of passwords passed to the user resource as much as possible. This is especially important on Windows nodes as their passwords are moved around in plain text ( 😿 ).
Note: This is built on top of #15 - do not merge before that one. The real diff is available at release_100...use_node_encrypt