3ofcoins/chef-browser — pull request #38 by xamebax (2014-01-14 19:24:36+00:00)
Title: [NFY] Feature/data bag item encryption

Feature description: If a data bag item is encrypted, its encrypted attributes are not shown and a key needs to be pasted or uploaded in order to access decrypted data. This feature will not available for users of Chef 10.x - in their case, the encryption will not be recognized and they should simply see a list of encrypted attributes.

(This can be merged only after #35)

Unfortunately, I have a problem with the fixtures. Running 'features/data_bag_item.feature', where a key to view decrypted attributes is provided, results in getting a `NotImplementedError - Currently decrypting only version 0 & 1 databags are supported`. I wasn't able to reproduce this error when actually using the app. The encrypted data bag item used for testing was created using knife; decrypting using both knife and chef browser worked. Here's the knife output:

```
$ knife data bag show some-data-bag secret-data-bag-item
id: secret-data-bag-item
login:
cipher: aes-256-cbc
encrypted_data: k/cjNY+0ORupMS0Ml0CA7hVaw64YdUeZfDjulKjwT7E=

iv: WeC/BubdLPQ7R6YIovtFDQ==

version: 1
password:
cipher: aes-256-cbc
encrypted_data: HpG5sXDexINdS75rysOayJ122f84amKeTgX6g3EgeFE=

iv: Oi7Y6mSpJyXiN7rgjNx0Ow==

version: 1

$ knife data bag show some-data-bag secret-data-bag-item --secret-file encrypted_data_bag_secret
id: secret-data-bag-item
login: admin
password: admin
```

If I understand correctly, it's version 1, which ought to be supported by Ridley. Or am I wrong? This is something that, unfortunately, I am not able to grasp.