@LimitedPrivate({"HDFS","MapReduce"})
@Evolving
public class KerberosName
extends java.lang.Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
KerberosName.BadFormatString |
|
static class |
KerberosName.NoMatchingRule |
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
DEFAULT_MECHANISM |
Constant that defines the default behavior of the rule mechanism
|
static java.lang.String |
MECHANISM_HADOOP |
Constant that defines auth_to_local legacy hadoop evaluation
|
static java.lang.String |
MECHANISM_MIT |
Constant that defines auth_to_local MIT evaluation
|
| Constructor | Description |
|---|---|
KerberosName(java.lang.String name) |
Create a name from the full Kerberos principal name.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.String |
getDefaultRealm() |
Get the configured default realm.
|
java.lang.String |
getHostName() |
Get the second component of the name.
|
java.lang.String |
getRealm() |
Get the realm of the name.
|
static java.lang.String |
getRuleMechanism() |
Get the rule evaluation mechanism
|
static java.lang.String |
getRules() |
Get the rules.
|
java.lang.String |
getServiceName() |
Get the first component of the name.
|
java.lang.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(java.lang.String ruleMech) |
|
static void |
setRules(java.lang.String ruleString) |
Set the rules.
|
java.lang.String |
toString() |
Put the name back together from the parts.
|
public static final java.lang.String MECHANISM_HADOOP
public static final java.lang.String MECHANISM_MIT
public static final java.lang.String DEFAULT_MECHANISM
public KerberosName(java.lang.String name)
name - full Kerberos principal name.@VisibleForTesting public static void resetDefaultRealm()
public static java.lang.String getDefaultRealm()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getServiceName()
public java.lang.String getHostName()
public java.lang.String getRealm()
public java.lang.String getShortName()
throws java.io.IOException
java.io.IOException - throws if something is wrong with the rulespublic static java.lang.String getRules()
public static boolean hasRulesBeenSet()
public static boolean hasRuleMechanismBeenSet()
public static void setRules(java.lang.String ruleString)
ruleString - the rules string.public static void setRuleMechanism(java.lang.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 java.lang.String getRuleMechanism()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.