Class DefaultPropertiesPasswordManager

java.lang.Object
org.kawanfw.sql.api.server.auth.crypto.DefaultPropertiesPasswordManager
All Implemented Interfaces:
PropertiesPasswordManager

public class DefaultPropertiesPasswordManager
extends Object
implements PropertiesPasswordManager
This default implementation will extract the password from the "password" property of the file user.home/.kawansoft/properties_password_manager.properties.

This default implementation is provided as is: password is not secured if an attacker gets access to the server.
Note that the getPassword() will return null if the file does not exists.

Author:
Nicolas de Pomereu
  • Constructor Details

    • DefaultPropertiesPasswordManager

      public DefaultPropertiesPasswordManager()
  • Method Details

    • getPassword

      public char[] getPassword() throws IOException, SQLException
      Returns the password value of property contained in user.home/.kawansoft/properties_password_manager.properties.
      Returns null if the file does not exist.
      Specified by:
      getPassword in interface PropertiesPasswordManager
      Returns:
      the password to use to decrypt the Properties of the aceql-server.properties file.
      Throws:
      IOException - if an IOException occurs
      SQLException - if a SQLException occurs