Package org.apache.zookeeper.server.auth
Class KerberosName
- java.lang.Object
- 
- org.apache.zookeeper.server.auth.KerberosName
 
- 
 public class KerberosName extends Object This class implements parsing and handling of Kerberos principal names. In particular, it splits them apart and translates them down into local operating system names.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classKerberosName.BadFormatStringstatic classKerberosName.NoMatchingRule
 - 
Constructor SummaryConstructors Constructor Description KerberosName(String name)Create a name from the full Kerberos principal name.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDefaultRealm()Get the configured default realm.StringgetHostName()Get the second component of the name.StringgetRealm()Get the realm of the name.StringgetServiceName()Get the first component of the name.StringgetShortName()Get the translation of the principal name into an operating system user name.static voidmain(String[] args)static voidsetConfiguration()Set the static configuration to get the rules.StringtoString()Put the name back together from the parts.
 
- 
- 
- 
Constructor Detail- 
KerberosNamepublic KerberosName(String name) Create a name from the full Kerberos principal name.- Parameters:
- name-
 
 
- 
 - 
Method Detail- 
getDefaultRealmpublic String getDefaultRealm() Get the configured default realm.- Returns:
- the default realm from the krb5.conf
 
 - 
toStringpublic String toString() Put the name back together from the parts.
 - 
getServiceNamepublic String getServiceName() Get the first component of the name.- Returns:
- the first section of the Kerberos principal name
 
 - 
getHostNamepublic String getHostName() Get the second component of the name.- Returns:
- the second section of the Kerberos principal name, and may be null
 
 - 
getRealmpublic String getRealm() Get the realm of the name.- Returns:
- the realm of the name, may be null
 
 - 
setConfigurationpublic static void setConfiguration() throws IOExceptionSet the static configuration to get the rules.- Throws:
- IOException
 
 - 
getShortNamepublic String getShortName() throws IOException Get the translation of the principal name into an operating system user name.- Returns:
- the short name
- Throws:
- IOException
 
 
- 
 
-