public class KerberosKeytabDescriptor extends AbstractKerberosDescriptor
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "KerberosKeytabDescriptor",
"description": "Describes a Kerberos keytab file and associated details",
"type": "object",
"properties": {
"file": {
"description": "The absolute path for the keytab file",
"type": "string"
},
"owner": {
"description": "Details about the file's user ownership",
"type": "object",
"properties": {
"name": {
"description": "The local username that should be set as the owner of this file",
"type": "string"
},
"access": {
"description": "The relevant access permissions that should be set for the owner of
this file. Expected values are 'rw', 'r', ''"
"type": "string"
}
}
}
"group": {
"description": "Details about the file's group ownership",
"type": "object",
"properties": {
"name": {
"description": "The local group name that should be set as the group owner of this file",
"type": "string"
},
"access": {
"description": "The relevant access permissions that should be set for the group
owner of this file. Expected values are 'rw', 'r', ''"
"type": "string"
}
}
}
"configuration": {
"description": "The configuration type and property name indicating the property to be
updated with the generated absolute path to the keytab file
- format: config-type/property.name",
"type": "string"
}
"cachable" : {
"description": "Indicates whether the generated keytab is allowed to be cached by the
Ambari server (true) or not (false)",
"type": "boolean"
}
}
}
In this implementation,
AbstractKerberosDescriptor.name will hold the
KerberosKeytabDescriptor#file valueAbstractKerberosDescriptor.Type| Constructor and Description |
|---|
KerberosKeytabDescriptor(Map<?,?> data)
Creates a new KerberosKeytabDescriptor
See
KerberosKeytabDescriptor for the JSON
Schema that may be used to generate this map. |
KerberosKeytabDescriptor(String file,
String ownerName,
String ownerAccess,
String groupName,
String groupAccess,
String configuration,
boolean cachable)
Creates a new KerberosKeytabDescriptor
|
| 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
keytab's file path
|
String |
getFile()
Gets the path to the keytab file
The value may include variable placeholders to be replaced as needed
${variable} placeholders are replaced on the server - see
VariableReplacementHelper.replaceVariables(String, Map)
|
String |
getGroupAccess()
Gets the access permissions that should be set on the keytab file related to the file's group
|
String |
getGroupName()
Gets the local group name to set as the group owner of the keytab file
|
String |
getOwnerAccess()
Gets the access permissions that should be set on the keytab file related to the file's owner
|
String |
getOwnerName()
Gets the local username to set as the owner of the keytab file
|
int |
hashCode() |
boolean |
isCachable()
Indicates whether the generated keytab is allowed to be cached by the Ambari server or not
|
void |
setCachable(boolean cachable)
Sets whether the generated keytab is allowed to be cached by the Ambari server or not
|
void |
setConfiguration(String configuration)
Sets the configuration type and property name indicating the property to be updated with the
keytab's file path
|
void |
setFile(String file)
Sets the path to the keytab file
|
void |
setGroupAccess(String access)
Sets the access permissions that should be set on the keytab file related to the file's group
|
void |
setGroupName(String name)
Sets the local group name to set as the group owner of the keytab file
|
void |
setOwnerAccess(String access)
Sets the access permissions that should be set on the keytab file related to the file's owner
|
void |
setOwnerName(String name)
Sets the local username to set as the owner of the keytab file
|
Map<String,Object> |
toMap()
Creates a Map of values that can be used to create a copy of this KerberosKeytabDescriptor
or generate the JSON structure described in
KerberosKeytabDescriptor |
void |
update(KerberosKeytabDescriptor updates)
Updates this KerberosKeytabDescriptor with data from another KerberosKeytabDescriptor
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 KerberosKeytabDescriptor(String file, String ownerName, String ownerAccess, String groupName, String groupAccess, String configuration, boolean cachable)
file - the path to the keytab fileownerName - the local username of the file ownerownerAccess - the file access privileges for the file owner ("r", "rw", "")groupName - the local group name with privileges to access the filegroupAccess - the file access privileges for the group ("r", "rw", "")configuration - the configuration used to store the principal namecachable - true if the keytab may be cached by Ambari; otherwise falsepublic KerberosKeytabDescriptor(Map<?,?> data)
KerberosKeytabDescriptor 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 instanceKerberosKeytabDescriptorpublic String getFile()
VariableReplacementHelper.replaceVariables(String, Map)
VariableReplacementHelper.replaceVariables(String, Map)public void setFile(String file)
file - a String declaring this keytab's file pathgetFile()public String getOwnerName()
public void setOwnerName(String name)
name - a String declaring the name of the user to own the keytab filepublic String getOwnerAccess()
ownerAccesspublic void setOwnerAccess(String access)
access - a String declaring the access permissions that should be set on the keytab file
related to the file's ownerownerAccesspublic String getGroupName()
public void setGroupName(String name)
name - a String declaring the name of the group to own the keytab filepublic String getGroupAccess()
groupAccesspublic void setGroupAccess(String access)
access - a String declaring the access permissions that should be set on the keytab file
related to the file's groupgroupAccesspublic 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 keytab's file pathconfigurationpublic boolean isCachable()
public void setCachable(boolean cachable)
cachable - true if allowed to be cached; false otherwisepublic void update(KerberosKeytabDescriptor updates)
updates - the KerberosKeytabDescriptor containing the updated valuespublic Map<String,Object> toMap()
KerberosKeytabDescriptortoMap in class AbstractKerberosDescriptorKerberosKeytabDescriptorpublic int hashCode()
hashCode in class AbstractKerberosDescriptorpublic boolean equals(Object object)
equals in class AbstractKerberosDescriptorCopyright © 2022 Apache Software Foundation. All rights reserved.