public class MicrosoftActiveDirectory extends RFC4519Directory
attributes, contextSource, contextSourceTransactionManager, DEFAULT_PAGE_SIZE, eventPublisher, ldapPropertiesMapper, ldapQueryTranslater, ldapTemplate, nameConverter, searchDN
Constructor and Description |
---|
MicrosoftActiveDirectory(LDAPQueryTranslater ldapQueryTranslater,
com.atlassian.event.api.EventPublisher eventPublisher,
InstanceFactory instanceFactory) |
Modifier and Type | Method and Description |
---|---|
protected byte[] |
encodePassword(String unencodedPassword)
Converts the clear-text password to the {
AD_PASSWORD_ENCODED encoding - currently UTF-16LE |
long |
fetchHighestCommittedUSN() |
List<LDAPGroupWithAttributes> |
findAddedOrUpdatedGroupsSince(long usnChanged) |
protected <T> List<T> |
findAddedOrUpdatedObjectsSince(long usnChange,
Name objectBaseDN,
String objectFilter,
ContextMapperWithRequiredAttributes<T> contextMapper) |
List<LDAPUserWithAttributes> |
findAddedOrUpdatedUsersSince(long usnChange) |
List<Tombstone> |
findGroupTombstonesSince(long usnChange) |
protected List<Tombstone> |
findTombstonesSince(long usnChange,
Name objectBaseDN,
String objectClass) |
List<Tombstone> |
findUserTombstonesSince(long usnChange) |
protected Map<String,String> |
getBaseEnvironmentProperties()
Returns the properties used to set up the Ldap ContextSource.
|
protected List<AttributeMapper> |
getCustomGroupAttributeMappers()
As a minimum, this SHOULD provide an attribute mapper that maps the group members attribute (if available).
|
protected List<AttributeMapper> |
getCustomUserAttributeMappers() |
String |
getDescriptiveName()
Returns a descriptive name for the type of directory.
|
protected String |
getInitialGroupMemberDN()
AD does not need a default container member.
|
protected List<AttributeMapper> |
getMemberDnMappers() |
protected void |
getNewGroupDirectorySpecificAttributes(Group group,
Attributes attributes)
If we want to be able to nest groups, we need to create distribution groups rather than security groups.
|
protected void |
getNewUserDirectorySpecificAttributes(User user,
Attributes attributes)
Active Directory needs a couple of additional attributes set - the sAMAccountName (which is the account name
you use to log on to Windows), and the account disabled flag.
|
static String |
getStaticDirectoryType() |
protected List<LDAPGroupWithAttributes> |
postprocessGroups(List<LDAPGroupWithAttributes> groups)
Perform any post-processing on groups.
|
addGroupToGroup, addUserToGroup, findDirectMembersOfGroup, getMemberships, isGroupDirectGroupMember, isUserDirectGroupMember, removeGroupFromGroup, removeUserFromGroup, searchGroupRelationshipsWithGroupTypeSpecified
addDefaultSnToUserAttributes, addDefaultValueToUserAttributesForAttribute, addGroup, addUser, asLdapGroupName, asLdapName, asLdapUserName, authenticate, findEntityByDN, findEntityByDN, findGroupByName, findGroupByNameAndType, findGroupWithAttributesByName, findUserByName, findUserWithAttributesByName, getAttributeAsBoolean, getAttributeAsLong, getAuthoritativeDirectory, getContextSource, getDirectoryId, getGroupContextMapper, getKeys, getLdapPropertiesMapper, getNewGroupAttributes, getNewUserAttributes, getSearchDN, getStandardisedDN, getSubTreeSearchControls, getUserContextMapper, getValue, getValues, isEmpty, isRolesDisabled, pageSearchResults, removeGroup, removeGroupAttributes, removeUser, removeUserAttributes, renameGroup, renameUser, searchEntities, searchEntitiesWithRequestControls, searchGroupObjects, searchGroupObjectsOfSpecifiedGroupType, searchGroupRelationships, searchGroups, searchUserObjects, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, supportsNestedGroups, testConnection, typedEntityNotFoundException, updateGroup, updateUser, updateUserCredential
public MicrosoftActiveDirectory(LDAPQueryTranslater ldapQueryTranslater, com.atlassian.event.api.EventPublisher eventPublisher, InstanceFactory instanceFactory)
public static String getStaticDirectoryType()
public String getDescriptiveName()
RemoteDirectory
protected String getInitialGroupMemberDN()
getInitialGroupMemberDN
in class SpringLDAPConnector
null
.protected byte[] encodePassword(String unencodedPassword) throws InvalidCredentialException
AD_PASSWORD_ENCODED
encoding - currently UTF-16LEencodePassword
in class SpringLDAPConnector
unencodedPassword
- InvalidCredentialException
- If the specified encoding is not available on this system.protected void getNewUserDirectorySpecificAttributes(User user, Attributes attributes)
getNewUserDirectorySpecificAttributes
in class SpringLDAPConnector
user
- attributes
- protected void getNewGroupDirectorySpecificAttributes(Group group, Attributes attributes)
getNewGroupDirectorySpecificAttributes
in class SpringLDAPConnector
group
- attributes
- protected List<AttributeMapper> getCustomUserAttributeMappers()
getCustomUserAttributeMappers
in class RFC4519Directory
protected List<AttributeMapper> getCustomGroupAttributeMappers()
SpringLDAPConnector
getCustomGroupAttributeMappers
in class RFC4519Directory
protected List<AttributeMapper> getMemberDnMappers()
getMemberDnMappers
in class RFC4519Directory
protected List<LDAPGroupWithAttributes> postprocessGroups(List<LDAPGroupWithAttributes> groups) throws OperationFailedException
SpringLDAPConnector
postprocessGroups
in class SpringLDAPConnector
groups
- to post-processOperationFailedException
- if processing encounters a problem with the underlying directoryprotected Map<String,String> getBaseEnvironmentProperties()
SpringLDAPConnector
getBaseEnvironmentProperties
in class SpringLDAPConnector
public long fetchHighestCommittedUSN() throws OperationFailedException
OperationFailedException
public List<LDAPUserWithAttributes> findAddedOrUpdatedUsersSince(long usnChange) throws OperationFailedException
OperationFailedException
public List<LDAPGroupWithAttributes> findAddedOrUpdatedGroupsSince(long usnChanged) throws OperationFailedException
OperationFailedException
public List<Tombstone> findUserTombstonesSince(long usnChange) throws OperationFailedException
OperationFailedException
public List<Tombstone> findGroupTombstonesSince(long usnChange) throws OperationFailedException
OperationFailedException
protected <T> List<T> findAddedOrUpdatedObjectsSince(long usnChange, Name objectBaseDN, String objectFilter, ContextMapperWithRequiredAttributes<T> contextMapper) throws OperationFailedException
OperationFailedException
protected List<Tombstone> findTombstonesSince(long usnChange, Name objectBaseDN, String objectClass) throws OperationFailedException
OperationFailedException
Copyright © 2013 Atlassian. All Rights Reserved.