Interface Vault


  • 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  Vault.Builder
      Fluent API builder for Vault.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Http.RequestMethod LIST
      HTTP LIST method used by several Vault engines.
    • Field Detail

      • LIST

        static final Http.RequestMethod LIST
        HTTP LIST method used by several Vault engines.
    • Method Detail

      • builder

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

        <T extends SecretsRx> 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 SecretsRx the engine supports, such as io.helidon.integrations.vault.Kv2Secrets
        Parameters:
        engine - engine to use, such as Kv2Secrets#ENGINE
        Returns:
        instance of SecretsRx specific to the used engine
      • secrets

        <T extends SecretsRx> 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 SecretsRx 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 SecretsRx 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