private Vault vault;
private String path;
private VaultConfig config;
private String folder;
/**
* Constructs an instance of the Vault driver with sensible defaults, configured to use the supplied token
* for authentication.
*
* @param token {@link String}
* @param address {@link String}
* @throws VaultException
*/
public VaultApp(final String address, final String token, String path, String folder) {
this.path = path;
this.folder = folder;
try {
config = new VaultConfig()
.address(address)
.token(token)
.sslConfig(new SslConfig().verify(false))
.build();
vault = new Vault(config);
} catch (Exception e) {
LOGGER.error(e.getMessage());
}
}
public List<String> listSecrets() throws VaultException {
return vault.logical().list(path);
}
while using list method I am getting following error back:
com.bettercloud.vault.VaultException: Vault responded with HTTP status code: 405 Response body: {"errors":["1 error occurred:\n\n* unsupported operation"]}
I have following List method written in my code
while using list method I am getting following error back:
com.bettercloud.vault.VaultException: Vault responded with HTTP status code: 405 Response body: {"errors":["1 error occurred:\n\n* unsupported operation"]}
I tried to dig and use API directly from hashicorp and looks like LIST is case-sensitive, which might need to be updated here: https://github.com/BetterCloud/vault-java-driver/blob/master/src/main/java/com/bettercloud/vault/api/Logical.java#L198