public class SecurityServerGeneric extends Object implements SecurityServer
Crowd XFire SOAP service implementation.
SecurityServerClient
Constructor and Description |
---|
SecurityServerGeneric(SOAPService soapService,
ApplicationService applicationService,
PropertyManager propertyManager,
TokenAuthenticationManager tokenAuthenticationManager,
ForgottenLoginManager forgottenLoginManager,
ApplicationManager applicationManager) |
Modifier and Type | Method and Description |
---|---|
void |
addAllPrincipals(AuthenticatedToken applicationToken,
SOAPPrincipalWithCredential[] principals)
Adds principals to the application's assigned directory.
|
void |
addAttributeToGroup(AuthenticatedToken applicationToken,
String group,
SOAPAttribute attribute)
Adds an attribute to a group that is in the application's assigned directory.
|
void |
addAttributeToPrincipal(AuthenticatedToken applicationToken,
String principal,
SOAPAttribute attribute)
Adds an attribute to a principal who is in the application's assigned directory.
|
SOAPGroup |
addGroup(AuthenticatedToken applicationToken,
SOAPGroup soapGroup)
Adds a group to the application's assigned directory.
|
SOAPPrincipal |
addPrincipal(AuthenticatedToken applicationToken,
SOAPPrincipal principal,
PasswordCredential credential)
Adds a principal to the application's assigned directory.
|
void |
addPrincipalToGroup(AuthenticatedToken applicationToken,
String principal,
String group)
Adds a principal to a group for the application's assigned directory.
|
void |
addPrincipalToRole(AuthenticatedToken applicationToken,
String principal,
String role)
Adds the principal to a role for the application's assigned directory.
|
SOAPRole |
addRole(AuthenticatedToken applicationToken,
SOAPRole soapRole)
Adds a role to the application's assigned directory.
|
AuthenticatedToken |
authenticateApplication(ApplicationAuthenticationContext authenticationContext)
Authenticates an application client to the Crowd security server.
|
String |
authenticatePrincipal(AuthenticatedToken applicationToken,
UserAuthenticationContext authenticateContext)
Authenticates a principal verses the calling who is in the application's assigned directory.
|
String |
authenticatePrincipalSimple(AuthenticatedToken applicationToken,
String username,
String password)
Authenticates a principal without SSO details utilizing centralized authentication only.
|
String |
createPrincipalToken(AuthenticatedToken applicationToken,
String username,
ValidationFactor[] validationFactors)
Authenticates a principal without validating a password.
|
String[] |
findAllGroupNames(AuthenticatedToken applicationToken)
Finds all of the groups who are visible in the application's assigned directory.
|
SOAPNestableGroup[] |
findAllGroupRelationships(AuthenticatedToken applicationToken)
Finds all of the groups who are visible in the application's assigned directory.
|
String[] |
findAllPrincipalNames(AuthenticatedToken applicationToken)
Finds all of the principals who are visable in the application's assigned directory.
|
String[] |
findAllRoleNames(AuthenticatedToken applicationToken)
Finds all of the roles who are visible in the application's assigned directory.
|
SOAPGroup |
findGroupByName(AuthenticatedToken applicationToken,
String name)
Find a group by name for the application's assigned directory.
|
String[] |
findGroupMemberships(AuthenticatedToken applicationToken,
String principalName)
Finds all of the principals who are members of a group that is in the application's assigned directory.
|
SOAPGroup |
findGroupWithAttributesByName(AuthenticatedToken applicationToken,
String name)
Find a group by name for the application's assigned directory.
|
SOAPPrincipal |
findPrincipalByName(AuthenticatedToken applicationToken,
String name)
Finds a principal by name who is in the application's assigned directory.
|
SOAPPrincipal |
findPrincipalByToken(AuthenticatedToken applicationToken,
String key)
Finds a principal by token.
|
SOAPPrincipal |
findPrincipalWithAttributesByName(AuthenticatedToken applicationToken,
String name)
Finds a principal by name who is in the application's assigned directory.
|
SOAPRole |
findRoleByName(AuthenticatedToken applicationToken,
String name)
Finds a role by name for the application's assigned directory.
|
String[] |
findRoleMemberships(AuthenticatedToken applicationToken,
String principalName)
Finds all of the principals who are members of a role that is in the application's assigned directory.
|
long |
getCacheTime(AuthenticatedToken applicationToken)
Deprecated.
since 1.0.2 All caching configuration has moved to the crowd-ehcache.xml
|
SOAPCookieInfo |
getCookieInfo(AuthenticatedToken applicationToken)
Returns information needed to set the SSO cookie correctly.
|
String |
getDomain(AuthenticatedToken applicationToken)
This will return the domain configured in Crowd or null if no domain has been set.
|
String[] |
getGrantedAuthorities(AuthenticatedToken applicationToken)
Will return the List of group names that have been given access to connect to the application
|
void |
invalidatePrincipalToken(AuthenticatedToken applicationToken,
String token)
Invalidates a token for all integrated applications.
|
boolean |
isCacheEnabled(AuthenticatedToken applicationToken)
Checks if the client application should cache security information from the Crowd server.
|
boolean |
isGroupMember(AuthenticatedToken applicationToken,
String group,
String principal)
Checks if a principal is a member of a group for the application's assigned directory.
|
boolean |
isRoleMember(AuthenticatedToken applicationToken,
String role,
String principal)
Checks if a principal is a member of a role for the application's assigned directory.
|
boolean |
isValidPrincipalToken(AuthenticatedToken applicationToken,
String principalToken,
ValidationFactor[] validationFactors)
Checks if the principal's current token is still valid.
|
void |
removeAttributeFromGroup(AuthenticatedToken applicationToken,
String group,
String attribute)
Removes an attribute from a group that is in the application's assigned directory.
|
void |
removeAttributeFromPrincipal(AuthenticatedToken applicationToken,
String principal,
String attribute)
Removes an attribute from a principal who is in the application's assigned directory.
|
void |
removeGroup(AuthenticatedToken applicationToken,
String group)
Removes a group from the application's assigned directory.
|
void |
removePrincipal(AuthenticatedToken applicationToken,
String principal)
Removes a principal from the application's assigned directory.
|
void |
removePrincipalFromGroup(AuthenticatedToken applicationToken,
String principal,
String group)
Removes a principal from a group for the application's assigned directory.
|
void |
removePrincipalFromRole(AuthenticatedToken applicationToken,
String principal,
String role)
Removes a principal from a role for the application's assigned directory.
|
void |
removeRole(AuthenticatedToken applicationToken,
String role)
Removes a role from the application's assigned directory.
|
void |
resetPrincipalCredential(AuthenticatedToken applicationToken,
String principal)
Resets a principal's password credential to a random password and emails the new password who is in the application's assigned directory.
|
SOAPGroup[] |
searchGroups(AuthenticatedToken applicationToken,
SearchRestriction[] searchRestrictions)
Searches for groups that are in the application's assigned directory.
|
SOAPPrincipal[] |
searchPrincipals(AuthenticatedToken applicationToken,
SearchRestriction[] searchRestrictions)
Searches for principals that are in the application's assigned directory.
|
SOAPRole[] |
searchRoles(AuthenticatedToken applicationToken,
SearchRestriction[] searchRestrictions)
Searches for roles that are in the application's assigned directory.
|
void |
updateGroup(AuthenticatedToken authenticatedToken,
String groupName,
String description,
boolean active)
Updates the first group located from the list of directories assigned to an application
Available fields that can be updated are
description and active |
void |
updateGroupAttribute(AuthenticatedToken applicationToken,
String group,
SOAPAttribute attribute)
Updates an attribute for a group that is in the application's assigned directory..
|
void |
updatePrincipalAttribute(AuthenticatedToken applicationToken,
String name,
SOAPAttribute attribute)
Updates an attribute for a principal who is in the application's assigned directory..
|
void |
updatePrincipalCredential(AuthenticatedToken applicationToken,
String principal,
PasswordCredential credential)
Updates the password credential for a principal who is in the application's assigned directory.
|
public SecurityServerGeneric(SOAPService soapService, ApplicationService applicationService, PropertyManager propertyManager, TokenAuthenticationManager tokenAuthenticationManager, ForgottenLoginManager forgottenLoginManager, ApplicationManager applicationManager)
public String createPrincipalToken(AuthenticatedToken applicationToken, String username, ValidationFactor[] validationFactors) throws RemoteException, ApplicationAccessDeniedException, InvalidAuthorizationTokenException, InactiveAccountException, InvalidAuthenticationException
SecurityServer
createPrincipalToken
in interface SecurityServer
applicationToken
- The application authentication details.username
- The username to create an authenticate token for.validationFactors
- The known attributes of the user to use when creating a token, such as their remote IP address and user-agent.RemoteException
- An unknown remote exception occurred.ApplicationAccessDeniedException
- User does not have access to authenticate against applicationInvalidAuthorizationTokenException
- An invalid authentication occurred.InactiveAccountException
- The principal's account is inactive.InvalidAuthenticationException
- An invalid authentication occurred.public String authenticatePrincipalSimple(AuthenticatedToken applicationToken, String username, String password) throws RemoteException, InvalidAuthenticationException, InvalidAuthorizationTokenException, InactiveAccountException, ApplicationAccessDeniedException, ExpiredCredentialException
SecurityServer
authenticatePrincipalSimple
in interface SecurityServer
applicationToken
- The application authentication details.username
- The username of the principal.password
- The password credential.RemoteException
- An unknown remote exception occurred.InvalidAuthenticationException
- An invalid authentication occurred.InvalidAuthorizationTokenException
- An invalid authentication occurred.InactiveAccountException
- The principal's account is inactive.ApplicationAccessDeniedException
- User does not have access to authenticate against applicationExpiredCredentialException
- The user's credentials have expired. The user must change their credentials in order to successfully authenticate.public AuthenticatedToken authenticateApplication(ApplicationAuthenticationContext authenticationContext) throws RemoteException, InvalidAuthenticationException, InvalidAuthorizationTokenException
SecurityServer
authenticateApplication
in interface SecurityServer
authenticationContext
- The application authentication details.RemoteException
- An unknown remote exception occurred.InvalidAuthenticationException
- An invalid authentication occurred.InvalidAuthorizationTokenException
- An invalid authentication occurred.public String authenticatePrincipal(AuthenticatedToken applicationToken, UserAuthenticationContext authenticateContext) throws RemoteException, InvalidAuthenticationException, InactiveAccountException, InvalidAuthorizationTokenException, ApplicationAccessDeniedException, ExpiredCredentialException
SecurityServer
authenticatePrincipal
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.authenticateContext
- The principal's authentication details.RemoteException
- An unknown remote exception occurred.InvalidAuthenticationException
- The principal's authentication details were invalid.InactiveAccountException
- The principal's account is not active.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationAccessDeniedException
- User does not have access to authenticate against applicationExpiredCredentialException
- The user's credentials have expired. The user must change their credentials in order to successfully authenticate.public boolean isValidPrincipalToken(AuthenticatedToken applicationToken, String principalToken, ValidationFactor[] validationFactors) throws RemoteException, InvalidAuthorizationTokenException, ApplicationAccessDeniedException
SecurityServer
isValidPrincipalToken
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principalToken
- The token to check.validationFactors
- The known identity factors used when creating the principal's token.true
if and only if the token is active, otherwise false
.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationAccessDeniedException
- User does not have access to authenticate against applicationpublic void invalidatePrincipalToken(AuthenticatedToken applicationToken, String token) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
invalidatePrincipalToken
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.token
- The token to invalidate.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public SOAPGroup[] searchGroups(AuthenticatedToken applicationToken, SearchRestriction[] searchRestrictions) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
searchGroups
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.searchRestrictions
- The search restrictions to use when performing this search.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public SOAPPrincipal[] searchPrincipals(AuthenticatedToken applicationToken, SearchRestriction[] searchRestrictions) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
searchPrincipals
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.searchRestrictions
- The search restrictions to use when performing this search.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public SOAPRole[] searchRoles(AuthenticatedToken applicationToken, SearchRestriction[] searchRestrictions) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
searchRoles
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.searchRestrictions
- The search restrictions to use when performing this search.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.@Transactional public SOAPGroup addGroup(AuthenticatedToken applicationToken, SOAPGroup soapGroup) throws RemoteException, InvalidAuthorizationTokenException, InvalidGroupException, ApplicationPermissionException
SecurityServer
addGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.soapGroup
- The group to add.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.InvalidGroupException
- An error occurred adding the group to the directory server.ApplicationPermissionException
- The application does not have the proper permissions to add the entity to the directory server.public void updateGroup(AuthenticatedToken authenticatedToken, String groupName, String description, boolean active) throws RemoteException, ApplicationPermissionException, InvalidAuthorizationTokenException
SecurityServer
description
and active
updateGroup
in interface SecurityServer
authenticatedToken
- The application's authentication token. Obtained from the authenticateApplication
method.groupName
- The name of the group to update.description
- the new description of the group.active
- the new active flag for the group.RemoteException
- An unknown remote exception occurred.ApplicationPermissionException
- The application does not have the proper permissions to update the entity to the directory server.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.@Transactional public SOAPGroup findGroupByName(AuthenticatedToken applicationToken, String name) throws RemoteException, ObjectNotFoundException, InvalidAuthorizationTokenException
SecurityServer
findGroupByName
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the group.RemoteException
- An unknown remote exception occurred.ObjectNotFoundException
- Unable to find the specific group.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.@Transactional public SOAPGroup findGroupWithAttributesByName(AuthenticatedToken applicationToken, String name) throws RemoteException, InvalidAuthorizationTokenException, ObjectNotFoundException
SecurityServer
findGroupWithAttributesByName
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the group.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ObjectNotFoundException
- Unable to find the specific group.public SOAPRole addRole(AuthenticatedToken applicationToken, SOAPRole soapRole) throws RemoteException, InvalidAuthorizationTokenException, InvalidRoleException, ApplicationPermissionException
SecurityServer
addRole
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.soapRole
- The name of the role.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.InvalidRoleException
- An error occurred adding the role to the directory server.ApplicationPermissionException
- The application does not have the proper permissions to add the entity to the directory server.public SOAPRole findRoleByName(AuthenticatedToken applicationToken, String name) throws RemoteException, InvalidAuthorizationTokenException, ObjectNotFoundException
SecurityServer
findRoleByName
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the role.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ObjectNotFoundException
- Unable to find the specified role.public SOAPPrincipal findPrincipalByToken(AuthenticatedToken applicationToken, String key) throws InvalidAuthorizationTokenException, RemoteException, InvalidTokenException
SecurityServer
findPrincipalByToken
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.key
- The principal's token.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.RemoteException
- An unknown remote exception occurred.InvalidTokenException
- Unable to find the specified token.@Transactional public void updatePrincipalAttribute(AuthenticatedToken applicationToken, String name, SOAPAttribute attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
addAttributeToPrincipal
updatePrincipalAttribute
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the principal.attribute
- The name of the attribute to update.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- Unable to find the specified principal.@Transactional public void updateGroupAttribute(AuthenticatedToken applicationToken, String group, SOAPAttribute attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
addAttributeToGroup
updateGroupAttribute
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.group
- The name of the group.attribute
- The name of the attribute to update.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- Unable to find the specified group.public SOAPPrincipal findPrincipalByName(AuthenticatedToken applicationToken, String name) throws RemoteException, InvalidAuthorizationTokenException, ObjectNotFoundException
SecurityServer
findPrincipalByName
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the principal.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ObjectNotFoundException
- Unable to find the specified principal.public SOAPPrincipal findPrincipalWithAttributesByName(AuthenticatedToken applicationToken, String name) throws RemoteException, InvalidAuthorizationTokenException, ObjectNotFoundException
SecurityServer
findPrincipalWithAttributesByName
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.name
- The name of the principal.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ObjectNotFoundException
- Unable to find the specified principal.public void addAllPrincipals(AuthenticatedToken applicationToken, SOAPPrincipalWithCredential[] principals) throws InvalidAuthorizationTokenException, RemoteException, ApplicationPermissionException, BulkAddFailedException
SecurityServer
addAllPrincipals
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principals
- Array of SOAPPrincipalWithCredentialInvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.RemoteException
- An unknown remote exception occurred.ApplicationPermissionException
- thrown when no Create User Permission for any of the directories.BulkAddFailedException
- throw when it failed to create a user in of the directories.@Transactional public SOAPPrincipal addPrincipal(AuthenticatedToken applicationToken, SOAPPrincipal principal, PasswordCredential credential) throws InvalidAuthorizationTokenException, RemoteException, InvalidCredentialException, ApplicationPermissionException, InvalidUserException
SecurityServer
addPrincipal
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The populated principal object to added.credential
- The password for the principal.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.RemoteException
- An unknown remote exception occurred.InvalidCredentialException
- The supplied password is invalid.ApplicationPermissionException
- The application does not have the proper permissions to add the entity to the directory server.InvalidUserException
- The supplied principal is invalid.public void addPrincipalToGroup(AuthenticatedToken applicationToken, String principal, String group) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
addPrincipalToGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.group
- The name of the group.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- the user or group could not be foundpublic void updatePrincipalCredential(AuthenticatedToken applicationToken, String principal, PasswordCredential credential) throws RemoteException, InvalidAuthorizationTokenException, InvalidCredentialException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
updatePrincipalCredential
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.credential
- The password.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.InvalidCredentialException
- The supplied password is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- Unable to find the specified principal.@Transactional public void resetPrincipalCredential(AuthenticatedToken applicationToken, String principal) throws RemoteException, InvalidEmailAddressException, InvalidAuthorizationTokenException, InvalidCredentialException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
resetPrincipalCredential
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.RemoteException
- An unknown remote exception occurred.InvalidEmailAddressException
- invalid email addressInvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.InvalidCredentialException
- Unable to reset the principal's password.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- Unable to find the specified principal.public void removeGroup(AuthenticatedToken applicationToken, String group) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removeGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.group
- The name of the group.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- Unable to find the specified group.public void removeRole(AuthenticatedToken applicationToken, String role) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removeRole
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.role
- The name of the role.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- The specified role is invalid.public void removePrincipal(AuthenticatedToken applicationToken, String principal) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removePrincipal
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- The specified principal is invalid.public void addPrincipalToRole(AuthenticatedToken applicationToken, String principal, String role) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
addPrincipalToRole
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.role
- The name of the role.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity to the directory server.ObjectNotFoundException
- Unable to get user the specified user or group (of type Role) by namepublic boolean isGroupMember(AuthenticatedToken applicationToken, String group, String principal) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
isGroupMember
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.group
- The name of the group.principal
- The name of the principal.true
if and only if the principal is a group member, otherwise false
.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public boolean isRoleMember(AuthenticatedToken applicationToken, String role, String principal) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
isRoleMember
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.role
- The name of the role.principal
- The name of the principal.true
if and only if the principal is a role member, otherwise false
.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public void removePrincipalFromGroup(AuthenticatedToken applicationToken, String principal, String group) throws InvalidAuthorizationTokenException, RemoteException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removePrincipalFromGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.group
- The name of the group.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.RemoteException
- An unknown remote exception occurred.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- if the user, group or membership could not be foundpublic void removePrincipalFromRole(AuthenticatedToken applicationToken, String principal, String role) throws InvalidAuthorizationTokenException, RemoteException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removePrincipalFromRole
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.role
- The name of the role.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.RemoteException
- An unknown remote exception occurred.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- if the specified user, group (of type Role) or membership could not be found@Transactional public void addAttributeToPrincipal(AuthenticatedToken applicationToken, String principal, SOAPAttribute attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
updatePrincipalAttribute
addAttributeToPrincipal
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.attribute
- The name attribute to add.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- The specified principal is invalid.@Transactional public void addAttributeToGroup(AuthenticatedToken applicationToken, String group, SOAPAttribute attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
updateGroupAttribute
addAttributeToGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.group
- The name of the group.attribute
- The name attribute to add.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to update the entity in the directory server.ObjectNotFoundException
- if the specified group is invalid.public void removeAttributeFromPrincipal(AuthenticatedToken applicationToken, String principal, String attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removeAttributeFromPrincipal
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principal
- The name of the principal.attribute
- The name of the attribute.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- The specified principal is invalid.@Transactional public void removeAttributeFromGroup(AuthenticatedToken applicationToken, String group, String attribute) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, ObjectNotFoundException
SecurityServer
removeAttributeFromGroup
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.group
- The name of the group.attribute
- The name of the attribute.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.ApplicationPermissionException
- The application does not have the proper permissions to remove the entity from the directory server.ObjectNotFoundException
- The specified group is not found.public long getCacheTime(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
getCacheTime
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public boolean isCacheEnabled(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
isCacheEnabled
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.true
if and only if the cache is enabled, otherwise false
.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String getDomain(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
getDomain
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] findAllPrincipalNames(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findAllPrincipalNames
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] findAllGroupNames(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findAllGroupNames
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.String
listing of the group names.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.@Transactional public SOAPNestableGroup[] findAllGroupRelationships(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findAllGroupRelationships
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.SOAPNestableGroup
listing of the groups, plus any direct sub-groups.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] findAllRoleNames(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findAllRoleNames
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.String
listing of the role names.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] findGroupMemberships(AuthenticatedToken applicationToken, String principalName) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findGroupMemberships
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principalName
- The name of the principal to use when performing the lookup.String
listing of the principal's group memberships.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] findRoleMemberships(AuthenticatedToken applicationToken, String principalName) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
findRoleMemberships
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.principalName
- The name of the principal to use role performing the lookup.String
listing of the principal's group memberships.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public String[] getGrantedAuthorities(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
SecurityServer
getGrantedAuthorities
in interface SecurityServer
applicationToken
- The application's authentication token. Obtained from the authenticateApplication
method.RemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.public SOAPCookieInfo getCookieInfo(AuthenticatedToken applicationToken) throws RemoteException, InvalidAuthorizationTokenException
getCookieInfo
in interface SecurityServer
applicationToken
- application tokenRemoteException
- An unknown remote exception occurred.InvalidAuthorizationTokenException
- The calling application's applicationToken
is invalid.Copyright © 2021 Atlassian. All rights reserved.