Interface OpenMetadataElementSecurity
- All Known Implementing Classes:
- OpenMetadataAccessSecurityConnector,- OpenMetadataServerSecurityVerifier
public interface OpenMetadataElementSecurity
Provides the API for a security connector that implements security rules based on the elements being accessed.
- 
Method SummaryModifier and TypeMethodDescriptionselectConnection(String userId, EntityDetail assetEntity, List<EntityDetail> connectionEntities, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Use the security connector to make a choice on which connection to supply to the requesting user.voidvalidateUserForAnchorAddFeedback(String userId, EntityDetail anchorEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the anchor or member element.voidvalidateUserForAnchorAttach(String userId, EntityDetail anchorEntity, EntityDetail attachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to link unanchored elementsvoidvalidateUserForAnchorClassify(String userId, EntityDetail anchorEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to add or update a classification on this anchor or member element.voidvalidateUserForAnchorDeclassify(String userId, EntityDetail anchorEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to remove a classification from this anchor or member elementvoidvalidateUserForAnchorDeleteFeedback(String userId, EntityDetail anchorEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to detach feedback - such as comments, ratings, tags and likes, to the anchor or member element.voidvalidateUserForAnchorDetach(String userId, EntityDetail anchorEntity, EntityDetail detachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to link unanchored elementsvoidvalidateUserForAnchorMemberAdd(String userId, EntityDetail anchorEntity, EntityDetail newMemberEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the element.voidvalidateUserForAnchorMemberDelete(String userId, EntityDetail anchorEntity, EntityDetail obsoleteEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to delete an element and all of its contents.voidvalidateUserForAnchorMemberRead(String userId, EntityDetail anchorEntity, EntityDetail requestedEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have read access to a specific element and its contents.voidvalidateUserForAnchorMemberStatusUpdate(String userId, EntityDetail anchorEntity, EntityDetail originalEntity, InstanceStatus newStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to update the instance status of an element.voidvalidateUserForAnchorMemberUpdate(String userId, EntityDetail anchorEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to update elements attached directly to an anchor such as glossary terms and categories attached to an element.voidvalidateUserForElementAddFeedback(String userId, EntityDetail originalEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the element.voidvalidateUserForElementAttach(String userId, EntityDetail startingEntity, EntityDetail attachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to link unanchored elements to this elementvoidvalidateUserForElementClassify(String userId, EntityDetail originalEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to add or update a classification on this element.voidvalidateUserForElementCreate(String userId, String entityTypeGUID, String entityTypeName, InstanceProperties newProperties, List<Classification> classifications, InstanceStatus instanceStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to create an element.voidvalidateUserForElementDeclassify(String userId, EntityDetail originalEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to remove a classification from this elementvoidvalidateUserForElementDelete(String userId, EntityDetail entity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to delete an element and all of its contents.voidvalidateUserForElementDeleteFeedback(String userId, EntityDetail originalEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to detach feedback - such as comments, ratings, tags and likes, to the element.voidvalidateUserForElementDetach(String userId, EntityDetail startingEntity, EntityDetail detachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to link unanchored elements to this elementvoidvalidateUserForElementDetailUpdate(String userId, EntityDetail originalEntity, InstanceProperties newEntityProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to update the properties of an element.voidvalidateUserForElementRead(String userId, EntityDetail requestedEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have read access to a specific element and its contents.voidvalidateUserForElementStatusUpdate(String userId, EntityDetail originalEntity, InstanceStatus newStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Tests for whether a specific user should have the right to update the properties of an element.
- 
Method Details- 
validateUserForElementCreatevoid validateUserForElementCreate(String userId, String entityTypeGUID, String entityTypeName, InstanceProperties newProperties, List<Classification> classifications, InstanceStatus instanceStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Tests for whether a specific user should have the right to create an element.- Parameters:
- userId- identifier of user
- entityTypeGUID- unique identifier of the type of entity to create
- entityTypeName- unique name of the type of entity to create
- newProperties- properties for new entity
- classifications- classifications for new entity
- instanceStatus- status for new entity
- repositoryHelper- manipulates repository service objects
- serviceName- calling service
- methodName- calling method
- Throws:
- InvalidParameterException- one of the parameters is null or invalid.
- PropertyServerException- there is a problem retrieving information from the property server(s).
- UserNotAuthorizedException- the requesting user is not authorized to issue this request.
 
- 
validateUserForElementReadvoid validateUserForElementRead(String userId, EntityDetail requestedEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException, InvalidParameterException, PropertyServerException Tests for whether a specific user should have read access to a specific element and its contents.- Parameters:
- userId- calling user
- requestedEntity- entity requested by the caller
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- InvalidParameterException- one of the parameters is null or invalid.
- PropertyServerException- there is a problem retrieving information from the property server(s).
- UserNotAuthorizedException- the requesting user is not authorized to issue this request.
 
- 
validateUserForElementDetailUpdatevoid validateUserForElementDetailUpdate(String userId, EntityDetail originalEntity, InstanceProperties newEntityProperties, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update the properties of an element.- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- newEntityProperties- new properties
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementStatusUpdatevoid validateUserForElementStatusUpdate(String userId, EntityDetail originalEntity, InstanceStatus newStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update the properties of an element.- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- newStatus- new value for status
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementAttachvoid validateUserForElementAttach(String userId, EntityDetail startingEntity, EntityDetail attachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to link unanchored elements to this element- Parameters:
- userId- identifier of user
- startingEntity- end 1 details
- attachingEntity- end 1 details
- relationshipName- name of the relationship
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementDetachvoid validateUserForElementDetach(String userId, EntityDetail startingEntity, EntityDetail detachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to link unanchored elements to this element- Parameters:
- userId- identifier of user
- startingEntity- end 1 details
- detachingEntity- end 2 details
- relationshipName- name of the relationship
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementAddFeedbackvoid validateUserForElementAddFeedback(String userId, EntityDetail originalEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the element.- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- feedbackEntity- feedback element
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementDeleteFeedbackvoid validateUserForElementDeleteFeedback(String userId, EntityDetail originalEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to detach feedback - such as comments, ratings, tags and likes, to the element.- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- feedbackEntity- feedback element
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementClassifyvoid validateUserForElementClassify(String userId, EntityDetail originalEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to add or update a classification on this element.- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- classificationName- name of the classification
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementDeclassifyvoid validateUserForElementDeclassify(String userId, EntityDetail originalEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to remove a classification from this element- Parameters:
- userId- identifier of user
- originalEntity- original entity details
- classificationName- name of the classification
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForElementDeletevoid validateUserForElementDelete(String userId, EntityDetail entity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an element and all of its contents.- Parameters:
- userId- identifier of user
- entity- original element details
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorMemberAddvoid validateUserForAnchorMemberAdd(String userId, EntityDetail anchorEntity, EntityDetail newMemberEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the element.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- newMemberEntity- feedback element
- relationshipName- name of the relationship
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorMemberReadvoid validateUserForAnchorMemberRead(String userId, EntityDetail anchorEntity, EntityDetail requestedEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific element and its contents.- Parameters:
- userId- calling user
- anchorEntity- entity for the anchor (if extracted - may be null)
- requestedEntity- entity requested by the caller
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- user not authorized to issue this request
 
- 
validateUserForAnchorMemberUpdatevoid validateUserForAnchorMemberUpdate(String userId, EntityDetail anchorEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update elements attached directly to an anchor such as glossary terms and categories attached to an element. These updates could be to their properties, classifications and relationships.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorMemberStatusUpdatevoid validateUserForAnchorMemberStatusUpdate(String userId, EntityDetail anchorEntity, EntityDetail originalEntity, InstanceStatus newStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update the instance status of an element.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- originalEntity- entity being updated
- newStatus- new value for status
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorAttachvoid validateUserForAnchorAttach(String userId, EntityDetail anchorEntity, EntityDetail attachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to link unanchored elements- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- attachingEntity- new element
- relationshipName- name of the relationship
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorDetachvoid validateUserForAnchorDetach(String userId, EntityDetail anchorEntity, EntityDetail detachingEntity, String relationshipName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to link unanchored elements- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- detachingEntity- obsolete element
- relationshipName- name of the relationship
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorAddFeedbackvoid validateUserForAnchorAddFeedback(String userId, EntityDetail anchorEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to attach feedback - such as comments, ratings, tags and likes, to the anchor or member element.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- feedbackEntity- feedback element
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorDeleteFeedbackvoid validateUserForAnchorDeleteFeedback(String userId, EntityDetail anchorEntity, EntityDetail feedbackEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to detach feedback - such as comments, ratings, tags and likes, to the anchor or member element.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- feedbackEntity- feedback element
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorClassifyvoid validateUserForAnchorClassify(String userId, EntityDetail anchorEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to add or update a classification on this anchor or member element.- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- classificationName- name of the classification
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorDeclassifyvoid validateUserForAnchorDeclassify(String userId, EntityDetail anchorEntity, String classificationName, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to remove a classification from this anchor or member element- Parameters:
- userId- identifier of user
- anchorEntity- anchor details
- classificationName- name of the classification
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
validateUserForAnchorMemberDeletevoid validateUserForAnchorMemberDelete(String userId, EntityDetail anchorEntity, EntityDetail obsoleteEntity, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an element and all of its contents.- Parameters:
- userId- identifier of user
- obsoleteEntity- original element details
- repositoryHelper- helper for OMRS objects
- serviceName- calling service
- methodName- calling method
- Throws:
- UserNotAuthorizedException- the user is not authorized to change this element
 
- 
selectConnectionEntityDetail selectConnection(String userId, EntityDetail assetEntity, List<EntityDetail> connectionEntities, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Use the security connector to make a choice on which connection to supply to the requesting user.- Parameters:
- userId- calling userId
- assetEntity- associated asset - may be null
- connectionEntities- list of retrieved connections
- repositoryHelper- for working with OMRS objects
- serviceName- calling service
- methodName- calling method
- Returns:
- single connection entity, or null
- Throws:
- UserNotAuthorizedException- the user is not able to use any of the connections
 
 
-