This repository was archived by the owner on May 9, 2020. It is now read-only.
Add support for encrypted data bag items #26
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
I noticed there is no support for interaction with encrypted data bag items so I created one, I hope you will like it.
It's based on the m2crypto package (python wrapper over openssl) - AFAIK it's available as a system package for most of the popular distributions (RedHat - https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/5.7_Technical_Notes/m2crypto.html, Ubuntu - http://packages.ubuntu.com/pl/lucid/python-m2crypto) so it should not be a problem to create such a dependency.
The pull request contains some specs, I also tested the interaction with OpsCode's knife and it works just great!
Please notice there is no support for Chef encryption in legacy version 0, since it uses some custom ruby-based keygen implementation for encryption (http://apidock.com/ruby/v1_9_2_180/OpenSSL/Cipher/pkcs5_keyivgen) and I couldn't find a Python equivalent. Version 0 is also deprecated/disabled in Chef 11 according to this article http://docs.opscode.com/chef/essentials_data_bags.html so it shouldn't be a big problem and I guess the feature is still very useful.
Please let me know if you have any questions or concerns.
Best regards from Poland,
Kamil Bednarz
Please let me know if you