public static String getPassword(Configuration conf, ConfVars var) throws IOException {
    assert var.defaultVal.getClass() == String.class;
    char[] pw = conf.getPassword(var.varname);
    if (pw == null) {
      // Might be under the hive name
      pw = conf.getPassword(var.hiveName);
    }
    return pw == null ? var.defaultVal.toString() : new String(pw);
  }
Get a password from the configuration file.  This uses Hadoop's
{@link Configuration#getPassword(String)} to handle getting secure passwords.
@param conf configuration file to read from
@param var configuration value to read
@return the password as a string, or the default value.
@throws IOException if thrown by Configuration.getPassword
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java