How to fetch Certificate (.jks file) stored in Secure Credentials Vault (SCV) using Java.
I had searched internet and found that we can get certificate like this for Keyvault:
KeyVaultClient keyVaultClient = new KeyVaultClient(credentials);
keyVaultClient.getCertificate(this.keyVaultUri, certificateName, '');
However, I don't know how to do this for Secure Credentials Vault (SCV).
- How to pass credentials to Vault Client?
- Do I have to use Secure Credentials Vault (SCV) credentials in the code?
KeyStore keyStore = KeyStore.getInstance("JKS");
//I have to get this .jks file from SCV
keyStore.load(new FileInputStream(".jks file"),
keyPassphrase.toCharArray());
SSLContext sslContext = SSLContexts.custom()
.loadKeyMaterial(keyStore, keyPassphrase.toCharArray())
.build();
HttpClient httpClient =
HttpClients.custom().setSSLContext(sslContext).build();