public interface Vault
Main entry point to Vault operations.

To access secrets in the vault, start with builder() to create a new Vault instance. Once you have a Vault instance, you can access secrets through engines. To get access to secrets, use secrets(Engine).

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Fluent API builder for Vault.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Method
    HTTP LIST method used by several Vault engines.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    auth(AuthMethod<T> method)
    Get access to authentication method.
    <T> T
    auth(AuthMethod<T> method, String path)
    Get access to authentication method, using a custom path.
    Fluent API builder to construct new instances.
    static Vault
    create(Config config)
    Create a Vault from configuration.
    <T extends Secrets>
    T
    secrets(Engine<T> engine)
    Get access to secrets using the provided engine, using the default mount point of that engine.
    <T extends Secrets>
    T
    secrets(Engine<T> engine, String mount)
    Get access to secrets using the provided engine, using a custom mount point.
    <T> T
    sys(SysApi<T> api)
    Get access to sys operations on this Vault, such as to configure engines, policies etc.
  • Field Details

    • LIST

      static final Method LIST
      HTTP LIST method used by several Vault engines.
  • Method Details

    • builder

      static Vault.Builder builder()
      Fluent API builder to construct new instances.
      Returns:
      a new builder
    • create

      static Vault create(Config config)
      Create a Vault from configuration.
      Parameters:
      config - configuration
      Returns:
      a new Vault
      See Also:
    • secrets

      <T extends Secrets> T secrets(Engine<T> engine)
      Get access to secrets using the provided engine, using the default mount point of that engine.
      Type Parameters:
      T - type of the Secrets the engine supports, such as io.helidon.integrations.vault.Kv2Secrets
      Parameters:
      engine - engine to use, such as Kv2Secrets#ENGINE
      Returns:
      instance of Secrets specific to the used engine
    • secrets

      <T extends Secrets> T secrets(Engine<T> engine, String mount)
      Get access to secrets using the provided engine, using a custom mount point.
      Type Parameters:
      T - type of the Secrets the engine supports, such as Kv2Secrets
      Parameters:
      engine - engine to use, such as Kv2Secrets#ENGINE
      mount - mount point for the engine (such as when the same engine is configured more than once in the Vault)
      Returns:
      instance of Secrets specific to the used engine
    • auth

      <T> T auth(AuthMethod<T> method)
      Get access to authentication method.
      Type Parameters:
      T - type of the API class used by the method
      Parameters:
      method - method to use, such as io.helidon.integrations.vault.AuthMethod.TOKEN
      Returns:
      instance of the API class specific to the used method
    • auth

      <T> T auth(AuthMethod<T> method, String path)
      Get access to authentication method, using a custom path.
      Type Parameters:
      T - type of the API class used by the method
      Parameters:
      method - method to use, such as io.helidon.integrations.vault.AuthMethod.TOKEN
      path - path for the method, such as when configuring multiple instances of the same method
      Returns:
      instance of the API class specific to the used method
    • sys

      <T> T sys(SysApi<T> api)
      Get access to sys operations on this Vault, such as to configure engines, policies etc. (if such operations are supported).
      Type Parameters:
      T - type of the API
      Parameters:
      api - API implementation
      Returns:
      API instance