Package org.apache.zookeeper.server.auth
Class KerberosName
java.lang.Object
org.apache.zookeeper.server.auth.KerberosName
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 Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorsConstructorDescriptionKerberosName
(String name) Create a name from the full Kerberos principal name. -
Method Summary
Modifier and TypeMethodDescriptionGet the configured default realm.Get the second component of the name.getRealm()
Get the realm of the name.Get the first component of the name.Get the translation of the principal name into an operating system user name.static void
static void
Set the static configuration to get the rules.toString()
Put the name back together from the parts.
-
Constructor Details
-
KerberosName
Create a name from the full Kerberos principal name.- Parameters:
name
-
-
-
Method Details
-
getDefaultRealm
Get the configured default realm.- Returns:
- the default realm from the krb5.conf
-
toString
Put the name back together from the parts. -
getServiceName
Get the first component of the name.- Returns:
- the first section of the Kerberos principal name
-
getHostName
Get the second component of the name.- Returns:
- the second section of the Kerberos principal name, and may be null
-
getRealm
Get the realm of the name.- Returns:
- the realm of the name, may be null
-
setConfiguration
Set the static configuration to get the rules.- Throws:
IOException
-
getShortName
Get the translation of the principal name into an operating system user name.- Returns:
- the short name
- Throws:
IOException
-
main
- Throws:
Exception
-