Interface MasterSource

All Known Implementing Classes:
EnvMasterSource, FileMasterSource, GpgAgentMasterSource, MasterSourceSupport, PinEntryMasterSource, PrefixMasterSourceSupport, SystemPropertyMasterSource

public interface MasterSource
Source of master password.
  • Method Details

    • handle

      String handle(String config) throws SecDispatcherException
      Handles the config to get master password. Implementation may do one of the following things:
      • if the config cannot be handled by given source, return null
      • otherwise, if master password retrieval based on config was attempted but failed, throw SecDispatcherException
      • happy path: return the master password.
      Parameters:
      config - the source of master password, and opaque string.
      Returns:
      the master password, or null if implementation does not handle this config
      Throws:
      SecDispatcherException - If implementation does handle this masterSource, but cannot obtain master password
    • validateConfiguration

      SecDispatcher.ValidationResponse validateConfiguration(String config)
      Validates master source configuration.
      • if the config cannot be handled by given source, return null
      • otherwise, implementation performs validation and returns non-null validation response