docs: public static Principal getSubjectUserPrincipal(Subject s) {
        if (s != null) {
           for (Principal p : s.getPrincipals()) {
              if (!(p instanceof Group)) {
                 return p;
              }
           }
        }
        return null;
     }