Class SecurityManagerRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.securitymanager.server.SecurityManagerRESTServices
The SecurityManagerRESTServices provides the server-side implementation of the services
that are generic for all types of security managers.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddIdentityToProfile
(String serverName, String userId, String userIdentityGUID, String profileGUID, ExternalSourceRequestBody requestBody) Link a user identity to a profile.createSecurityGroup
(String serverName, String userId, SecurityGroupProperties requestBody) Create a new security group.createSecurityManagerInCatalog
(String serverName, String userId, SecurityManagerRequestBody requestBody) Files live on a file system.createUserIdentity
(String serverName, String userId, UserIdentityRequestBody requestBody) Create a UserIdentity.deleteSecurityGroup
(String serverName, String userId, String securityGroupGUID, NullRequestBody requestBody) Delete a specific security group.deleteUserIdentity
(String serverName, String userId, String userIdentityGUID, ExternalSourceRequestBody requestBody) Remove a user identity object.findActorProfile
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching profiles for the search string.findPersonRole
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching roles for the search string.findSecurityGroups
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Return the list of security groups that match the search string - this can be a regular expression.findUserIdentities
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of user identity metadata elements that contain the search string.getActorProfileByGUID
(String serverName, String userId, String actorProfileGUID) Return information about a specific actor profile.getActorProfileByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named actor profile.getActorProfileByUserId
(String serverName, String userId, String actorProfileUserId) Return information about a specific actor profile.getAppointees
(String serverName, String userId, String personRoleGUID, int startFrom, int pageSize, EffectiveTimeRequestBody requestBody) Return the list of people appointed to a particular role.getElementsGovernedBySecurityGroup
(String serverName, String userId, String securityGroupGUID, int startFrom, int pageSize) Return the elements that are governed by the supplied security group.getMetadataSourceGUID
(String serverName, String userId, String qualifiedName) Retrieve the unique identifier of the integration daemon service.getOutTopicConnection
(String serverName, String userId, String callerId) Return the connection object for the Security Manager OMAS's out topic.getPersonRoleByGUID
(String serverName, String userId, String personRoleGUID) Return information about a specific person role.getPersonRoleByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named person role.getSecurityGroupByGUID
(String serverName, String userId, String securityGroupGUID) Return information about a specific actor profile.getSecurityGroupsForDistinguishedName
(String serverName, String userId, String distinguishedName, int startFrom, int pageSize) Return the list of security groups associated with a unique distinguishedName.getUserIdentitiesByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of user identity metadata elements with a matching qualified name.getUserIdentityByGUID
(String serverName, String userId, String userIdentityGUID) Retrieve the userIdentity metadata element with the supplied unique identifier.removeIdentityFromProfile
(String serverName, String userId, String userIdentityGUID, String profileGUID, ExternalSourceRequestBody requestBody) Remove a user identity object.updateSecurityGroup
(String serverName, String userId, String securityGroupGUID, boolean isMergeUpdate, SecurityGroupProperties requestBody) Update an existing security group.updateUserIdentity
(String serverName, String userId, String userIdentityGUID, boolean isMergeUpdate, UserIdentityRequestBody requestBody) Update a UserIdentity.
-
Constructor Details
-
SecurityManagerRESTServices
public SecurityManagerRESTServices()Default constructor
-
-
Method Details
-
getOutTopicConnection
public OCFConnectionResponse getOutTopicConnection(String serverName, String userId, String callerId) Return the connection object for the Security Manager OMAS's out topic.- Parameters:
serverName
- name of the service to route the request to.userId
- identifier of calling user.callerId
- unique identifier of the caller- Returns:
- connection object for the out topic or InvalidParameterException one of the parameters is null or invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem retrieving the discovery engine definition.
-
createSecurityManagerInCatalog
public GUIDResponse createSecurityManagerInCatalog(String serverName, String userId, SecurityManagerRequestBody requestBody) Files live on a file system. This method creates a top level capability for a file system.- Parameters:
serverName
- name of calling serveruserId
- calling userrequestBody
- properties of the file system- Returns:
- unique identifier for the file system or InvalidParameterException one of the parameters is null or invalid or PropertyServerException problem accessing property server or UserNotAuthorizedException security access problem
-
getMetadataSourceGUID
Retrieve the unique identifier of the integration daemon service.- Parameters:
serverName
- name of the server to route the request to.userId
- calling userqualifiedName
- unique name of the integration daemon- Returns:
- unique identifier of the integration daemon's software server capability or InvalidParameterException the bean properties are invalid or UserNotAuthorizedException user not authorized to issue this request or PropertyServerException problem accessing the property server
-
createSecurityGroup
public GUIDResponse createSecurityGroup(String serverName, String userId, SecurityGroupProperties requestBody) Create a new security group. The type of the definition is located in the requestBody.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- requestBody of the definition- Returns:
- unique identifier of the definition or InvalidParameterException typeName, documentIdentifier or userId is null; documentIdentifier is not unique; typeName is not valid PropertyServerException problem accessing the metadata service UserNotAuthorizedException security access problem
-
updateSecurityGroup
public VoidResponse updateSecurityGroup(String serverName, String userId, String securityGroupGUID, boolean isMergeUpdate, SecurityGroupProperties requestBody) Update an existing security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique identifier of the definition to updateisMergeUpdate
- are unspecified properties unchanged (true) or removed?requestBody
- properties to update- Returns:
- void or InvalidParameterException guid, documentIdentifier or userId is null; documentIdentifier is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deleteSecurityGroup
public VoidResponse deleteSecurityGroup(String serverName, String userId, String securityGroupGUID, NullRequestBody requestBody) Delete a specific security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique identifier of the definition to removerequestBody
- null request body- Returns:
- void or InvalidParameterException guid is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getSecurityGroupsForDistinguishedName
public SecurityGroupsResponse getSecurityGroupsForDistinguishedName(String serverName, String userId, String distinguishedName, int startFrom, int pageSize) Return the list of security groups associated with a unique distinguishedName. In an ideal world, there should be only one.- Parameters:
serverName
- called serveruserId
- calling userdistinguishedName
- unique name of the security groupstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- list of security groups or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
-
getElementsGovernedBySecurityGroup
public ElementStubsResponse getElementsGovernedBySecurityGroup(String serverName, String userId, String securityGroupGUID, int startFrom, int pageSize) Return the elements that are governed by the supplied security group.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique name of the security groupstartFrom
- where to start from in the list of definitionspageSize
- max number of results to return in one call- Returns:
- list of headers for the associated elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
-
findSecurityGroups
public SecurityGroupsResponse findSecurityGroups(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Return the list of security groups that match the search string - this can be a regular expression.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- value to search forstartFrom
- where to start from in the list of definition resultspageSize
- max number of results to return in one call- Returns:
- list of security groups or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the caller is not authorized to issue the request PropertyServerException the metadata service has problems
-
getSecurityGroupByGUID
public SecurityGroupResponse getSecurityGroupByGUID(String serverName, String userId, String securityGroupGUID) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling usersecurityGroupGUID
- unique identifier for the actor profile- Returns:
- properties of the actor profile InvalidParameterException securityGroupGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
createUserIdentity
public GUIDResponse createUserIdentity(String serverName, String userId, UserIdentityRequestBody requestBody) Create a UserIdentity. This is not connected to a profile.- Parameters:
serverName
- name of target serveruserId
- the name of the calling userrequestBody
- userId for the new userIdentity- Returns:
- void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
-
updateUserIdentity
public VoidResponse updateUserIdentity(String serverName, String userId, String userIdentityGUID, boolean isMergeUpdate, UserIdentityRequestBody requestBody) Update a UserIdentity.- Parameters:
serverName
- name of target serveruserId
- the name of the calling useruserIdentityGUID
- unique identifier of the UserIdentityisMergeUpdate
- should the supplied properties be overlaid on the existing properties (true) or replace them (falserequestBody
- updated properties for the new userIdentity- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteUserIdentity
public VoidResponse deleteUserIdentity(String serverName, String userId, String userIdentityGUID, ExternalSourceRequestBody requestBody) Remove a user identity object.- Parameters:
serverName
- name of target serveruserId
- the name of the calling user.userIdentityGUID
- unique identifier of the UserIdentityrequestBody
- external source identifiers- Returns:
- void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
-
addIdentityToProfile
public VoidResponse addIdentityToProfile(String serverName, String userId, String userIdentityGUID, String profileGUID, ExternalSourceRequestBody requestBody) Link a user identity to a profile.- Parameters:
serverName
- name of target serveruserId
- the name of the calling user.userIdentityGUID
- unique identifier of the UserIdentityprofileGUID
- the profile to add the identity to.requestBody
- external source identifiers- Returns:
- void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
-
removeIdentityFromProfile
public VoidResponse removeIdentityFromProfile(String serverName, String userId, String userIdentityGUID, String profileGUID, ExternalSourceRequestBody requestBody) Remove a user identity object.- Parameters:
serverName
- name of target serveruserId
- the name of the calling user.userIdentityGUID
- unique identifier of the UserIdentityprofileGUID
- profile to remove it from.requestBody
- external source identifiers- Returns:
- void or InvalidParameterException - one of the parameters is invalid or PropertyServerException - there is a problem retrieving information from the property server(s) or UserNotAuthorizedException - the requesting user is not authorized to issue this request.
-
findUserIdentities
public UserIdentitiesResponse findUserIdentities(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of user identity metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
serverName
- name of target serveruserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getUserIdentitiesByName
public UserIdentitiesResponse getUserIdentitiesByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Retrieve the list of user identity metadata elements with a matching qualified name. There are no wildcards supported on this request.- Parameters:
serverName
- name of target serveruserId
- calling userstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- name to search for- Returns:
- list of matching metadata elements InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getUserIdentityByGUID
public UserIdentityResponse getUserIdentityByGUID(String serverName, String userId, String userIdentityGUID) Retrieve the userIdentity metadata element with the supplied unique identifier.- Parameters:
serverName
- name of target serveruserId
- calling useruserIdentityGUID
- unique identifier of the requested metadata element- Returns:
- matching metadata element or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getActorProfileByGUID
public ActorProfileResponse getActorProfileByGUID(String serverName, String userId, String actorProfileGUID) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileGUID
- unique identifier for the actor profile- Returns:
- properties of the actor profile InvalidParameterException actorProfileGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfileByUserId
public ActorProfileResponse getActorProfileByUserId(String serverName, String userId, String actorProfileUserId) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileUserId
- unique identifier for the actor profile- Returns:
- properties of the actor profile InvalidParameterException actorProfileUserId or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfileByName
public ActorProfilesResponse getActorProfileByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named actor profile.- Parameters:
serverName
- called serveruserId
- calling userstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- unique name for the actor profile- Returns:
- list of matching actor profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
findActorProfile
public ActorProfilesResponse findActorProfile(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching profiles for the search string.- Parameters:
serverName
- called serveruserId
- the name of the calling user.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- RegEx string to search for- Returns:
- list of matching actor profiles InvalidParameterException guid invalid or the external references are not correctly specified, or are null. PropertyServerException the server is not available. UserNotAuthorizedException the calling user is not authorized to issue the call.
-
getAppointees
public AppointeesResponse getAppointees(String serverName, String userId, String personRoleGUID, int startFrom, int pageSize, EffectiveTimeRequestBody requestBody) Return the list of people appointed to a particular role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier of the person rolestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to returnrequestBody
- time for appointments, null for full appointment history- Returns:
- list of appointees or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getPersonRoleByGUID
public PersonRoleResponse getPersonRoleByGUID(String serverName, String userId, String personRoleGUID) Return information about a specific person role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier for the person role- Returns:
- properties of the person role InvalidParameterException personRoleGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getPersonRoleByName
public PersonRolesResponse getPersonRoleByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named person role.- Parameters:
serverName
- called serveruserId
- calling userstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- unique name for the actor profile- Returns:
- list of matching actor profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
findPersonRole
public PersonRolesResponse findPersonRole(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching roles for the search string.- Parameters:
serverName
- called serveruserId
- the name of the calling user.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- RegEx string to search for- Returns:
- list of matching actor profiles InvalidParameterException guid invalid or the external references are not correctly specified, or are null. PropertyServerException the server is not available. UserNotAuthorizedException the calling user is not authorized to issue the call.
-