-
Notifications
You must be signed in to change notification settings - Fork 129
Add support for encrypted data bag items v2 #27
Conversation
Added a few commits, I wasn't aware of some of the dependencies before seeing Travis failure logs. |
chef/encrypted_data_bag_item.py
Outdated
import hashlib | ||
|
||
class EncryptedDataBagItem(chef.DataBagItem): | ||
SUPPORTED_ENCRYPTION_VERSIONS = (1,2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this doesn't actually support version 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually only Version 0 is not supported at the moment (default encryption version in Chef 10.x http://docs.opscode.com/chef/essentials_data_bags.html).
I think by using OpenSSL via ctypes version 0 can be implemented as well in the future (pkcs5_keyivgen needs to be implemented http://apidock.com/ruby/v1_9_2_180/OpenSSL/Cipher/pkcs5_keyivgen).
Hi coderanger, Thanks for all your comments to my code! They are very valuable for me, since as you saw, I don't know many good programming practices in Python. I updated the pull request with some more commits. Most of them were changes made according to your suggestions. I also refactored these ugly nested classes (encryptors, decryptors), please let me know if you like the code more. Best, |
Hey, Is there anything I can help you with in order to review these changes? |
Hi Coderanger, What still needs done on this pull request to get it merged in? I see this is a bit outdated, but I would really like support for encrypted data bags so I can help finish this up. Benji |
…ed data bag items v2
Is there anything I can do to help see this merged? |
We should try to merge this asap. |
This branch was ancient, impossible to merge. Closing this PR. I refreshed that with current master & merged @fpedrini's code (from https://github.com/rapid7/pychef/tree/encrypted_databags) and submitted another Pr: |
Hi,
This is an updated version of my previous pull request (#26).
As you suggested, I got rid of m2crypto wrappers over OpenSSL functions by using them directly (via ctypes) - please see chef/aes.py file.
Please let me know if this looks good.
Best regards,
Kamil