Class VaultClient


  • public class VaultClient
    extends Object
    • Constructor Detail

      • VaultClient

        public VaultClient()
    • Method Detail

      • fetchCredentials

        public VaultClient.UsernamePassword fetchCredentials​(String vaultUrl,
                                                             String secretId,
                                                             String username,
                                                             String password)
                                                      throws Exception
        Fetches credentials from the Secret Server using the provided Vault URL, secret ID, username, and password.
        Parameters:
        vaultUrl - The base URL of the Secret server.
        secretId - The ID of the secret to fetch.
        username - The username for authenticating with the Vault.
        password - The password for authenticating with the Vault.
        Returns:
        A UsernamePassword object containing the fetched credentials, or null if not found.
        Throws:
        Exception - if there is an error during the fetching process.