Class KeyValueDelegate

java.lang.Object
org.springframework.vault.core.util.KeyValueDelegate

public class KeyValueDelegate extends Object
Key-Value utility to retrieve secrets from a versioned key-value backend. For internal use within the framework.

Uses Vault's internal API sys/internal/ui/mounts to determine mount information.

Since:
2.2
Author:
Mark Paluch
  • Constructor Details

  • Method Details

    • isVersioned

      public boolean isVersioned(String path)
      Determine whether the path belongs to a versioned Key-Value mount.
      Parameters:
      path - the path to inspect.
      Returns:
      true if the path belongs to a versioned Key-Value mount.
    • getSecret

      @Nullable public VaultResponse getSecret(String path)
      Read a secret from a key-value backend. Considers the backend type and whether the backend is a versioned key-value backend.
      Parameters:
      path - the path to fetch the secret from.
      Returns:
      the secret, can be null.
    • getMountInfo

      public KeyValueDelegate.MountInfo getMountInfo(String path)