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 Summary
Modifier 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.void
validateUserForAnchorAddFeedback
(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.void
validateUserForAnchorAttach
(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 elementsvoid
validateUserForAnchorClassify
(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.void
validateUserForAnchorDeclassify
(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 elementvoid
validateUserForAnchorDeleteFeedback
(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.void
validateUserForAnchorDetach
(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 elementsvoid
validateUserForAnchorMemberAdd
(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.void
validateUserForAnchorMemberDelete
(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.void
validateUserForAnchorMemberRead
(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.void
validateUserForAnchorMemberStatusUpdate
(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.void
validateUserForAnchorMemberUpdate
(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.void
validateUserForElementAddFeedback
(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.void
validateUserForElementAttach
(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 elementvoid
validateUserForElementClassify
(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.void
validateUserForElementCreate
(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.void
validateUserForElementDeclassify
(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 elementvoid
validateUserForElementDelete
(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.void
validateUserForElementDeleteFeedback
(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.void
validateUserForElementDetach
(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 elementvoid
validateUserForElementDetailUpdate
(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.void
validateUserForElementRead
(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.void
validateUserForElementStatusUpdate
(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
-
validateUserForElementCreate
void validateUserForElementCreate(String userId, String entityTypeGUID, String entityTypeName, InstanceProperties newProperties, List<Classification> classifications, InstanceStatus instanceStatus, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create an element.- Parameters:
userId
- identifier of userentityTypeGUID
- unique identifier of the type of entity to createentityTypeName
- unique name of the type of entity to createnewProperties
- properties for new entityclassifications
- classifications for new entityinstanceStatus
- status for new entityrepositoryHelper
- manipulates repository service objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to perform this command
-
validateUserForElementRead
void validateUserForElementRead(String userId, 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 userrequestedEntity
- entity requested by the callerrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- user not authorized to issue this request
-
validateUserForElementDetailUpdate
void 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 useroriginalEntity
- original entity detailsnewEntityProperties
- new propertiesrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementStatusUpdate
void 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 useroriginalEntity
- original entity detailsnewStatus
- new value for statusrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementAttach
void 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 userstartingEntity
- end 1 detailsattachingEntity
- end 1 detailsrelationshipName
- name of the relationshiprepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementDetach
void 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 userstartingEntity
- end 1 detailsdetachingEntity
- end 2 detailsrelationshipName
- name of the relationshiprepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementAddFeedback
void 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 useroriginalEntity
- original entity detailsfeedbackEntity
- feedback elementrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementDeleteFeedback
void 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 useroriginalEntity
- original entity detailsfeedbackEntity
- feedback elementrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementClassify
void 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 useroriginalEntity
- original entity detailsclassificationName
- name of the classificationrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementDeclassify
void 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 useroriginalEntity
- original entity detailsclassificationName
- name of the classificationrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForElementDelete
void 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 userentity
- original element detailsrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorMemberAdd
void 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 useranchorEntity
- anchor detailsnewMemberEntity
- feedback elementrelationshipName
- name of the relationshiprepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorMemberRead
void 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 useranchorEntity
- entity for the anchor (if extracted - may be null)requestedEntity
- entity requested by the callerrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- user not authorized to issue this request
-
validateUserForAnchorMemberUpdate
void 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 useranchorEntity
- anchor detailsrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorMemberStatusUpdate
void 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 useranchorEntity
- anchor detailsoriginalEntity
- entity being updatednewStatus
- new value for statusrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorAttach
void 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 useranchorEntity
- anchor detailsattachingEntity
- new elementrelationshipName
- name of the relationshiprepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorDetach
void 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 useranchorEntity
- anchor detailsdetachingEntity
- obsolete elementrelationshipName
- name of the relationshiprepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorAddFeedback
void 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 useranchorEntity
- anchor detailsfeedbackEntity
- feedback elementrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorDeleteFeedback
void 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 useranchorEntity
- anchor detailsfeedbackEntity
- feedback elementrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorClassify
void 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 useranchorEntity
- anchor detailsclassificationName
- name of the classificationrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorDeclassify
void 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 useranchorEntity
- anchor detailsclassificationName
- name of the classificationrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorMemberDelete
void 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 userobsoleteEntity
- original element detailsrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
selectConnection
EntityDetail 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 userIdassetEntity
- associated asset - may be nullconnectionEntities
- list of retrieved connectionsrepositoryHelper
- for working with OMRS objectsserviceName
- calling servicemethodName
- calling method- Returns:
- single connection entity, or null
- Throws:
UserNotAuthorizedException
- the user is not able to use any of the connections
-