@InterfaceAudience.LimitedPrivate(value={"HDFS","MapReduce"}) @InterfaceStability.Evolving public class KerberosName extends Object
Modifier and Type | Class and Description |
---|---|
static class |
KerberosName.BadFormatString |
static class |
KerberosName.NoMatchingRule |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MECHANISM
Constant that defines the default behavior of the rule mechanism
|
static String |
MECHANISM_HADOOP
Constant that defines auth_to_local legacy hadoop evaluation
|
static String |
MECHANISM_MIT
Constant that defines auth_to_local MIT evaluation
|
Constructor and Description |
---|
KerberosName(String name)
Create a name from the full Kerberos principal name.
|
Modifier and Type | Method and Description |
---|---|
static String |
getDefaultRealm()
Get the configured default realm.
|
String |
getHostName()
Get the second component of the name.
|
String |
getRealm()
Get the realm of the name.
|
static String |
getRuleMechanism()
Get the rule evaluation mechanism
|
static String |
getRules()
Get the rules.
|
String |
getServiceName()
Get the first component of the name.
|
String |
getShortName()
Get the translation of the principal name into an operating system
user name.
|
static boolean |
hasRuleMechanismBeenSet()
Indicates of the rule mechanism has been set
|
static boolean |
hasRulesBeenSet()
Indicates if the name rules have been set.
|
static void |
resetDefaultRealm() |
static void |
setRuleMechanism(String ruleMech) |
static void |
setRules(String ruleString)
Set the rules.
|
String |
toString()
Put the name back together from the parts.
|
public static final String MECHANISM_HADOOP
public static final String MECHANISM_MIT
public static final String DEFAULT_MECHANISM
public KerberosName(String name)
name
- full Kerberos principal name.public static void resetDefaultRealm()
public static String getDefaultRealm()
public String toString()
public String getServiceName()
public String getHostName()
public String getRealm()
public String getShortName() throws IOException
IOException
- throws if something is wrong with the rulespublic static String getRules()
public static boolean hasRulesBeenSet()
public static boolean hasRuleMechanismBeenSet()
public static void setRules(String ruleString)
ruleString
- the rules string.public static void setRuleMechanism(String ruleMech)
ruleMech
- the evaluation type: hadoop, mit
'hadoop' indicates '@' or '/' are not allowed the result
evaluation. 'MIT' indicates that auth_to_local
rules follow MIT Kerberos evaluation.public static String getRuleMechanism()
Copyright © 2008–2021 Apache Software Foundation. All rights reserved.