Categories: None [Edit]
secure_data_bag
# SecureDataBag / Knife Secure Bag
Knife Secure Bag provides a consistent interface to DataBagItem, EncryptedDataBagItem as well as the custom created SecureDataBagItem while also providing a few extra handy features to help in your DataBag workflows.
SecureDataBagItem, can not only manage your existing DataBagItems and EncryptedDataBagItems, but it also provides you with a DataBag type which enables you to selectively encrypt only some of the fields in your DataBag thus allowing you to be able to search for the remaining fields.
## Installation
To build and install the plugin add it your Gemfile or run:
```shell
gem install secure_data_bag
```
## Configuration
#### Knife Secure Bag
Defaults for the Knife command may be provided in your _knife.rb_ file.
```ruby
knife[:secure_data_bag][:encrypted_keys] = %w(
password
ssh_keys
ssh_ids
public_keys
private_keys
keys
secret
)
knife[:secure_data_bag][:secret_file] = "#{local_dir}/secret.pem"
knife[:secure_data_bag][:export_root] = "#{kitchen_dir}/data_bags"
knife[:secure_data_bag][:export_on_upload] = true
knife[:secure_data_bag][:defaults][:secrets][:export_format] = 'plain'
```
To break this up:
`knife[:secure_data_bag][:encrypted_keys] = []`
When Knife Secure Bag encrypts a hash with an _encryption format_ of *nested*, it will recursively walk through the hash from the bottom up and encrypt any key found within this array.
`knife[:secure_data_bag][:secret_file]`
When encryption is required, the shared secret found at this location will be loaded.
`knife[:secure_data_bag][:export_root]`
When exporting a data\_bag\_item, files will be created in below this root directory. Typically this would be the data\_bag folder located within your kitchen.
`knife[:secure_data_bag][:export_on_upload]`
When a data\_bag\_item is edited using `knife secure bag edit`, it may be automatically exported to the _export\_root_.
`knife[:secure_data_bag][:defaults][:secrets][:export_format]`
The configuration file additionally supports the _defaults_ has...
Total
Ranking: 20,508 of 183,471
Downloads: 68,600
Daily
Ranking: 33,893 of 183,459
Downloads: 2
Downloads Trends
Ranking Trends
Num of Versions Trends
Popular Versions (Major)
Popular Versions (Major.Minor)
Depended by
Rank | Downloads | Name |
---|
Owners
# | Gravatar | Handle |
---|---|---|
1 | serafini010 |