Interface ISecurityManager


public interface ISecurityManager
This is the interface for the security manager used by Mission Control. It may seem like a security breach to use Strings for passwords (some may be concerned that they remain in the system, since they are immutable and can not be cleared in the same manner as for instance a char array). However, since the credentials must be made into strings to be passed into the JMX environment when establishing a connection I may as well use strings to make the API simpler to use.
  • Method Details

    • withdraw

      Object withdraw(String key) throws SecurityException
      Returns a stored object and removes it from the security manager
      Parameters:
      key - the key of the stored object
      Returns:
      the stored value, or null if the store is locked. Will be a String[] or a byte[] depending on which store method it was inserted with.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • clearFamily

      void clearFamily(String family, Set<String> keys) throws FailedToSaveException
      When the store is accessible, all objects belonging to family that is not identified by keys will be removed
      Parameters:
      family - the family to clear
      keys - the keys of the objects to keep
      Throws:
      FailedToSaveException
    • get

      Object get(String key) throws SecurityException
      Returns a stored object
      Parameters:
      key - the key of the stored object
      Returns:
      the stored value. Will be a String[] or a byte[] depending on which store method it was inserted with.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • storeWithKey

      void storeWithKey(String key, byte... value) throws SecurityException
      Parameters:
      key - the key of the object
      value - the value to store secure.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • storeWithKey

      void storeWithKey(String key, String... value) throws SecurityException
      Parameters:
      key - the key of the object
      value - the value to store secure.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • storeInFamily

      String storeInFamily(String family, byte... value) throws SecurityException
      Parameters:
      family - the family to which the object belongs.
      value - the value to store secure.
      Returns:
      the key of the stored object.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • storeInFamily

      String storeInFamily(String family, String... value) throws SecurityException
      Parameters:
      family - the family to which the object belongs.
      value - the value to store secure.
      Returns:
      the key of the stored object.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • store

      String store(byte... value) throws SecurityException
      Parameters:
      value - the value to store secure.
      Returns:
      the key of the stored object.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • store

      String store(String... value) throws SecurityException
      Parameters:
      value - the value to store secure.
      Returns:
      the key of the stored object.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems.
    • unlock

      void unlock() throws ActionNotGrantedException
      Unlocks the storage if it is locked
      Throws:
      ActionNotGrantedException - if the master password was not given.
    • isLocked

      boolean isLocked()
      Returns:
      true if the store is locked, false otherwise.
    • hasKey

      boolean hasKey(String key)
      Parameters:
      key - the key of the stored object
      Returns:
      true if the key exists, false otherwise.
    • getEncryptionCiphers

      Set<String> getEncryptionCiphers()
      Returns:
      the supported encryption ciphers.
    • getEncryptionCipher

      String getEncryptionCipher()
      Returns:
      the currently used encryption cipher.
    • setEncryptionCipher

      void setEncryptionCipher(String encryptionCipher) throws SecurityException
      Sets the encryption ciphers to use.
      Parameters:
      encryptionCipher - the encryption cipher to use.
      Throws:
      SecurityException - for security problems, e.g. provided cipher is not available.
    • changeMasterPassword

      void changeMasterPassword() throws SecurityException
      Triggers a change of the master password.
      Throws:
      ActionNotGrantedException - if the master password was not given.
      SecurityException - for other security problems. e.g. provided cipher is not available.