Skip to content

Adding encrypted data bags support - #45

Open
maksar wants to merge 1 commit into
fnichol:masterfrom
maksar:master
Open

maksar wants to merge 1 commit into
fnichol:masterfrom
maksar:master

Conversation

@maksar

@maksar maksar commented Aug 3, 2013

Copy link
Copy Markdown

By using "data_bag_encrypted" : true it is now possible to use encrypted data bags.

@erithmetic

Copy link
Copy Markdown

+1 on this, I've been using this branch for several months because I like to store developer ssh keys in my user data bags.

@johnbellone

Copy link
Copy Markdown

@fnichol What do you think? +1

@phlipper

phlipper commented Oct 7, 2013

Copy link
Copy Markdown

👍

4 similar comments
@rgarver

rgarver commented Nov 25, 2013

Copy link
Copy Markdown

+1

@viyh

viyh commented Apr 9, 2014

Copy link
Copy Markdown

+1

@j-miyake

Copy link
Copy Markdown

+1

@zenizh

zenizh commented Oct 14, 2014

Copy link
Copy Markdown

+1

@ranjib

ranjib commented Mar 21, 2015

Copy link
Copy Markdown
Collaborator

@maksar thanks for the PR and very sorry for getting back so late.
Can we remove the encrypted data bag secret optional (or just nuke it). If dropped in right place, the default should work as it is. We have to explicitly provide it only if we are using secret dropped in some custom location.

@theckman theckman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is a lot of value in getting this merged-in to the LWRP. I agree with Ranjib's feedback and would like to see the data_bag_encrption_key attribute removed.

I know this has been outstanding for awhile, so if you aren't able to make these changes please let us know.

Comment thread recipes/data_bag.rb
name = i.gsub(/[.]/, '-')

u = if node['user']['data_bag_encrypted']
Chef::EncryptedDataBagItem.load(bag, name, node['user']['data_bag_encryption_key'])

@theckman theckman Nov 7, 2016

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should rely on the key being provided in the client's config and not here. We should remove any references to this attribute:

Chef::EncryptedDataBagItem.lad(bag, name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants