public class KerberosIdentityDescriptor extends AbstractKerberosDescriptor
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "KerberosIdentityDescriptor", "description": "Describes a Kerberos identity", "type": "object", "properties": { "name": { "description": "An identifying name for this identity. The name may reference another KerberosIdentityDescriptor by declaring the path to it", "type": "string" }, "principal": { "description": "Details about this identity's principal", "type": "In this implementation,KerberosPrincipalDescriptor
", } "keytab": { "description": "Details about this identity's keytab", "type": "KerberosKeytabDescriptor
", } } } }
AbstractKerberosDescriptor.name
will hold the
KerberosIdentityDescriptor#name valueAbstractKerberosDescriptor.Type
Constructor and Description |
---|
KerberosIdentityDescriptor(Map<?,?> data)
Creates a new KerberosIdentityDescriptor
See
KerberosIdentityDescriptor for the JSON
Schema that may be used to generate this map. |
KerberosIdentityDescriptor(String name,
String reference,
KerberosPrincipalDescriptor principal,
KerberosKeytabDescriptor keytab,
Predicate when)
Creates a new KerberosIdentityDescriptor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
List<KerberosIdentityDescriptor> |
findReferences()
Find all of the
KerberosIdentityDescriptor s that reference this KerberosIdentityDescriptor |
KerberosKeytabDescriptor |
getKeytabDescriptor()
Gets the KerberosKeytabDescriptor related to this KerberosIdentityDescriptor
|
String |
getPath()
Calculate the path to this identity descriptor for logging purposes.
|
KerberosPrincipalDescriptor |
getPrincipalDescriptor()
Gets the KerberosPrincipalDescriptor related to this KerberosIdentityDescriptor
|
String |
getReference()
Gets the path to the referenced Kerberos identity definition
|
String |
getReferenceAbsolutePath()
Gets the absolute path to the referenced Kerberos identity definition
|
com.google.common.base.Optional<String> |
getReferencedServiceName()
A name that refers to a service has a format like /[
|
Predicate |
getWhen()
Gets the expression (or
Predicate ) to use to determine when to include this Kerberos
identity while processing Kerberos identities. |
int |
hashCode() |
boolean |
isReference()
Determines whether this
KerberosIdentityDescriptor indicates it is a refrence to some
other KerberosIdentityDescriptor . |
boolean |
isShared(KerberosIdentityDescriptor that) |
void |
setKeytabDescriptor(KerberosKeytabDescriptor keytab)
Sets the KerberosKeytabDescriptor related to this KerberosIdentityDescriptor
|
void |
setPrincipalDescriptor(KerberosPrincipalDescriptor principal)
Sets the KerberosPrincipalDescriptor related to this KerberosIdentityDescriptor
|
void |
setReference(String reference)
Sets the path to the referenced Kerberos identity definition
|
void |
setWhen(Predicate when)
Sets the expression (or
Predicate ) to use to determine when to include this Kerberos
identity while processing Kerberos identities. |
boolean |
shouldInclude(Map<String,Object> context)
Processes the expression indicating when this
KerberosIdentityDescriptor is to be included
in the set of Kerberos identities to process. |
Map<String,Object> |
toMap()
Creates a Map of values that can be used to create a copy of this KerberosIdentityDescriptor
or generate the JSON structure described in
KerberosIdentityDescriptor |
void |
update(KerberosIdentityDescriptor updates)
Updates this KerberosIdentityDescriptor with data from another KerberosIdentityDescriptor
Properties will be updated if the relevant updated values are not null.
|
getBooleanValue, getBooleanValue, getDescriptor, getName, getParent, getRoot, getStringValue, getValue, isContainer, nullToEmpty, nullToEmpty, nullToEmpty, setName, setParent
public KerberosIdentityDescriptor(String name, String reference, KerberosPrincipalDescriptor principal, KerberosKeytabDescriptor keytab, Predicate when)
name
- the name of this identity descriptorreference
- an optional path to a referenced KerberosIdentityDescriptorprincipal
- a KerberosPrincipalDescriptorkeytab
- a KerberosKeytabDescriptorwhen
- a predicatepublic KerberosIdentityDescriptor(Map<?,?> data)
KerberosIdentityDescriptor
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 instanceKerberosIdentityDescriptor
public String getReference()
null
if not setpublic String getReferenceAbsolutePath()
null
if not setpublic void setReference(String reference)
reference
- the path to the referenced Kerberos identity definition or null
to indicate no referencepublic KerberosPrincipalDescriptor getPrincipalDescriptor()
public void setPrincipalDescriptor(KerberosPrincipalDescriptor principal)
principal
- the KerberosPrincipalDescriptor related to this KerberosIdentityDescriptorpublic KerberosKeytabDescriptor getKeytabDescriptor()
public void setKeytabDescriptor(KerberosKeytabDescriptor keytab)
keytab
- the KerberosKeytabDescriptor related to this KerberosIdentityDescriptorpublic Predicate getWhen()
Predicate
) to use to determine when to include this Kerberos
identity while processing Kerberos identities.
null
indicates there is nothing to evaluate and this Kerberos identity is to always
be included when processing Kerberos identities.
public void setWhen(Predicate when)
Predicate
) to use to determine when to include this Kerberos
identity while processing Kerberos identities.
null
indicates there is nothing to evaluate and this Kerberos identity is to always
be included when processing Kerberos identities.
when
- a predicatepublic boolean shouldInclude(Map<String,Object> context)
KerberosIdentityDescriptor
is to be included
in the set of Kerberos identities to process.
True
will be returned if the expression is null
or if it evaluates
as such.
context
- A Map of context values, including at least the list of services and available configurationsKerberosIdentityDescriptor
is to be included when processing the
Kerberos identities; otherwise false.public void update(KerberosIdentityDescriptor updates)
updates
- the KerberosIdentityDescriptor containing the updated valuespublic Map<String,Object> toMap()
KerberosIdentityDescriptor
toMap
in class AbstractKerberosDescriptor
KerberosIdentityDescriptor
public com.google.common.base.Optional<String> getReferencedServiceName()
public boolean isShared(KerberosIdentityDescriptor that)
public boolean isReference()
KerberosIdentityDescriptor
indicates it is a refrence to some
other KerberosIdentityDescriptor
.
A KerberosIdentityDescriptor is a reference if it's reference
attibute is set
or if (for backwards compatibility), its name indicates a path. For exmaple:
SERVICE/COMPONENT/identitiy_name
/identity_name
./identity_name
KerberosIdentityDescriptor
indicates a reference; otherwise falsepublic String getPath()
This implementation calculates and caches the path if the path has not been previously set.
getPath
in class AbstractKerberosDescriptor
public int hashCode()
hashCode
in class AbstractKerberosDescriptor
public boolean equals(Object object)
equals
in class AbstractKerberosDescriptor
public List<KerberosIdentityDescriptor> findReferences()
KerberosIdentityDescriptor
s that reference this KerberosIdentityDescriptor
KerberosIdentityDescriptor
sCopyright © 2022 Apache Software Foundation. All rights reserved.