We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am using Logical API and even though the REST call works, which is supposedly executed by the Logical API, the API does not work.
---- This does not work ----
final VaultConfig authConfig = new VaultConfig().address(vaultAddress).sslConfig(new SslConfig().verify(false)).nameSpace("mynamespace").build(); final Vault authVault = new Vault(authConfig); final AuthResponse authResp = authVault.auth().loginByAppRole("venafi-pki","xxxxxx", "xxxxxxxx"); final String token = authResp.getAuthClientToken(); VaultConfig config = new VaultConfig().address(vaultAddress) .token(token) .sslConfig(new SslConfig().verify(false)) // .prefixPath("venafi-pki/cert/mycert") .build(); Vault vault = new Vault(config); Map<String,String> password = vault.logical() .read("venafi-pki/cert/mycert") .getData(); System.out.println("Vault password is " + password); -- This produces empty result --
----This works -----
final RestResponse restResponse = new Rest()//NOPMD .url(config.getAddress() + "/v1/" + "venafi-pki/cert/mycert") .header("X-Vault-Token", config.getToken()) .header("X-Vault-Namespace", "mynamespace") .connectTimeoutSeconds(config.getOpenTimeout()) .readTimeoutSeconds(config.getReadTimeout()) .sslVerification(config.getSslConfig().isVerify()) .sslContext(config.getSslConfig().getSslContext()) .get(); String vaultResponse = new String(restResponse.getBody(), StandardCharsets.UTF_8); This produces the required output.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am using Logical API and even though the REST call works, which is supposedly executed by the Logical API, the API does not work.
---- This does not work ----
----This works -----
The text was updated successfully, but these errors were encountered: