Interface MorpheusCypherService


public interface MorpheusCypherService
This Context deals with interactions related to cyphers. It can normally be accessed via the MorpheusContext

Examples:


 morpheusContext.getCypher().read(cypherAccess, "somekey").blockingGet();
 this.morpheus.getCypher().read(cypherAccess, "secret/company/accessKey")?.blockingGet()
 
Since:
0.10.0
  • Method Details

    • read

      io.reactivex.rxjava3.core.Single<String> read(CypherAccess cypherAccess, String key)
      Read the value for a key
      Parameters:
      cypherAccess - CypherAccess
      key - Key to read. Relative path starting with 'secret/', 'key/', or 'password/'
      Returns:
      The value for the key
    • write

      io.reactivex.rxjava3.core.Single<String> write(CypherAccess cypherAccess, String key, String value, Long leaseTimeout)
      Write the value for a key
      Parameters:
      cypherAccess - CypherAccess
      key - Key to write. Relative path starting with 'secret/', 'key/', or 'password/'
      value - the unencrypted value we wish to write to the cypher
      leaseTimeout - the user specified leaseTimeout in milliseconds for when this key will expire. Only used if if CypherAccess does not container a leaseObjectRef
      Returns:
      The value written
    • delete

      io.reactivex.rxjava3.core.Single<Boolean> delete(CypherAccess cypherAccess, String key)
      Delete a cypher key
      Parameters:
      cypherAccess - CypherAccess
      key - Key to delete. Relative path starting with 'secret/', 'key/', or 'password/'
      Returns:
      True if the key and value where deleted
    • readUuid

      io.reactivex.rxjava3.core.Single<String> readUuid(CypherAccess cypherAccess, String key)
      Read a uuid value
      Parameters:
      cypherAccess - CypherAccess
      key - Key to read. If the key is not found, a new UUID will be generated, saved, and returned.
      Returns:
      The value for the key
    • readEncyptionKey

      io.reactivex.rxjava3.core.Single<String> readEncyptionKey(CypherAccess cypherAccess, String key)
      Read an encryption key value
      Parameters:
      cypherAccess - CypherAccess
      key - Key to read.
      Returns:
      The value for the key
    • readPassword

      io.reactivex.rxjava3.core.Single<String> readPassword(CypherAccess cypherAccess, String key)
      Read a password value
      Parameters:
      cypherAccess - CypherAccess
      key - Key to read
      Returns:
      The value for the key