Package com.atlassian.crowd.directory
Class RFC2307Directory
java.lang.Object
com.atlassian.crowd.directory.SpringLDAPConnector
com.atlassian.crowd.directory.RFC2307Directory
- All Implemented Interfaces:
LDAPDirectory,RemoteDirectory,Attributes
- Direct Known Subclasses:
Rfc2307
Read-only, non-nesting implementation of RFC2307 user-group membership
interactions.
A user is a member of a group if either:
- the gidNumber of the user matches the gidNumber of the group
- the username of user is present in the collection of member attribute values of the group
- See Also:
-
Field Summary
Fields inherited from class com.atlassian.crowd.directory.SpringLDAPConnector
attributes, contextSource, contextSourceTransactionManager, DEFAULT_PAGE_SIZE, eventPublisher, ldapPropertiesMapper, ldapQueryTranslater, ldapTemplate, nameConverter, searchDN -
Constructor Summary
ConstructorsConstructorDescriptionRFC2307Directory(LDAPQueryTranslater ldapQueryTranslater, com.atlassian.event.api.EventPublisher eventPublisher, InstanceFactory instanceFactory, LdapContextSourceProvider ldapContextSourceProvider) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<AttributeMapper>As a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).protected List<AttributeMapper>protected List<AttributeMapper>As a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).booleanisGroupDirectGroupMember(String childGroup, String parentGroup) booleanisUserDirectGroupMember(String username, String groupName) protected <T> Iterable<T>Execute the search for group relationships given that a group of type GROUP or LEGACY_ROLE has been specified in the EntityDescriptor for the group(s).booleanAs best I can determine, the RFC2307 schema does not support nested groups.booleanDoes not support expiring passwordsMethods inherited from class com.atlassian.crowd.directory.SpringLDAPConnector
addDefaultSnToUserAttributes, addDefaultValueToUserAttributesForAttribute, addGroup, addUser, addUser, authenticate, avatarMapper, countDirectMembersOfGroup, createModificationItem, expireAllPasswords, findEntityByDN, findEntityByDN, findEntityByDN, findGroupByName, findGroupByNameAndType, findGroupWithAttributesByName, findUserByExternalId, findUserByName, findUserWithAttributesByName, getAttributeAsBoolean, getAttributeAsLong, getAuthoritativeDirectory, getBaseEnvironmentProperties, getContextSource, getCredentialEncoder, getDirectoryId, getGroupContextMapper, getGroupContextMapper, getInitialGroupMemberDN, getKeys, getLdapPropertiesMapper, getNewGroupAttributes, getNewGroupDirectorySpecificAttributes, getNewUserAttributes, getNewUserDirectorySpecificAttributes, getRequiredCustomGroupAttributeMappers, getSearchControls, getSearchDN, getUserAvatarByName, getUserModificationItems, getValue, getValues, isEmpty, isRolesDisabled, pageSearchResults, postprocessGroup, postprocessGroups, removeGroup, removeGroupAttributes, removeUser, removeUserAttributes, renameGroup, renameUser, searchEntities, searchEntitiesWithRequestControls, searchGroupObjects, searchGroupObjectsOfSpecifiedGroupType, searchGroupRelationships, searchGroups, searchUserObjects, searchUsers, searchUsers, setAttributes, setDirectoryId, setLdapPropertiesMapperAttributes, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsSettingEncryptedCredential, testConnection, typedEntityNotFoundException, updateGroup, updateUser, updateUserCredentialMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.crowd.directory.RemoteDirectory
addGroupToGroup, addUserToGroup, getDescriptiveName, getLocallyFilteredGroupNames, removeGroupFromGroup, removeUserFromGroup, updateUserFromRemoteDirectory, userAuthenticated
-
Constructor Details
-
RFC2307Directory
public RFC2307Directory(LDAPQueryTranslater ldapQueryTranslater, com.atlassian.event.api.EventPublisher eventPublisher, InstanceFactory instanceFactory, LdapContextSourceProvider ldapContextSourceProvider)
-
-
Method Details
-
getCustomGroupAttributeMappers
Description copied from class:SpringLDAPConnectorAs a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).- Overrides:
getCustomGroupAttributeMappersin classSpringLDAPConnector- Returns:
- collection of custom attribute mappers (cannot be
nullbut can be an empty list).
-
getMemberOnlyGroupAttributeMappers
Description copied from class:SpringLDAPConnectorAs a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).- Overrides:
getMemberOnlyGroupAttributeMappersin classSpringLDAPConnector- Returns:
- collection of custom attribute mappers (cannot be
nullbut can be an empty list).
-
getCustomUserAttributeMappers
- Overrides:
getCustomUserAttributeMappersin classSpringLDAPConnector- Returns:
- a collection of custom attribute mappers. By default just return an empty list.
-
isUserDirectGroupMember
public boolean isUserDirectGroupMember(String username, String groupName) throws OperationFailedException - Throws:
OperationFailedException
-
isGroupDirectGroupMember
- Parameters:
childGroup- name of child group.parentGroup- name of parent group.- Returns:
falseas nested groups are not supported.
-
searchGroupRelationshipsWithGroupTypeSpecified
protected <T> Iterable<T> searchGroupRelationshipsWithGroupTypeSpecified(MembershipQuery<T> query) throws OperationFailedException Description copied from class:SpringLDAPConnectorExecute the search for group relationships given that a group of type GROUP or LEGACY_ROLE has been specified in the EntityDescriptor for the group(s).- Specified by:
searchGroupRelationshipsWithGroupTypeSpecifiedin classSpringLDAPConnector- Parameters:
query- membership query with all GroupType's not null.- Returns:
- list of members or memberships depending on the query.
- Throws:
OperationFailedException- if the operation failed due to a communication error with the remote directory, or if the query is invalid
-
supportsNestedGroups
public boolean supportsNestedGroups()As best I can determine, the RFC2307 schema does not support nested groups.- Specified by:
supportsNestedGroupsin interfaceRemoteDirectory- Overrides:
supportsNestedGroupsin classSpringLDAPConnector- Returns:
false.
-
supportsPasswordExpiration
public boolean supportsPasswordExpiration()Does not support expiring passwords- Specified by:
supportsPasswordExpirationin interfaceRemoteDirectory- Overrides:
supportsPasswordExpirationin classSpringLDAPConnector- Returns:
- false
-
getMemberships
- Throws:
OperationFailedException
-