Get data from password protected file SSL

40 views
Skip to first unread message

Gautam Chand Nutalapati

unread,
Jan 21, 2014, 6:02:14 PM1/21/14
to puppet...@googlegroups.com
I have a key and file A.

usually to retrieve data from file, I guess we do something like  $var = File("path/A")
How do we retrieve the data from same file if file "A" is protected by a key? (I have the Key)

(Related to SSL)
I have a private key file that i want to password protect and use puppet instead of user typing pass phrase every time.
Encrypting whole contents of file is not possible, so planning to encrypt pass phrase.

Any suggestions?

jcbollinger

unread,
Jan 23, 2014, 10:01:54 AM1/23/14
to puppet...@googlegroups.com


On Tuesday, January 21, 2014 5:02:14 PM UTC-6, Gautam Chand Nutalapati wrote:
I have a key and file A.

usually to retrieve data from file, I guess we do something like  $var = File("path/A")


That would be spelled
$var = file("path/A")

 
How do we retrieve the data from same file if file "A" is protected by a key? (I have the Key)



You probably want a custom function to use in place of file().  You can prototype it with an inline template:

$var = inline_template("<%=
  # Ruby code here that evaluates to the wanted plaintext
%>")

Details will depend on the type of encryption, etc..

 
(Related to SSL)
I have a private key file that i want to password protect and use puppet instead of user typing pass phrase every time.
Encrypting whole contents of file is not possible, so planning to encrypt pass phrase.

Any suggestions?



I don't understand.  If the point is that the user doesn't have to type the pass phrase, then doesn't that necessarily involve the file NOT being password-protected?  How is Puppet supposed to change that?  Puppet is involved only in managing the file itself; it has no role to play when the file is used.


John

Marc Huffnagle

unread,
Jan 23, 2014, 10:07:21 AM1/23/14
to puppet...@googlegroups.com
I'm not sure if this is exactly what you're looking for, but check out
https://github.com/sihil/hiera-eyaml-gpg

- Marc
Reply all
Reply to author
Forward
0 new messages