Class RecoveryModeRemoteDirectory
java.lang.Object
com.atlassian.crowd.manager.recovery.RecoveryModeRemoteDirectory
- All Implemented Interfaces:
RemoteDirectory,Attributes
Proxy directory that adds a temp admin account to Crowd and allow admin to login to recover from a broken deployment.
In case of a broken deployment or if the remote directory is down, the crowd admin will not be able to login to Crowd if it's account info is stored in that remote directory.
In this case, sysops can enable this "Proxy" directory, which essentially adds a new directory contains an admin user with a customisable password, and let the crowd admin to login to crowd and fix the deployment issue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddGroup(GroupTemplate group) voidaddGroupToGroup(String childGroup, String parentGroup) addUser(UserTemplate user, PasswordCredential credential) addUser(UserTemplateWithAttributes user, PasswordCredential credential) voidaddUserToGroup(String username, String groupName) authenticate(String name, PasswordCredential credential) countDirectMembersOfGroup(String groupName, int querySizeHint) voidfindGroupByName(String name) findUserByExternalId(String externalId) findUserByName(String name) longgetKeys()getUserAvatarByName(String username, int sizeHint) booleanisEmpty()booleanisGroupDirectGroupMember(String childGroup, String parentGroup) booleanbooleanisUserDirectGroupMember(String username, String groupName) voidremoveGroup(String name) voidremoveGroupAttributes(String groupName, String attributeName) voidremoveGroupFromGroup(String childGroup, String parentGroup) voidremoveUser(String name) voidremoveUserAttributes(String username, String attributeName) voidremoveUserFromGroup(String username, String groupName) renameGroup(String oldName, String newName) renameUser(String oldName, String newName) <T> List<T>searchGroupRelationships(MembershipQuery<T> query) <T> List<T>searchGroups(EntityQuery<T> query) <T> List<T>searchUsers(EntityQuery<T> query) voidsetAttributes(Map<String, String> attributes) voidsetDirectoryId(long directoryId) voidvoidbooleanbooleanbooleanDoes not support expiring passwordsbooleanvoidupdateGroup(GroupTemplate group) updateUser(UserTemplate user) voidupdateUserCredential(String username, PasswordCredential credential) Methods 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
getLocallyFilteredGroupNames, updateUserFromRemoteDirectory, userAuthenticated
-
Constructor Details
-
RecoveryModeRemoteDirectory
-
-
Method Details
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceRemoteDirectory
-
setDirectoryId
public void setDirectoryId(long directoryId) - Specified by:
setDirectoryIdin interfaceRemoteDirectory
-
getDescriptiveName
- Specified by:
getDescriptiveNamein interfaceRemoteDirectory
-
setAttributes
- Specified by:
setAttributesin interfaceRemoteDirectory
-
authenticate
public User authenticate(String name, PasswordCredential credential) throws UserNotFoundException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, OperationFailedException - Specified by:
authenticatein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInactiveAccountExceptionInvalidAuthenticationExceptionExpiredCredentialExceptionOperationFailedException
-
findUserByName
- Specified by:
findUserByNamein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
findUserWithAttributesByName
public UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException - Specified by:
findUserWithAttributesByNamein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
findUserByExternalId
public User findUserByExternalId(String externalId) throws UserNotFoundException, OperationFailedException - Specified by:
findUserByExternalIdin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
addUser
public User addUser(UserTemplate user, PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException - Specified by:
addUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedException
-
addUser
public UserWithAttributes addUser(UserTemplateWithAttributes user, PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException - Specified by:
addUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedException
-
updateUser
public User updateUser(UserTemplate user) throws InvalidUserException, UserNotFoundException, OperationFailedException - Specified by:
updateUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionUserNotFoundExceptionOperationFailedException
-
updateUserCredential
public void updateUserCredential(String username, PasswordCredential credential) throws UserNotFoundException, InvalidCredentialException, OperationFailedException - Specified by:
updateUserCredentialin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInvalidCredentialExceptionOperationFailedException
-
renameUser
public User renameUser(String oldName, String newName) throws UserNotFoundException, InvalidUserException, UserAlreadyExistsException, OperationFailedException - Specified by:
renameUserin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInvalidUserExceptionUserAlreadyExistsExceptionOperationFailedException
-
storeUserAttributes
public void storeUserAttributes(String username, Map<String, Set<String>> attributes) throws UserNotFoundException, OperationFailedException- Specified by:
storeUserAttributesin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
removeUserAttributes
public void removeUserAttributes(String username, String attributeName) throws UserNotFoundException, OperationFailedException - Specified by:
removeUserAttributesin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
removeUser
- Specified by:
removeUserin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
searchUsers
- Specified by:
searchUsersin interfaceRemoteDirectory- Throws:
OperationFailedException
-
findGroupByName
- Specified by:
findGroupByNamein interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
findGroupWithAttributesByName
public GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException - Specified by:
findGroupWithAttributesByNamein interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
addGroup
- Specified by:
addGroupin interfaceRemoteDirectory- Throws:
InvalidGroupExceptionOperationFailedException
-
updateGroup
public Group updateGroup(GroupTemplate group) throws InvalidGroupException, GroupNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
updateGroupin interfaceRemoteDirectory- Throws:
InvalidGroupExceptionGroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
renameGroup
public Group renameGroup(String oldName, String newName) throws GroupNotFoundException, InvalidGroupException, OperationFailedException - Specified by:
renameGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidGroupExceptionOperationFailedException
-
storeGroupAttributes
public void storeGroupAttributes(String groupName, Map<String, Set<String>> attributes) throws GroupNotFoundException, OperationFailedException- Specified by:
storeGroupAttributesin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
removeGroupAttributes
public void removeGroupAttributes(String groupName, String attributeName) throws GroupNotFoundException, OperationFailedException - Specified by:
removeGroupAttributesin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
removeGroup
public void removeGroup(String name) throws GroupNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
searchGroups
- Specified by:
searchGroupsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
isUserDirectGroupMember
public boolean isUserDirectGroupMember(String username, String groupName) throws OperationFailedException - Specified by:
isUserDirectGroupMemberin interfaceRemoteDirectory- Throws:
OperationFailedException
-
isGroupDirectGroupMember
public boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws OperationFailedException - Specified by:
isGroupDirectGroupMemberin interfaceRemoteDirectory- Throws:
OperationFailedException
-
countDirectMembersOfGroup
public BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint) throws OperationFailedException - Specified by:
countDirectMembersOfGroupin interfaceRemoteDirectory- Throws:
OperationFailedException
-
addUserToGroup
public void addUserToGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException - Specified by:
addUserToGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionUserNotFoundExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsException
-
addGroupToGroup
public void addGroupToGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException - Specified by:
addGroupToGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidMembershipExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsException
-
removeUserFromGroup
public void removeUserFromGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeUserFromGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionUserNotFoundExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
removeGroupFromGroup
public void removeGroupFromGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeGroupFromGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidMembershipExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
expireAllPasswords
- Specified by:
expireAllPasswordsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
searchGroupRelationships
public <T> List<T> searchGroupRelationships(MembershipQuery<T> query) throws OperationFailedException - Specified by:
searchGroupRelationshipsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
testConnection
- Specified by:
testConnectionin interfaceRemoteDirectory- Throws:
OperationFailedException
-
supportsInactiveAccounts
public boolean supportsInactiveAccounts()- Specified by:
supportsInactiveAccountsin interfaceRemoteDirectory
-
supportsNestedGroups
public boolean supportsNestedGroups()- Specified by:
supportsNestedGroupsin interfaceRemoteDirectory
-
supportsPasswordExpiration
public boolean supportsPasswordExpiration()Does not support expiring passwords- Specified by:
supportsPasswordExpirationin interfaceRemoteDirectory- Returns:
false, always
-
supportsSettingEncryptedCredential
public boolean supportsSettingEncryptedCredential()- Specified by:
supportsSettingEncryptedCredentialin interfaceRemoteDirectory
-
isRolesDisabled
public boolean isRolesDisabled()- Specified by:
isRolesDisabledin interfaceRemoteDirectory
-
getMemberships
- Specified by:
getMembershipsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
getAuthoritativeDirectory
- Specified by:
getAuthoritativeDirectoryin interfaceRemoteDirectory
-
getValues
- Specified by:
getValuesin interfaceAttributes
-
getValue
- Specified by:
getValuein interfaceAttributes
-
getKeys
- Specified by:
getKeysin interfaceAttributes
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceAttributes
-
getUserAvatarByName
public AvatarReference getUserAvatarByName(String username, int sizeHint) throws OperationFailedException - Specified by:
getUserAvatarByNamein interfaceRemoteDirectory- Throws:
OperationFailedException
-