title: Invalid Keystore format exception while configuring Wildfly 8.0.0 with VAULT to encrypt keystore password
body: <p>I have configured wildfly 8.0.0 server with JDK 1.8 u162 for providing HTTPS support to my application by creating self signed certificate. To configure it successfully I have specified keystore password in clear text in the standalone.xml file and it is working properly.<br>
  Now I want to make the keystore password in encrypted mode instead of clear text. To do that I have used VAULT script and performed all the require steps to generate the VAULT.dat file and  tag. After specifying require settings in the standalone.xml file, when I started my wild-fly server it has given me java.io.IOException: Invalid keystore format exception and due to that system was not deployed.<br>
  I have performed following steps:<br>
  1) To generate keystore file I have used following command and followed the instructions.<br>
      <strong>keytool -genkey -keyalg RSA -alias vault -keystore osp_keystore.jks -validity 365 -keysize 2048</strong></p>
  
  <p>2) I have opened the VAULT window (vault.bat) to encrypt the keystore password. I have performed all the require steps which has given me following information for configuring in the standlone.xml file.   </p>
  
  <pre><code>&lt;vault&gt;
    &lt;vault-option name="KEYSTORE_URL" value="D:\osp\standalone\configuration\osp_keystore.jks"/&gt;
    &lt;vault-option name="KEYSTORE_PASSWORD" value="MASK-ZCA9zDtIIr7BbsQlgnChk"/&gt;
    &lt;vault-option name="KEYSTORE_ALIAS" value="ospvault"/&gt;
    &lt;vault-option name="SALT" value="ASDF1234"/&gt;
    &lt;vault-option name="ITERATION_COUNT" value="50"/&gt;
    &lt;vault-option name="ENC_FILE_DIR" value="D:\osp\standalone\configuration\vault\"/&gt;
  &lt;/vault&gt;
  
  Vault Block:keystore
  Attribute Name:password
  VAULT::keystore::password::1
  </code></pre>
  
  <p>3) I have configured standalone.xml file with following tags.<br>
      a) Specified above  tag in between the <code>&lt;/extensions&gt;</code> and <code>&lt;management&gt;</code> tags.<br>
      b) Under the <code>&lt;security-realm name="ApplicationRealm"&gt;</code> tag added following tag.  </p>
  
  <pre><code>&lt;server-identities&gt;
                   ssl&gt;&lt;keystore path=" osp_keystore.jks" relative-to="jboss.server.config.dir" keystore-password="${VAULT::keystore::password::1}" /&gt;&lt;/ssl&gt;
                  &lt;/server-identities&gt;
  </code></pre>
  
  <p>c) Under the <code>&lt;subsystem xmlns="urn:jboss:domain:undertow:1.0"&gt;</code> tag bind the ApplicationRealm with HTTPS.</p>
  
  <pre><code>&lt;https-listener name="https" socket-binding="https" security-realm="ApplicationRealm"/&gt;
  </code></pre>