private Rule createRule(String rule) {
    return Rule.parse(rule.startsWith("RULE:") ? rule : String.format("RULE:%s", rule));
  }
Create a rule from an existing string representation.

@param rule string representation of a rule
@return a new rule which matches the provided string representation
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java