@Override
  public Object processRegionValue(Object principal, String regionName, Object id,
      Object customer) {
    if (customer == null) {
      return null;
    }
    if (customer instanceof Customer) {
      String username = getUsername(principal);
      // Unable to retrieve the role at this point, so for this demo we'll just work with the
      // username
      if (username.equals("super-user")) {
        return customer;
      }
      Customer cust = (Customer) customer;
      return new Customer(cust.getCustomerId(), cust.getFirstName(), cust.getLastName(),
          "*********");
    } else {
      return customer;
    }
  }
Protect the Customer's Social Security Number from unauthorized users

@param principal The principal that's accessing the value
@param regionName The region that's been accessed. This could be null.
@param id the customer id the lookup was done with. This could be null.
@param customer a @Customer object, this could be null.
@return the processed value
geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/rest/internal/web/controllers/RedactingPostProcessor.java