1 Reply Latest reply on May 14, 2013 9:22 AM by giufusacc

    Vault encrypted system-properties from webapp

    giufusacc Newbie

      Hi,

       

      do you know (if possible) how to read vault encrypted system-property values (in standalone.xml) from a webapplication deployed in JBoss AS 7?

       

       

      Thank you

        • 1. Re: Vault encrypted system-properties from webapp
          giufusacc Newbie

          From your java class:

           

          String pwd = System.getProperty("yourPropName");

           

          try {

              pwd = SecurityVaultUtil.getValueAsString(pwd);

          } catch (SecurityVaultException e) {

               ...           

          }

           

           

          Naturally, before you should:

          1) create a keystore;

          2) encrypt and store pwds with vault script;

          3) configure vault block in jboss configuration file;

          4) set a system-property with name="yourPropName" and value="VAULT::block_value::password::MGU4MzM4...."