public abstract class AbstractPrepareKerberosServerAction extends KerberosServerAction
KerberosServerAction.KerberosCommandParameters, KerberosServerAction.OperationType
AUTHENTICATED_USER_NAME, DATA_DIRECTORY, DATA_DIRECTORY_PREFIX, DEFAULT_REALM, HOST_FILTER, IDENTITY_FILTER, INCLUDE_AMBARI_IDENTITY, KDC_TYPE, KEYTAB_CONTENT_BASE64, OPERATION_TYPE, PRECONFIGURE_SERVICES, SERVICE_COMPONENT_FILTER, UPDATE_CONFIGURATION_NOTE, UPDATE_CONFIGURATION_POLICY
actionLog, gson
ACTION_NAME, ACTION_USER_NAME, DEFAULT_LONG_RUNNING_TASK_TIMEOUT_SECONDS, WRAPPED_CLASS_NAME
Constructor and Description |
---|
AbstractPrepareKerberosServerAction() |
Modifier and Type | Method and Description |
---|---|
protected KerberosHelper |
getKerberosHelper() |
protected void |
processConfigurationChanges(String dataDirectory,
Map<String,Map<String,String>> kerberosConfigurations,
Map<String,Set<String>> propertiesToBeRemoved,
KerberosDescriptor kerberosDescriptor,
UpdateConfigurationPolicy updateConfigurationPolicy)
Processes configuration changes to determine if any work needs to be done.
|
protected CommandReport |
processIdentity(ResolvedKerberosPrincipal resolvedPrincipal,
KerberosOperationHandler operationHandler,
Map<String,String> kerberosConfiguration,
boolean includedInFilter,
Map<String,Object> requestSharedDataContext)
Processes an identity as necessary.
|
void |
processServiceComponentHosts(Cluster cluster,
KerberosDescriptor kerberosDescriptor,
List<ServiceComponentHost> schToProcess,
Collection<String> identityFilter,
String dataDirectory,
Map<String,Map<String,String>> currentConfigurations,
Map<String,Map<String,String>> kerberosConfigurations,
boolean includeAmbariIdentity,
Map<String,Set<String>> propertiesToBeIgnored) |
protected void |
processServiceComponents(Cluster cluster,
KerberosDescriptor kerberosDescriptor,
List<Component> schToProcess,
Collection<String> identityFilter,
String dataDirectory,
Map<String,Map<String,String>> currentConfigurations,
Map<String,Map<String,String>> kerberosConfigurations,
boolean includeAmbariIdentity,
Map<String,Set<String>> propertiesToBeIgnored) |
ambariServerHostID, deleteDataDirectory, getCluster, getClusterName, getClusters, getCommandParameterValue, getCommandPreconfigureType, getConfigurationProperties, getDataDirectoryPath, getDataDirectoryPath, getDefaultRealm, getHostFilter, getIdentityFilter, getKDCType, getOperationType, getPrincipalKeyNumberMap, getPrincipalPasswordMap, getServiceComponentFilter, getUpdateConfigurationPolicy, hasHostFilters, processIdentities, pruneServiceFilter, setPrincipalPasswordMap
auditLog, createCommandReport, createCompletedCommandReport, getCommandParameters, getCommandParameterValue, getExecutionCommand, getHostRoleCommand, setExecutionCommand, setHostRoleCommand
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute
protected CommandReport processIdentity(ResolvedKerberosPrincipal resolvedPrincipal, KerberosOperationHandler operationHandler, Map<String,String> kerberosConfiguration, boolean includedInFilter, Map<String,Object> requestSharedDataContext) throws org.apache.ambari.server.AmbariException
KerberosServerAction
KerberosServerAction.processIdentities(Map)
for each
principal found by specified filter. After processing, it is expected
that the return value is null on success and a CommandReport (indicating the error) on failure.processIdentity
in class KerberosServerAction
resolvedPrincipal
- a ResolvedKerberosPrincipal object to processoperationHandler
- a KerberosOperationHandler used to perform Kerberos-related
tasks for specific Kerberos implementations
(MIT, Active Directory, etc...)kerberosConfiguration
- a Map of configuration properties from kerberos-envincludedInFilter
- a Boolean value indicating whather the principal is included in
the current filter or notrequestSharedDataContext
- a Map to be used a shared data among all ServerActions related
to a given request @return a CommandReport, indicating an error
condition; or null, indicating a success conditionorg.apache.ambari.server.AmbariException
- if an error occurs while processing the identity recordprotected KerberosHelper getKerberosHelper()
public void processServiceComponentHosts(Cluster cluster, KerberosDescriptor kerberosDescriptor, List<ServiceComponentHost> schToProcess, Collection<String> identityFilter, String dataDirectory, Map<String,Map<String,String>> currentConfigurations, Map<String,Map<String,String>> kerberosConfigurations, boolean includeAmbariIdentity, Map<String,Set<String>> propertiesToBeIgnored) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void processServiceComponents(Cluster cluster, KerberosDescriptor kerberosDescriptor, List<Component> schToProcess, Collection<String> identityFilter, String dataDirectory, Map<String,Map<String,String>> currentConfigurations, Map<String,Map<String,String>> kerberosConfigurations, boolean includeAmbariIdentity, Map<String,Set<String>> propertiesToBeIgnored) throws org.apache.ambari.server.AmbariException
org.apache.ambari.server.AmbariException
protected void processConfigurationChanges(String dataDirectory, Map<String,Map<String,String>> kerberosConfigurations, Map<String,Set<String>> propertiesToBeRemoved, KerberosDescriptor kerberosDescriptor, UpdateConfigurationPolicy updateConfigurationPolicy) throws org.apache.ambari.server.AmbariException
dataDirectory
- the directory in which to write the configuration changes data filekerberosConfigurations
- the Kerberos-specific configuration mappropertiesToBeRemoved
- a map of properties to be removed from the current configuration,
grouped by configuration type.kerberosDescriptor
- the Kerberos descriptorupdateConfigurationPolicy
- the policy used to determine which configurations to updateorg.apache.ambari.server.AmbariException
Copyright © 2022 Apache Software Foundation. All rights reserved.