private String getUsername(final Object principal) {
    String name = null;
    if (principal instanceof Principal) {
      name = ((Principal) principal).getName();
    } else {
      name = principal.toString();
    }
    return name;
  }
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