Interface SecretStore<E extends StoredSecret>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean add​(String key, E secret)
      Save the secret identified by the key to this store.
      boolean delete​(String key)
      Remove the secret identified by the key from this store
      E get​(String key)
      Retrieve a secret identified by the key from this store.
      boolean isSecure()
      Indicate whether this store is secure or not.
    • Method Detail

      • get

        E get​(String key)
        Retrieve a secret identified by the key from this store. If there is no secret identified by this key, return null
        Parameters:
        key - for which a secret is associated with
        Returns:
        secret stored by this key, or null
      • delete

        boolean delete​(String key)
        Remove the secret identified by the key from this store
        Parameters:
        key - for which a secret is associated with
        Returns:
        true if secret is deleted successfully false otherwise
      • add

        boolean add​(String key,
                    E secret)
        Save the secret identified by the key to this store. Replace existing secret if it exists.
        Parameters:
        key - for which a secret is associated with
        secret - secret to be stored
        Returns:
        true if secret is added successfully false otherwise
      • isSecure

        boolean isSecure()
        Indicate whether this store is secure or not. Generally a secure storage is password protected, and all data maybe encrypted on disk. However this method does not assert any of those claims - it simply returns this value as an attribute of the underlying storage
        Returns:
        true if the underlying storage is considered "secure" false otherwise