title: Chef::Exceptions::ValidationFailed error during EncryptedDataBagItem.load due to supposed regex mismatch
body: <p>I'm bootstrapping a node with a cookbook that worked fine with chef-client as of November, unfortunately the following code:</p>
  
  <pre><code>45:  #Configure PostgreSQL cluster -- create pertinent databases, users, and groups based on uploaded, decrypted shell here-document.
  47&gt;&gt; here_doc_name = Chef::EncryptedDataBagItem.load("database_configs", "tlcworx_#{node["tlcworx_db"]["environment"]}")["filename"]
  48:  here_doc_content = Chef::EncryptedDataBagItem.load("database_configs", "tlcworx_#{node["tlcworx_db"]["environment"]}")["content"]
  49:
  50:  open("#{node["tlcworx_db"]["tmp_dir"]}/#{here_doc_name}", 'w') { |f| f.puts here_doc_content }
  </code></pre>
  
  <p>Has rendered up the following error that halts the bootstrap:</p>
  
  <pre><code>Chef::Exceptions::ValidationFailed: Option data_bag's value {"encrypted_data"=&gt;"PffgOkpIpdoEJO8khrUOUQwqv2/vqrtzOf1U/z/a5xD4KqSH2/CkD1zHndzW\nwJL1\n", "iv"=&gt;"d/kiiPRQWQoKBTU5WF8NPw==\n", "version"=&gt;1, "cipher"=&gt;"aes-256-cbc"} does not match regular expression /^[\-[:alnum:]_]+$/
  </code></pre>
  
  <p>Obviously, I'm supplying the same <code>--secret-file</code> as I did back  then via knife CLI argument. Running <code>knife data bag edit database_configs tlcworx_uat --secret-file /path/to/secret.pem</code> decrypts the cookbook content appropriately, and doesn't error out. I've never seen this error before, and looking at other instances of this error I see they involve direct CLI operations in which the data bag in question is not named such as <a href="https://devopsengineer.wordpress.com/2015/02/16/knife-data-bag-from-file-error/" rel="nofollow" title="here">this instance</a>. Again, this is only upon bootstrap when a server's chef-client is communicating with the remote chef-server.</p>
  
  <p>I was hoping someone could provide some insight as to what could be causing the error. Chef client version is 12.7.2.</p>
  
  <p>Thanks in advance for any help on the matter!</p>