title: How to Read KeyStore File Path From standalone.xml wildfly
body: <p>First of all i am sorry if my question is not valid because i don't have any idea on the SSL implementation and validating the request from a trusted certificate authority.</p>
  
  <p>Basically we are using .jks file to validate the request and we are using JAX-RS deployed on wildfly.</p>
  
  <p>In the standalone.xml we have done the configuration like this:</p>
  
  <pre><code>&lt;management&gt;
   &lt;security-realms&gt;
  **&lt;security-realm name="SslRealm"&gt;
    &lt;server-identities&gt;
      &lt;ssl&gt;
        &lt;keystore path="../../../ssl/keystore.jks" relative-to="jboss.server.config.dir" keystore-password="changeme"/&gt;
      &lt;/ssl&gt;
    &lt;/server-identities&gt;
  &lt;/security-realm&gt;**
  &lt;/security-realms&gt;
  </code></pre>
  
  <p>Now in the java code we need to read the .jks file , username and password:</p>
  
  <pre><code> public static Response getArtifactsHttps(String authInfo, String area) {
          String username = "username";
          String password1 = "password";
          StringBuilder authorization = new StringBuilder();
          authorization.append(username).append(":").append(password1);
  
          // String authHeader = "Basic " + Base64.getEncoder().encodeToString(authorization.toString().getBytes());
          Response response = RestAssured
                  .given()
                  .keyStore("pathOffile\\DemoTrust.jks", "DemoTrustKeyStorePassPhrase")
                  .when()
                  .contentType(MediaType.APPLICATION_JSON)
                  .accept(MediaType.APPLICATION_JSON)
                  .header(Constant.HTTP_HEADERS.AUTHORIZATION, "Basic " + authInfo)
                  .header(Constant.HTTP_HEADERS.MODULETYPE, Constant.AC_MODULETYPE.CLIENT)
                  .get("login").thenReturn();
  
          System.out.println("RESPONSE" + response);
          return response;
      }
  </code></pre>
  
  <blockquote>
    <p>In the above you can see i have hardcoded the path of the .jks file
    pathoffile\DemoTrust.jks also username and password i have hardcoded.</p>
  </blockquote>
  
  <p>Now i want to read all these value from the standalone.xml file. Can anybody suggest me how i can do this using java?</p>