Hi Tyler,
These are the steps I am executing for creating data bags on windows
C:\Users\sachkkum\chef-repo>set RANDFILE=D:\Secret_key_Win\.rnd
C:\Users\sachkkum\chef-repo>openssl rand -base64 2048 > D:\Secret_key_Win\encrypted_data_bag_secret
C:\Users\sachkkum\chef-repo>set EDITOR="%windir%\system32\notepad.exe"
C:\Users\sachkkum\chef-repo>knife data bag create --local-mode credentials WinTest --secret-file D:\Secret_key_Win\encrypted_data_bag_secret
Created data_bag[credentials]
Created data_bag_item[WinTest]
C:\Users\sachkkum\chef-repo>cat data_bags\credentials\WinTest.json
{
"id": "WinTest",
"username": {
"encrypted_data": "IvDS8Sb+ZS3Xwl5sw74/17moKk/fwnkMMeEycCTlJvY=\n",
"iv": "UakZ8xbJtsUI+aB04nSEeg==\n",
"version": 1,
"cipher": "aes-256-cbc"
},
"password": {
"encrypted_data": "qKJqOTKFWeuE9HznSy+7+/KxsURHvcK3+b7CClBSB2U=\n",
"iv": "j4cMqNGiMWzAJA8W1ssFRg==\n",
"version": 1,
"cipher": "aes-256-cbc"
}
}
C:\Users\sachkkum\chef-repo>
secret = Chef::EncryptedDataBagItem.load_secret('D:\Secret_key_Win\encrypted_data_bag_secret')
win_cred=Chef::EncryptedDataBagItem.load("credentials","WinTest", secret)
while loading I am getting error message as "FATAL: Chef::Exceptions::ValidationFailed: Data Bag Items must contain a Hash or Mash!"