Interface SecurityTeamsManagerImplApi
- All Known Implementing Classes:
SecurityTeamsManagerImpl
public interface SecurityTeamsManagerImplApi
- Author:
- Ondrej Velisek invalid input: '<'ondrejvelisek@gmail.com>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addUserToBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user, String description) Blacklist user by given security team with optional reason in description.void
checkGroupIsNotSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, Group group) check if group is not security admin of given security team throw exception if it isvoid
checkGroupIsSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, Group group) check if group is security admin of given security team throw exception if is notvoid
checkSecurityTeamExists
(PerunSession sess, SecurityTeam securityTeam) check if security team exists throw exception if doesn'tvoid
checkSecurityTeamNotExists
(PerunSession sess, SecurityTeam securityTeam) check if security team does not exist throw exception if dovoid
checkSecurityTeamUniqueName
(PerunSession sess, SecurityTeam securityTeam) check if name is unique throw exception if it is notvoid
checkUserIsNotSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is not security admin or a member of authorized group of given security team throw exception if it isvoid
checkUserIsSecurityAdmin
(PerunSession sess, SecurityTeam securityTeam, User user) check if user is security admin or a member of authorized group of given security team throw exception if is notcreateSecurityTeam
(PerunSession sess, SecurityTeam securityTeam) Create security teamvoid
deleteSecurityTeam
(PerunSession sess, SecurityTeam securityTeam) Delete security teamgetAdminGroups
(PerunSession sess, SecurityTeam securityTeam) Gets list of all group administrators of the SecurityTeam.getAdmins
(PerunSession sess, SecurityTeam securityTeam) get all security admins of given security teamget all security teams in perun systemgetBlacklist
(PerunSession sess, List<SecurityTeam> securityTeams) get union of blacklists of security teamsgetBlacklistWithDescription
(PerunSession sess, List<SecurityTeam> securityTeams) get union of blacklists of security teams containing also descriptiongetDirectAdmins
(PerunSession perunSession, SecurityTeam securityTeam) Gets list of direct user administrators of the securityTeam.getSecurityTeamById
(PerunSession sess, int id) get security team by its idgetSecurityTeamByName
(PerunSession sess, String name) get security team by its nameboolean
isUserBlacklisted
(PerunSession sess, SecurityTeam securityTeam, User user) Check if user is blacklisted by given security teamboolean
isUserBlacklisted
(PerunSession sess, User user) Check if user is blacklisted by any security teamvoid
removeUserFromAllBlacklists
(PerunSession sess, User user) Remove user from all blacklistsvoid
removeUserFromBlacklist
(PerunSession sess, SecurityTeam securityTeam, User user) remove user from blacklist of given security teamupdateSecurityTeam
(PerunSession sess, SecurityTeam securityTeam) Update security team
-
Method Details
-
addUserToBlacklist
void addUserToBlacklist(PerunSession sess, SecurityTeam securityTeam, User user, String description) Blacklist user by given security team with optional reason in description.Description can be null.
- Parameters:
sess
-securityTeam
-user
-description
-- Throws:
InternalErrorException
-
checkGroupIsNotSecurityAdmin
void checkGroupIsNotSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws AlreadyAdminException check if group is not security admin of given security team throw exception if it is- Parameters:
sess
-securityTeam
-group
-- Throws:
AlreadyAdminException
InternalErrorException
-
checkGroupIsSecurityAdmin
void checkGroupIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, Group group) throws GroupNotAdminException check if group is security admin of given security team throw exception if is not- Parameters:
sess
-securityTeam
-group
-- Throws:
GroupNotAdminException
InternalErrorException
-
checkSecurityTeamExists
void checkSecurityTeamExists(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamNotExistsException check if security team exists throw exception if doesn't- Parameters:
sess
-securityTeam
-- Throws:
SecurityTeamNotExistsException
InternalErrorException
-
checkSecurityTeamNotExists
void checkSecurityTeamNotExists(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamExistsException check if security team does not exist throw exception if do- Parameters:
sess
-securityTeam
-- Throws:
SecurityTeamExistsException
InternalErrorException
-
checkSecurityTeamUniqueName
void checkSecurityTeamUniqueName(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamExistsException check if name is unique throw exception if it is not- Parameters:
sess
-securityTeam
-- Throws:
InternalErrorException
SecurityTeamExistsException
-
checkUserIsNotSecurityAdmin
void checkUserIsNotSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, User user) throws AlreadyAdminException check if user is not security admin or a member of authorized group of given security team throw exception if it is- Parameters:
sess
-securityTeam
-user
-- Throws:
AlreadyAdminException
InternalErrorException
-
checkUserIsSecurityAdmin
void checkUserIsSecurityAdmin(PerunSession sess, SecurityTeam securityTeam, User user) throws UserNotAdminException check if user is security admin or a member of authorized group of given security team throw exception if is not- Parameters:
sess
-securityTeam
-user
-- Throws:
UserNotAdminException
InternalErrorException
-
createSecurityTeam
Create security team- Parameters:
sess
-securityTeam
-- Returns:
- Newly created Security team with new id
- Throws:
InternalErrorException
-
deleteSecurityTeam
void deleteSecurityTeam(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamNotExistsException Delete security team- Parameters:
sess
-securityTeam
-- Throws:
InternalErrorException
SecurityTeamNotExistsException
-
getAdminGroups
Gets list of all group administrators of the SecurityTeam.- Parameters:
sess
-SecurityTeam
-- Returns:
- list of groups who are admins in the SecurityTeam
- Throws:
InternalErrorException
-
getAdmins
get all security admins of given security team- Parameters:
sess
-securityTeam
-- Returns:
- list of users which are security admins in security team
- Throws:
InternalErrorException
-
getAllSecurityTeams
get all security teams in perun system- Parameters:
sess
-- Returns:
- list of all security teams
- Throws:
InternalErrorException
-
getBlacklist
get union of blacklists of security teams- Parameters:
sess
-securityTeams
-- Returns:
- list of blacklisted users for list of given security teams
- Throws:
InternalErrorException
-
getBlacklistWithDescription
List<Pair<User,String>> getBlacklistWithDescription(PerunSession sess, List<SecurityTeam> securityTeams) get union of blacklists of security teams containing also description- Parameters:
sess
-securityTeams
-- Returns:
- List of pairs of blacklisted users and description for list of given security teams
- Throws:
InternalErrorException
-
getDirectAdmins
Gets list of direct user administrators of the securityTeam. 'Direct' means, there aren't included users, who are members of group administrators, in the returned list.- Parameters:
perunSession
-securityTeam
-- Throws:
InternalErrorException
-
getSecurityTeamById
get security team by its id- Parameters:
sess
-id
-- Returns:
- security team with given id
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-
getSecurityTeamByName
SecurityTeam getSecurityTeamByName(PerunSession sess, String name) throws SecurityTeamNotExistsException get security team by its name- Parameters:
sess
-name
-- Returns:
- security team with given name
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-
isUserBlacklisted
Check if user is blacklisted by given security team- Parameters:
sess
-securityTeam
-user
-- Throws:
InternalErrorException
-
isUserBlacklisted
Check if user is blacklisted by any security team- Parameters:
sess
-user
-- Throws:
InternalErrorException
-
removeUserFromAllBlacklists
Remove user from all blacklists- Parameters:
sess
-user
-- Throws:
InternalErrorException
-
removeUserFromBlacklist
remove user from blacklist of given security team- Parameters:
sess
-securityTeam
-user
-- Throws:
InternalErrorException
-
updateSecurityTeam
SecurityTeam updateSecurityTeam(PerunSession sess, SecurityTeam securityTeam) throws SecurityTeamNotExistsException Update security team- Parameters:
sess
-securityTeam
-- Returns:
- updated security team
- Throws:
InternalErrorException
SecurityTeamNotExistsException
-