public abstract class LdapProvisioner<ConfigurationClass extends LdapProvisionerConfiguration> extends Provisioner<ConfigurationClass,LdapUser,LdapGroup>
| Modifier and Type | Field and Description |
|---|---|
protected LdapSystem |
ldapSystem |
static Set<org.ldaptive.ResultCode> |
schemaRelatedLdapErrors
LDAP ResultCodes that might occur from a schema-related violation, for example when
the last member is removed from an LdapGroup that requires a member
|
activeProvisioner, config, fullSyncMode, LOG, provisionerConfigName, provisionerDisplayName| Constructor and Description |
|---|
LdapProvisioner(String provisionerName,
ConfigurationClass config,
boolean fullSyncMode) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createOuInExistingLocation(com.unboundid.ldap.sdk.DN ouDn)
This function creates an OU with the provided DN with the OU-Creation ldif template.
|
protected LdapUser |
createUser(Subject personSubject)
Provisioning a new User account in the target system.
|
protected void |
ensureLdapOusExist(com.unboundid.ldap.sdk.DN dn)
Internal worker function called by ensureLdapOusExist(dnString, wholeDnIsTheOu).
|
void |
ensureLdapOusExist(String dnString,
boolean wholeDnIsTheOu)
Public way to create any missing OUs.
|
protected Map<Subject,LdapUser> |
fetchTargetSystemUsers(Collection<Subject> subjectsToFetch)
Find the subjects in the ldap server.
|
void |
finishCoordination(List<ProvisioningWorkItem> workItems,
boolean wasSuccessful)
Provisioning is over.
|
void |
finishProvisioningBatch(List<ProvisioningWorkItem> workItems)
This implements the LDAP Modifications that were scheduled with schedulLdapModification.
|
protected LdapSystem |
getLdapSystem() |
protected org.ldaptive.SearchFilter |
getUserLdapFilter(Subject subject) |
boolean |
isStringDnEscaped(String dnString)
Has this string already been dn-escaped as determined by whether
stringHasBeenDnEscaped(...) was called for it.
|
boolean |
isStringEscapedForLdapFilter(String filterString)
Has this string already been escaped as an ldap filter, as determined by whether
stringHasBeenLdapFilterEscaped(...) was called for it.
|
protected boolean |
isWorkItemMakingChange(ProvisioningWorkItem workItem,
String dn,
String attributeName,
String provisioningAttributeValue) |
protected void |
performLdapAdd(org.ldaptive.LdapEntry entryToAdd)
Perform an LDAP ADD after making sure the new object's OU exists.
|
protected void |
populateJexlMap(String expression,
Map<String,Object> variableMap,
Subject subject,
LdapUser ldapUser,
GrouperGroupInfo grouperGroupInfo,
LdapGroup ldapGroup)
Overridable method to put group and subject information into the Jexl map
for use during evaluation.
|
protected String |
sanityCheckDnAttributesOfLdif(String ldif,
String ldifSourceFormat,
Object... ldifSourceArgs)
Look at attributes that are supposed to store DNs and make sure they
are escaped and/or parsable
|
protected void |
scheduleLdapModification(org.ldaptive.ModifyRequest operation)
Note that the given
ProvisioningWorkItem needs the given ModifyRequest done. |
static void |
stringHasBeenDnEscaped(String dnString)
Note that the given dn string has already been escaped, in particular
any commas or equal signs in the components of the dn have been escaped.
|
static void |
stringHasBeenLdapFilterEscaped(String ldapFilterValue)
Note that the given string has already been escaped as an ldap filter, in particular
any (,),* have been escaped.
|
addMembership, allGroupsForProvisionerFromCache, allGroupsForProvisionerFromCacheClear, cacheGroup, checkAttributeDefinitions, createGroup, deleteGroup, deleteMembership, doFullSync_cleanupExtraGroups, doFullSync, evaluateJexlExpression, fetchTargetSystemGroup, fetchTargetSystemGroups, fetchTargetSystemGroupsInBatches, fetchTargetSystemUser, filterWorkItems, filterWorkItems2, flushCachesIfNecessary, getAllGroupsForProvisioner, getAllGroupsForProvisioner2, getConfig, getConfigName, getCurrentWorkItem, getDisplayName, getGroupInfo, getGroupInfoOfExistingGroup, getGroupInfoOfExistingGroup, getGroupJexlMap, getJobStatistics, getPropertyClass, getSubject, getSubjectCacheKey, getSubjectCacheKey, getTargetSystemUser, groupNameToMillisAndProvisionable, isFullSyncMode, provisionBatchOfItems, provisionItem, setCurrentWorkItem, setJobStatistics, shouldGroupBeProvisioned, shouldGroupBeProvisionedConsiderCache, shouldLogAboutMissingSubjects, shouldWorkItemBeProcessed, startCoordination, startProvisioningBatch, toString, uncacheAllGroups, uncacheGroup, warnAboutCacheSizeConcerns, workItemMightChangeGroupSelectionprotected LdapSystem ldapSystem
public static Set<org.ldaptive.ResultCode> schemaRelatedLdapErrors
public LdapProvisioner(String provisionerName, ConfigurationClass config, boolean fullSyncMode)
public static void stringHasBeenDnEscaped(String dnString)
dnString - public boolean isStringDnEscaped(String dnString)
dnString - public static void stringHasBeenLdapFilterEscaped(String ldapFilterValue)
ldapFilterValue - public boolean isStringEscapedForLdapFilter(String filterString)
filterString - public void finishCoordination(List<ProvisioningWorkItem> workItems, boolean wasSuccessful)
ProvisionerfinishCoordination in class Provisioner<ConfigurationClass extends LdapProvisionerConfiguration,LdapUser,LdapGroup>protected Map<Subject,LdapUser> fetchTargetSystemUsers(Collection<Subject> subjectsToFetch) throws PspException
fetchTargetSystemUsers in class Provisioner<ConfigurationClass extends LdapProvisionerConfiguration,LdapUser,LdapGroup>subjectsToFetch - PspExceptionprotected org.ldaptive.SearchFilter getUserLdapFilter(Subject subject) throws PspException
PspExceptionprotected LdapUser createUser(Subject personSubject) throws PspException
ProvisionercreateUser in class Provisioner<ConfigurationClass extends LdapProvisionerConfiguration,LdapUser,LdapGroup>PspExceptionprotected String sanityCheckDnAttributesOfLdif(String ldif, String ldifSourceFormat, Object... ldifSourceArgs) throws PspException
ldif - PspExceptionprotected void populateJexlMap(String expression, Map<String,Object> variableMap, Subject subject, LdapUser ldapUser, GrouperGroupInfo grouperGroupInfo, LdapGroup ldapGroup)
ProvisionerpopulateJexlMap in class Provisioner<ConfigurationClass extends LdapProvisionerConfiguration,LdapUser,LdapGroup>variableMap - Map that will eventually be provided in Jexl evalutionsprotected void scheduleLdapModification(org.ldaptive.ModifyRequest operation)
ProvisioningWorkItem needs the given ModifyRequest done.
These are not done right away so that multiple modifications can be implemented together
in batches. For example, LDAP servers can generally process a single ldap modification that
adds 10 values to an attribute MUCH faster than processing 10 single-value Modify-Add operations.operation - public void finishProvisioningBatch(List<ProvisioningWorkItem> workItems) throws PspException
finishProvisioningBatch in class Provisioner<ConfigurationClass extends LdapProvisionerConfiguration,LdapUser,LdapGroup>PspExceptionprotected boolean isWorkItemMakingChange(ProvisioningWorkItem workItem, String dn, String attributeName, String provisioningAttributeValue)
protected LdapSystem getLdapSystem() throws PspException
PspExceptionpublic void ensureLdapOusExist(String dnString, boolean wholeDnIsTheOu) throws PspException
dnString - wholeDnIsTheOu - false: The top of the DN is not an OU (eg, cn=group,ou=folder1,ou=folder2,dc=example).
true: The top of the DN is an OU (eg, ou=folder1, ou=folder2, dc=example).PspExceptionprotected void ensureLdapOusExist(com.unboundid.ldap.sdk.DN dn)
throws PspException
dn - PspExceptionprotected void createOuInExistingLocation(com.unboundid.ldap.sdk.DN ouDn)
throws PspException
ouDn - PspExceptionprotected void performLdapAdd(org.ldaptive.LdapEntry entryToAdd)
throws PspException
entryToAdd - PspExceptionCopyright © 2022 Internet2. All rights reserved.