Permalink
Browse files

Merge pull request #4 from mattray/encrypted_dbags

markdown cleanup
  • Loading branch information...
2 parents 87e154e + 4b12103 commit cbbeee2ea6160f22e0eee386c558a00928a71012 @mattray mattray committed May 4, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 data_bags/README.md
View
@@ -30,7 +30,7 @@ Encrypted Data Bags
Added in Chef 0.10, encrypted data bags allow you to encrypt the contents of your data bags. The content of attributes will no longer be searchable. To use encrypted data bags, first you must have or create a secret key.
openssl rand -base64 512 > secret_key
-
+
You may use this secret_key to add items to a data bag during a create.
knife data bag create --secret-file secret_key passwords mysql
@@ -39,13 +39,13 @@ You may also use it when adding ITEMs from files,
knife data bag create passwords
knife data bag from file passwords data_bags/passwords/mysql.json --secret-file secret_key
-
+
The JSON for the ITEM must contain a key named "id" with a value equal to "ITEM" and the contents will be encrypted when uploaded. For example,
-{
- "id": "mysql",
- "password": "abc123"
-}
+ {
+ "id": "mysql",
+ "password": "abc123"
+ }
Without the secret_key, the contents are encrypted.
@@ -55,7 +55,7 @@ Without the secret_key, the contents are encrypted.
Use the secret_key to view the contents.
- knife data bag show passwords mysql --secret-file secret_key
+ knife data bag show passwords mysql --secret-file secret_key
id: mysql
password: abc123

0 comments on commit cbbeee2

Please sign in to comment.