public static KerberosName parse(String principalName) {
        Matcher match = NAME_PARSER.matcher(principalName);
        if (!match.matches()) {
            if (principalName.contains("@")) {
                throw new IllegalArgumentException("Malformed Kerberos name: " + principalName);
            } else {
                return new KerberosName(principalName, null, null);
            }
        } else {
            return new KerberosName(match.group(1), match.group(3), match.group(4));
        }
    }
Create a name from the full Kerberos principal name.
clients/src/main/java/org/apache/kafka/common/security/kerberos/KerberosName.java