public abstract class RFC4519Directory extends SpringLDAPConnector
A user is a member of a group if either:
RFC2307GidNumberMapper,
RFC2307MemberUidMapper| Modifier and Type | Field and Description |
|---|---|
static ContextMapperWithRequiredAttributes<LdapName> |
DN_MAPPER |
attributes, contextSource, contextSourceTransactionManager, DEFAULT_PAGE_SIZE, eventPublisher, ldapPropertiesMapper, ldapQueryTranslater, ldapTemplate, nameConverter, searchDN| Constructor and Description |
|---|
RFC4519Directory(LDAPQueryTranslater ldapQueryTranslater,
com.atlassian.event.api.EventPublisher eventPublisher,
InstanceFactory instanceFactory,
LdapContextSourceProvider ldapContextSourceProvider) |
addDefaultSnToUserAttributes, addDefaultValueToUserAttributesForAttribute, addGroup, addUser, addUser, asLdapGroupName, asLdapName, asLdapUserName, authenticate, avatarMapper, countDirectMembersOfGroup, createModificationItem, expireAllPasswords, findEntityByDN, findEntityByDN, findGroupByName, findGroupByNameAndType, findGroupWithAttributesByName, findUserByExternalId, findUserByName, findUserWithAttributesByName, getAttributeAsBoolean, getAttributeAsLong, getAuthoritativeDirectory, getBaseEnvironmentProperties, getContextSource, getCredentialEncoder, getDirectoryId, getGroupContextMapper, getInitialGroupMemberDN, getKeys, getLdapPropertiesMapper, getNewGroupAttributes, getNewGroupDirectorySpecificAttributes, getNewUserAttributes, getNewUserDirectorySpecificAttributes, getRequiredCustomGroupAttributeMappers, getSearchControls, getSearchDN, getUserAvatarByName, getUserModificationItems, getValue, getValues, isEmpty, isRolesDisabled, pageSearchResults, postprocessGroups, removeGroup, removeGroupAttributes, removeUser, removeUserAttributes, renameGroup, renameUser, searchEntities, searchEntitiesWithRequestControls, searchGroupObjects, searchGroupObjectsOfSpecifiedGroupType, searchGroupRelationships, searchGroups, searchUserObjects, searchUsers, setAttributes, setDirectoryId, setLdapPropertiesMapperAttributes, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, supportsPasswordExpiration, supportsSettingEncryptedCredential, testConnection, typedEntityNotFoundException, updateGroup, updateUser, updateUserCredentialclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescriptiveName, getLocallyFilteredGroupNames, updateUserFromRemoteDirectory, userAuthenticatedpublic static final ContextMapperWithRequiredAttributes<LdapName> DN_MAPPER
public RFC4519Directory(LDAPQueryTranslater ldapQueryTranslater, com.atlassian.event.api.EventPublisher eventPublisher, InstanceFactory instanceFactory, LdapContextSourceProvider ldapContextSourceProvider)
protected List<AttributeMapper> getCustomGroupAttributeMappers()
SpringLDAPConnectorgetCustomGroupAttributeMappers in class SpringLDAPConnectorprotected List<AttributeMapper> getMemberDnMappers()
protected List<AttributeMapper> getCustomUserAttributeMappers(UserContextMapperConfig config)
getCustomUserAttributeMappers in class SpringLDAPConnectorpublic Collection<LDAPGroupWithAttributes> searchGroupsByDns(Set<String> groupsDn) throws OperationFailedException
OperationFailedExceptionprotected Collection<LDAPGroupWithAttributes> searchGroupsByAttribute(Set<String> propertyValues, Function<List<String>,org.springframework.ldap.filter.Filter> filterFunction) throws OperationFailedException
OperationFailedExceptionprotected org.springframework.ldap.filter.AndFilter prepareOrFilterForGroupProperty(String propertyName, List<String> propertyValues)
protected boolean isDnDirectGroupMember(String memberDN, LDAPGroupWithAttributes parentGroup)
protected boolean isDirectGroupMemberOf(LDAPUserWithAttributes user, String groupDN)
public boolean isUserDirectGroupMember(String username, String groupName) throws OperationFailedException
OperationFailedExceptionpublic boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws OperationFailedException
OperationFailedExceptionprotected void addDnToGroup(String dn, LDAPGroupWithAttributes group) throws OperationFailedException
OperationFailedExceptionpublic void addUserToGroup(String username, String groupName) throws GroupNotFoundException, OperationFailedException, UserNotFoundException, MembershipAlreadyExistsException
public void addGroupToGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, OperationFailedException, MembershipAlreadyExistsException
protected void removeDnFromGroup(String dn, LDAPGroupWithAttributes group) throws OperationFailedException
OperationFailedExceptionpublic void removeUserFromGroup(String username, String groupName) throws UserNotFoundException, GroupNotFoundException, MembershipNotFoundException, OperationFailedException
public void removeGroupFromGroup(String childGroup, String parentGroup) throws GroupNotFoundException, MembershipNotFoundException, InvalidMembershipException, OperationFailedException
public Iterable<Membership> getMemberships() throws OperationFailedException
OperationFailedExceptionprotected <T> Iterable<T> searchGroupRelationshipsWithGroupTypeSpecified(MembershipQuery<T> query) throws OperationFailedException
SpringLDAPConnectorsearchGroupRelationshipsWithGroupTypeSpecified in class SpringLDAPConnectorquery - membership query with all GroupType's not null.OperationFailedException - if the operation failed due to a communication error with the remote directory,
or if the query is invalidprotected List<? extends LDAPGroupWithAttributes> findGroupMemberships(MembershipQuery<? extends LDAPGroupWithAttributes> query) throws OperationFailedException
OperationFailedExceptionprotected Iterable<String> findGroupMembershipNames(MembershipQuery<String> query) throws OperationFailedException
OperationFailedExceptionprotected <T> List<T> findGroupMembershipsOfUserViaMemberOf(String username, int startIndex, int maxResults, com.atlassian.crowd.directory.RFC4519Directory.LookupByDn<T> mapper) throws OperationFailedException
OperationFailedExceptionprotected List<LDAPUserWithAttributes> findUserMembersOfGroupViaMemberDN(String groupName, GroupType groupType, int startIndex, int maxResults) throws OperationFailedException
OperationFailedExceptionprotected Iterable<LDAPUserWithAttributes> findUserMembersOfGroupViaMemberOf(String groupName, GroupType groupType, int startIndex, int maxResults) throws OperationFailedException
OperationFailedExceptionprotected static <T> Iterable<T> toGenericIterable(Iterable list)
public Iterable<LdapName> findDirectMembersOfGroup(LdapName groupDn) throws OperationFailedException
RemoteDirectory's contract. It is introduced by RFC4519Directory to
support RFC4519DirectoryMembershipsIterable.
Children of this class can add additional groups by overriding findAdditionalDirectMembers(LdapName, Supplier)groupDn - LDAP name of a groupOperationFailedException - if the operation fails for any reasonpublic Iterable<LdapName> findDirectMembersOfGroup(LdapName groupDn, ContextMapperWithRequiredAttributes<LdapName> dnMapper) throws OperationFailedException
RemoteDirectory's contract. It is introduced by RFC4519Directory to
support RFC4519DirectoryMembershipsIterable.
Children of this class can add additional groups by overriding findAdditionalDirectMembers(LdapName, Supplier)groupDn - LDAP name of a groupdnMapper - mapper that converts the LDAP search result into an LdapNameOperationFailedException - if the operation fails for any reasonprotected Iterable<LdapName> findAdditionalDirectMembers(LdapName groupDn, @Nullable Supplier<Optional<LDAPGroupWithAttributes>> group) throws OperationFailedException
OperationFailedExceptionCopyright © 2023 Atlassian. All rights reserved.