@Override
    public String toString() {
      return String.format("RULE:%s(%s)%s", matchingRule, principal, substitution);
    }
@param rule in the following format RULE:[n:string](regexp)s/pattern/replacement/[modifier]/[L]
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java