/**
   * checks the supplied candidate user and password against the expect password (or SHA-256 + SALT
   * thereof) defined as brooklyn properties.
   */
  public static boolean checkExplicitUserPassword(
      ManagementContext mgmt, String user, String password) {
    BrooklynProperties properties = (BrooklynProperties) mgmt.getConfig();
    String expectedPassword = properties.getConfig(BrooklynWebConfig.PASSWORD_FOR_USER(user));
    String salt = properties.getConfig(BrooklynWebConfig.SALT_FOR_USER(user));
    String expectedSha256 = properties.getConfig(BrooklynWebConfig.SHA256_FOR_USER(user));

    return checkPassword(password, expectedPassword, expectedSha256, salt);
  }
 @Override
 public <T> T getConfig(ConfigKey<T> key, T defaultValue) {
   T raw = delegate.getConfig(key, defaultValue);
   return resolve(key, raw);
 }
 @Override
 public <T> T getConfig(HasConfigKey<T> key) {
   T raw = delegate.getConfig(key);
   return resolve(key.getConfigKey(), raw);
 }