com.atlassian.crowd.directory
Class AppleOpenDirectory

java.lang.Object
  extended by com.atlassian.crowd.directory.SpringLDAPConnector
      extended by com.atlassian.crowd.directory.RFC2307Directory
          extended by com.atlassian.crowd.directory.Rfc2307
              extended by com.atlassian.crowd.directory.AppleOpenDirectory
All Implemented Interfaces:
LDAPDirectory, RemoteDirectory, Attributes

public class AppleOpenDirectory
extends Rfc2307

Provides limited support for Apple's Open Directory. It's a customised version of OpenLDAP, using an RFC230-alike schema.

It has some quirks, and is not particularly well documented. We've been unable to determine exactly how to change user passwords.


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
AppleOpenDirectory(LDAPQueryTranslater ldapQueryTranslater, com.atlassian.event.api.EventPublisher eventPublisher, InstanceFactory instanceFactory, PasswordEncoderFactory passwordEncoderFactory)
           
 
Method Summary
protected  Map<String,String> getBaseEnvironmentProperties()
          Returns the properties used to set up the Ldap ContextSource.
 String getDescriptiveName()
          Returns a descriptive name for the type of directory.
static String getStaticDirectoryType()
           
 void updateUserCredential(String name, PasswordCredential credential)
          We don't support changing passwords in Open Directory, mainly because we can't figure out how.
 
Methods inherited from class com.atlassian.crowd.directory.Rfc2307
addGroup, addGroupToGroup, addUser, addUserToGroup, encodePassword, getNewUserDirectorySpecificAttributes, removeGroup, removeGroupFromGroup, removeUser, removeUserFromGroup, renameGroup, renameUser, updateGroup, updateUser
 
Methods inherited from class com.atlassian.crowd.directory.RFC2307Directory
getCustomGroupAttributeMappers, getCustomUserAttributeMappers, getMemberships, isGroupDirectGroupMember, isUserDirectGroupMember, searchGroupRelationshipsWithGroupTypeSpecified, supportsNestedGroups
 
Methods inherited from class com.atlassian.crowd.directory.SpringLDAPConnector
addDefaultSnToUserAttributes, addDefaultValueToUserAttributesForAttribute, asLdapGroupName, asLdapName, asLdapUserName, authenticate, createModificationItem, findEntityByDN, findEntityByDN, findGroupByName, findGroupByNameAndType, findGroupWithAttributesByName, findUserByExternalId, findUserByName, findUserWithAttributesByName, getAttributeAsBoolean, getAttributeAsLong, getAuthoritativeDirectory, getContextSource, getDirectoryId, getGroupContextMapper, getInitialGroupMemberDN, getKeys, getLdapPropertiesMapper, getNewGroupAttributes, getNewGroupDirectorySpecificAttributes, getNewUserAttributes, getSearchDN, getStandardisedDN, getSubTreeSearchControls, getUserContextMapper, getUserModificationItems, getValue, getValues, isEmpty, isRolesDisabled, pageSearchResults, postprocessGroups, removeGroupAttributes, removeUserAttributes, searchEntities, searchEntitiesWithRequestControls, searchGroupObjects, searchGroupObjectsOfSpecifiedGroupType, searchGroupRelationships, searchGroups, searchUserObjects, searchUsers, setAttributes, setDirectoryId, storeGroupAttributes, storeUserAttributes, supportsInactiveAccounts, testConnection, typedEntityNotFoundException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppleOpenDirectory

public AppleOpenDirectory(LDAPQueryTranslater ldapQueryTranslater,
                          com.atlassian.event.api.EventPublisher eventPublisher,
                          InstanceFactory instanceFactory,
                          PasswordEncoderFactory passwordEncoderFactory)
Method Detail

getStaticDirectoryType

public static String getStaticDirectoryType()

getDescriptiveName

public String getDescriptiveName()
Description copied from interface: RemoteDirectory
Returns a descriptive name for the type of directory.

Specified by:
getDescriptiveName in interface RemoteDirectory
Overrides:
getDescriptiveName in class Rfc2307
Returns:
descriptive name.

getBaseEnvironmentProperties

protected Map<String,String> getBaseEnvironmentProperties()
Returns the properties used to set up the Ldap ContextSource. Overridden to make sure CRAM-MD5 is used for authentication - for security reasons, Open Directory does not support Simple Authentication.

Overrides:
getBaseEnvironmentProperties in class SpringLDAPConnector
Returns:

updateUserCredential

public void updateUserCredential(String name,
                                 PasswordCredential credential)
                          throws UserNotFoundException,
                                 InvalidCredentialException
We don't support changing passwords in Open Directory, mainly because we can't figure out how.

Specified by:
updateUserCredential in interface RemoteDirectory
Overrides:
updateUserCredential in class SpringLDAPConnector
Parameters:
name - The name of the user (username).
credential - The new credential (password).
Throws:
UserNotFoundException - The user does not exist.
InvalidCredentialException - The supplied credential is invalid.


Copyright © 2014 Atlassian. All Rights Reserved.