Skip to content

Commit ffe6557

Browse files
author
Cocker Koch
committed
Accept Datatype Sensitive for Secrets
1 parent 35940b4 commit ffe6557

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
@@ -104,7 +104,13 @@ def insync?(is)
104104
unlocking. Must be six or more characters in length. Cannot be used
105105
together with :password_file, but you must pass at least one of these parameters.'
106106

107+
munge do |value|
108+
value = value.unwrap if value.respond_to?(:unwrap)
109+
super(value)
110+
end
111+
107112
validate do |value|
113+
value = value.unwrap if value.respond_to?(:unwrap)
108114
raise Puppet::Error, "password is #{value.length} characters long; must be 6 characters or greater in length" if value.length < 6
109115
end
110116
end
@@ -127,7 +133,13 @@ def insync?(is)
127133
newparam(:destkeypass) do
128134
desc 'The password used to protect the key in keystore.'
129135

136+
munge do |value|
137+
value = value.unwrap if value.respond_to?(:unwrap)
138+
super(value)
139+
end
140+
130141
validate do |value|
142+
value = value.unwrap if value.respond_to?(:unwrap)
131143
raise Puppet::Error, "destkeypass is #{value.length} characters long; must be of length 6 or greater" if value.length < 6
132144
end
133145
end
@@ -160,6 +172,11 @@ def value=(*values)
160172
end
161173

162174
newparam(:source_password) do
175+
munge do |value|
176+
value = value.unwrap if value.respond_to?(:unwrap)
177+
super(value)
178+
end
179+
163180
desc 'The source keystore password'
164181
end
165182

0 commit comments

Comments
 (0)