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,
                                                             String usernameSlug,
                                                             String passwordSlugName)
                                                      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.
        usernameSlug -
        passwordSlugName -
        Returns:
        A UsernamePassword object containing the fetched credentials, or null if not found.
        Throws:
        Exception - if there is an error during the fetching process.