public class KerberosPrincipalDescriptor extends AbstractKerberosDescriptor
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "KerberosIdentityDescriptor",
"description": "Describes a Kerberos principal and associated details",
"type": "object",
"properties": {
"value": {
"description": "The pattern to use to generate the principal",
"type": "string"
},
"type": {
"description": "The type of principal - either 'service' or 'user'",
"type": "string"
},
"configuration": {
"description": "The configuration type and property name indicating the property to be
updated with the generated principal - format: config-type/property.name",
"type": "string"
},
"local_username": {
"description": "The local username this principal maps to - optional if no mapping is needed",
"type": "string"
}
}
}
In this implementation,
AbstractKerberosDescriptor.name will hold the
KerberosPrincipalDescriptor#value valueAbstractKerberosDescriptor.Type| Constructor and Description |
|---|
KerberosPrincipalDescriptor(Map<?,?> data)
Creates a new KerberosPrincipalDescriptor
See
KerberosPrincipalDescriptor for the JSON
Schema that may be used to generate this map. |
KerberosPrincipalDescriptor(String principal,
KerberosPrincipalType type,
String configuration,
String localUsername)
Creates a new KerberosPrincipalDescriptor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object) |
String |
getConfiguration()
Gets the configuration type and property name indicating the property to be updated with the
generated principal
|
String |
getLocalUsername()
Gets the local username associated with this principal
|
KerberosPrincipalType |
getType()
Gets the type of this KerberosPrincipalDescriptor
|
String |
getValue()
Gets the value (or principal name pattern) for this KerberosPrincipalDescriptor
The value may include variable placeholders to be replaced as needed
${variable} placeholders are replaced on the server - see
VariableReplacementHelper.replaceVariables(String, Map)
the _HOST placeholder is replaced on the hosts to dynamically populate the relevant hostname
|
int |
hashCode() |
void |
setConfiguration(String configuration)
Sets the configuration type and property name indicating the property to be updated with the
generated principal
|
void |
setLocalUsername(String localUsername)
Sets the local username associated with this principal
|
void |
setType(KerberosPrincipalType type)
Sets the type of this KerberosPrincipalDescriptor
The value should be either "service" or "user"
|
void |
setValue(String value)
Sets the value (or principal name pattern) for this KerberosPrincipalDescriptor
|
Map<String,Object> |
toMap()
Creates a Map of values that can be used to create a copy of this KerberosPrincipalDescriptor
or generate the JSON structure described in
KerberosPrincipalDescriptor |
void |
update(KerberosPrincipalDescriptor updates)
Updates this KerberosPrincipalDescriptor with data from another KerberosPrincipalDescriptor
Properties will be updated if the relevant updated values are not null.
|
getBooleanValue, getBooleanValue, getDescriptor, getName, getParent, getPath, getRoot, getStringValue, getValue, isContainer, nullToEmpty, nullToEmpty, nullToEmpty, setName, setParentpublic KerberosPrincipalDescriptor(String principal, KerberosPrincipalType type, String configuration, String localUsername)
principal - the principal nametype - the principal type (user, service, etc...)configuration - the configuration used to store the principal namelocalUsername - the local username to map to the principalpublic KerberosPrincipalDescriptor(Map<?,?> data)
KerberosPrincipalDescriptor for the JSON
Schema that may be used to generate this map.data - a Map of values use to populate the data for the new instanceKerberosPrincipalDescriptorpublic String getValue()
VariableReplacementHelper.replaceVariables(String, Map)
VariableReplacementHelper.replaceVariables(String, Map)public void setValue(String value)
value - a String declaring this principal's valuegetValue()public KerberosPrincipalType getType()
public void setType(KerberosPrincipalType type)
type - a KerberosPrincipalType declaring the type of this KerberosPrincipalDescriptorpublic String getConfiguration()
public void setConfiguration(String configuration)
configuration - a String declaring the configuration type and property name indicating the
property to be updated with the generated principalconfigurationpublic String getLocalUsername()
public void setLocalUsername(String localUsername)
localUsername - a String indicating the local username related to this principal, or null
of no local mapping is needed/availablepublic void update(KerberosPrincipalDescriptor updates)
updates - the KerberosPrincipalDescriptor containing the updated valuespublic Map<String,Object> toMap()
KerberosPrincipalDescriptortoMap in class AbstractKerberosDescriptorKerberosPrincipalDescriptorpublic int hashCode()
hashCode in class AbstractKerberosDescriptorpublic boolean equals(Object object)
equals in class AbstractKerberosDescriptorCopyright © 2022 Apache Software Foundation. All rights reserved.