@Override
    protected void buildAuditMessage(StringBuilder builder) {
      super.buildAuditMessage(builder);

      SortedSet<String> roleSet = new TreeSet<>();
      roleSet.addAll(users.keySet());
      roleSet.addAll(groups.keySet());
      roleSet.addAll(roles.keySet());

      builder.append(", Roles(");


      List<String> lines = new LinkedList<>();

      for (String role : roleSet) {
        List<String>  tmpLines = new LinkedList<>();
        lines.add(role + ": [");
        if (users.get(role) != null && !users.get(role).isEmpty()) {
          tmpLines.add("Users: " + StringUtils.join(users.get(role), ", "));
        }
        if (groups.get(role) != null && !groups.get(role).isEmpty()) {
          tmpLines.add("Groups: " + StringUtils.join(groups.get(role), ", "));
        }
        if (roles.get(role) != null && !roles.get(role).isEmpty()) {
          tmpLines.add("Roles: " + StringUtils.join(roles.get(role), ", "));
        }
        lines.add(StringUtils.join(tmpLines, ";"));
        lines.add("] ");
      }

      builder.append(StringUtils.join(lines, ""));

      builder.append(")");

    }
Appends to the event the details of the incoming request.

@param builder builder for the audit event details.
ambari-server/src/main/java/org/apache/ambari/server/audit/event/request/ClusterPrivilegeChangeRequestAuditEvent.java