Trouble with encrypted data bag


#1

Hey all,

I’m trying to get my ssl certs deployed to my new server via encrypted
data bags, largely following jtimberman’s blog post here:

http://jtimberman.posterous.com/64227128

I created the encrypted_data_bag_secret file according to his example,
and stored it in ~/.chef/encrypted_data_bag_secret. I then created the
data bag using that secret.

After creating the data bag and an item (in my case, ssl_certs) I
modified the item to include the json struct with my ssl cert data.
When using knife edit or show, the data is unencrypted as expected.

I then copied the encrypted_data_bag_secret to /etc/chef/ on my Vagrant VM.

When I went to actually push the files to my VM (via vagrant provision
appserver), I got a “bad decrypt” error. The gist:

https://gist.github.com/8e4f5e2a2c2909fdbf49

I’ve confirmed that the files are the same in both locations. Any
thoughts on fixing this?

Thanks,

–Steve


Steve Ivy // steve@wallrazer.com
Wallrazer, Inc.