Skip to content

Commit 7698bad

Browse files
Merge pull request #373 from cocker-cc/Accept_Sensitive
Accept Datatype Sensitive for Secrets
2 parents 9bb35ad + ffe6557 commit 7698bad

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/puppet/type/java_ks.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,13 @@ def insync?(is)
106106
unlocking. Must be six or more characters in length. Cannot be used
107107
together with :password_file, but you must pass at least one of these parameters.'
108108

109+
munge do |value|
110+
value = value.unwrap if value.respond_to?(:unwrap)
111+
super(value)
112+
end
113+
109114
validate do |value|
115+
value = value.unwrap if value.respond_to?(:unwrap)
110116
raise Puppet::Error, "password is #{value.length} characters long; must be 6 characters or greater in length" if value.length < 6
111117
end
112118
end
@@ -129,7 +135,13 @@ def insync?(is)
129135
newparam(:destkeypass) do
130136
desc 'The password used to protect the key in keystore.'
131137

138+
munge do |value|
139+
value = value.unwrap if value.respond_to?(:unwrap)
140+
super(value)
141+
end
142+
132143
validate do |value|
144+
value = value.unwrap if value.respond_to?(:unwrap)
133145
raise Puppet::Error, "destkeypass is #{value.length} characters long; must be of length 6 or greater" if value.length < 6
134146
end
135147
end
@@ -162,6 +174,11 @@ def value=(*values)
162174
end
163175

164176
newparam(:source_password) do
177+
munge do |value|
178+
value = value.unwrap if value.respond_to?(:unwrap)
179+
super(value)
180+
end
181+
165182
desc 'The source keystore password'
166183
end
167184

0 commit comments

Comments
 (0)