Class OpenMetadataAccessSecurityConnector
java.lang.Object
org.odpi.openmetadata.frameworks.connectors.Connector
org.odpi.openmetadata.frameworks.connectors.ConnectorBase
org.odpi.openmetadata.metadatasecurity.connectors.OpenMetadataSecurityConnector
org.odpi.openmetadata.metadatasecurity.accessconnector.OpenMetadataAccessSecurityConnector
- All Implemented Interfaces:
AuditLoggingComponent
,SecureConnectorExtension
,VirtualConnectorExtension
,OpenMetadataElementSecurity
,OpenMetadataPlatformSecurity
,OpenMetadataRepositorySecurity
,OpenMetadataServerSecurity
,OpenMetadataServiceSecurity
,OpenMetadataUserSecurity
public class OpenMetadataAccessSecurityConnector
extends OpenMetadataSecurityConnector
implements OpenMetadataPlatformSecurity, OpenMetadataRepositorySecurity, OpenMetadataServerSecurity, OpenMetadataServiceSecurity, OpenMetadataElementSecurity, OpenMetadataUserSecurity
OpenMetadataAccessSecurityConnector provides a specific security connector for Egeria's runtime
users that overrides the default behavior of the default open metadata security connectors that does
not allow any access to anything. It provides a demonstration of how to implement a security connector that uses
an external secrets store.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
ConnectorBase.ProtectedConnection
-
Field Summary
Fields inherited from class org.odpi.openmetadata.metadatasecurity.connectors.OpenMetadataSecurityConnector
connectorName, localServerUserId, serverName, serverRootURL, unknownTypeName
Fields inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
auditLog, connectedAssetProperties, connectionBean, connectionProperties, connectorInstanceId, embeddedConnectors, messageFormatter, secretsStoreConnectorMap
-
Constructor Summary
ConstructorDescriptionConstructor sets up the security policies -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkNameInGroup
(String name, NamedList list) This method performs the nested look up of a user's name in the groups.getUserAccount
(String userId) Retrieve information about a specific user.protected String
resolveElementGroupName
(String pattern, String qualifiedName, String operationName) Return a group name using a pattern.protected String
resolveOwnershipGroupName
(String pattern, List<Classification> classifications, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Return a group name using a pattern.protected String
resolveServerGroupName
(String pattern, String name) Return a group name using a pattern.protected String
resolveServerServiceOperationGroupName
(String pattern, String serverName, String serviceName, String operationName) Return a group name using a pattern.protected String
resolveServiceGroupName
(String pattern, String serviceName, String operationName) Return a group name using a pattern.selectConnection
(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.setSupportedZonesForUser
(List<String> supportedZones, String serviceName, String user) Determine the appropriate setting for the supported zones depending on the user and the default supported zones set up for the service.void
start()
Indicates that the connector is completely configured and can begin processing.protected boolean
validateClassificationAccess
(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, AccessOperation operation, String createdBy, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Determine whether the classifications provide access or restrict access to the elementboolean
validateEntityReferenceCopySave
(String userId, EntityDetail instance) Tests for whether a reference copy should be saved to the repository.boolean
validateRelationshipReferenceCopySave
(String userId, Relationship instance) Tests for whether a reference copy should be saved to the repository.protected boolean
validateSecurityTagAccess
(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, AccessOperation operation, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Determine whether the security tags provide access to the elementvoid
Check that the calling user is authorized to issue diagnostic requests to the OMAG Server Platform.void
Check that the calling user is authorized to issue operator requests to the OMAG Server Platform.void
validateUserAsServerAdmin
(String userId) Check that the calling user is authorized to update the configuration for a server.void
Check that the calling user is authorized to issue operator requests to the OMAG Server.void
validateUserAsServerOperator
(String userId) Check that the calling user is authorized to issue operator requests to the OMAG Server.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.void
validateUserForEntityClassificationAdd
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to add a classification to an entity instance within a repository.void
validateUserForEntityClassificationDelete
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName) Tests for whether a specific user should have the right to delete a classification from an entity instance within a repository.void
validateUserForEntityClassificationUpdate
(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) Tests for whether a specific user should have the right to update the classification for an entity instance within a repository.void
validateUserForEntityCreate
(String userId, String metadataCollectionName, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create an instance within a repository.void
validateUserForEntityDelete
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to delete an instance within a repository.void
validateUserForEntityProxyRead
(String userId, String metadataCollectionName, EntityProxy instance) Tests for whether a specific user should have read access to a specific instance within a repository.validateUserForEntityRead
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForEntityReHoming
(String userId, String metadataCollectionName, EntityDetail instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of an instance within a repository.void
validateUserForEntityReIdentification
(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) Tests for whether a specific user should have the right to change the guid on an instance within a repository.void
validateUserForEntityRestore
(String userId, String metadataCollectionName, String deletedEntityGUID) Tests for whether a specific user should have the right to restore an instance within a repository.void
validateUserForEntityReTyping
(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type name of an instance within a repository.void
validateUserForEntitySummaryRead
(String userId, String metadataCollectionName, EntitySummary instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForEntityUpdate
(String userId, String metadataCollectionName, EntityDetail instance) Tests for whether a specific user should have the right to update an instance within a repository.void
validateUserForNewServer
(String userId) Check that the calling user is authorized to create new servers.void
validateUserForRelationshipCreate
(String userId, String metadataCollectionName, String relationshipTypeGUID, InstanceProperties initialProperties, EntitySummary entityOneSummary, EntitySummary entityTwoSummary, InstanceStatus initialStatus) Tests for whether a specific user should have the right to create an instance within a repository.void
validateUserForRelationshipDelete
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to delete an instance within a repository.validateUserForRelationshipRead
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have read access to a specific instance within a repository.void
validateUserForRelationshipReHoming
(String userId, String metadataCollectionName, Relationship instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) Tests for whether a specific user should have the right to change the home of a instance within a repository.void
validateUserForRelationshipReIdentification
(String userId, String metadataCollectionName, Relationship instance, String newGUID) Tests for whether a specific user should have the right to change the guid on an instance within a repository.void
validateUserForRelationshipRestore
(String userId, String metadataCollectionName, String deletedRelationshipGUID) Tests for whether a specific user should have the right to restore an instance within a repository.void
validateUserForRelationshipReTyping
(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) Tests for whether a specific user should have the right to change the type name of an instance within a repository.void
validateUserForRelationshipUpdate
(String userId, String metadataCollectionName, Relationship instance) Tests for whether a specific user should have the right to update an instance within a repository.void
validateUserForServer
(String userId) Check that the calling user is authorized to issue a (any) request to the OMAG Server Platform.void
validateUserForService
(String userId, String serviceName) Check that the calling user is authorized to issue this request.void
validateUserForServiceOperation
(String userId, String serviceName, String serviceOperationName) Check that the calling user is authorized to issue this specific request.void
validateUserForTypeCreate
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to create a type within a repository.void
validateUserForTypeCreate
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to create a type within a repository.void
validateUserForTypeDelete
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have the right to delete a type within a repository.void
validateUserForTypeDelete
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have the right to delete a type within a repository.void
validateUserForTypeRead
(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) Tests for whether a specific user should have read access to a specific type within a repository.void
validateUserForTypeRead
(String userId, String metadataCollectionName, TypeDef typeDef) Tests for whether a specific user should have read access to a specific type within a repository.void
validateUserForTypeReIdentify
(String userId, String metadataCollectionName, AttributeTypeDef originalAttributeTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.void
validateUserForTypeReIdentify
(String userId, String metadataCollectionName, TypeDef originalTypeDef, String newTypeDefGUID, String newTypeDefName) Tests for whether a specific user should have the right to change the identifiers for a type within a repository.void
validateUserForTypeUpdate
(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) Tests for whether a specific user should have the right to update a typeDef within a repository.protected boolean
validateUserInGroup
(String userId, String groupName) This method does the lookup of the user and group in the secrets store.protected boolean
validateUserInGroup
(OpenMetadataUserAccount userAccount, String groupName) This method does the lookup of the user and group in the secrets store.protected boolean
validateZoneAccess
(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, String createdBy, boolean isUserOwner, AccessOperation operation, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Determine whether the security tags provide access to the elementMethods inherited from class org.odpi.openmetadata.metadatasecurity.connectors.OpenMetadataSecurityConnector
disconnect, getConnectorComponentDescription, logConnectorDisconnecting, logConnectorStarting, printZoneList, setAuditLog, setLocalServerUserId, setServerName, setServerPlatformURL, throwMissingAnchor, throwUnauthorizedAddFeedback, throwUnauthorizedAnchorAccess, throwUnauthorizedElementAccess, throwUnauthorizedInstanceAccess, throwUnauthorizedInstanceChange, throwUnauthorizedInstanceCreate, throwUnauthorizedPlatformAccess, throwUnauthorizedServerAccess, throwUnauthorizedServiceAccess, throwUnauthorizedTypeAccess, throwUnauthorizedTypeChange, throwUnauthorizedZoneChange, throwUnknownUser
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.ConnectorBase
combineConfigurationProperties, disconnectConnectors, equals, getArrayConfigurationProperty, getArrayConfigurationProperty, getArrayConfigurationProperty, getAssetTypeName, getBooleanConfigurationProperty, getConnectedAssetProperties, getConnection, getConnectorInstanceId, getDateConfigurationProperty, getIntConfigurationProperty, getLongConfigurationProperty, getNetworkAddresses, getStringConfigurationProperty, getStringConfigurationProperty, getSuppliedPlaceholderProperties, hashCode, initialize, initializeConnectedAssetProperties, initializeEmbeddedConnectors, initializeSecretsStoreConnector, isActive, logExceptionRecord, logRecord, logRecord, throwMissingConfigurationProperty, throwMissingResource, throwNoAsset, throwWrongTypeOfAsset, throwWrongTypeOfResource, throwWrongTypeOfRootSchema, toString
Methods inherited from class org.odpi.openmetadata.frameworks.connectors.Connector
clearStatisticProperty, clearStatisticTimestamp, getConnectorStatistics, getStatisticCounter, getStatisticProperty, getStatisticTimestamp, incrementStatisticCounter, initializeStatisticCounter, setStatisticProperty, setStatisticTimestamp
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.odpi.openmetadata.metadatasecurity.OpenMetadataPlatformSecurity
setServerPlatformURL
-
Constructor Details
-
OpenMetadataAccessSecurityConnector
public OpenMetadataAccessSecurityConnector()Constructor sets up the security policies
-
-
Method Details
-
start
Indicates that the connector is completely configured and can begin processing.- Overrides:
start
in classOpenMetadataSecurityConnector
- Throws:
ConnectorCheckedException
- there is a problem within the connector.
-
getUserAccount
Retrieve information about a specific user. This is used during a user's request for a token- Specified by:
getUserAccount
in interfaceOpenMetadataUserSecurity
- Parameters:
userId
- calling user- Returns:
- security properties about the user
- Throws:
UserNotAuthorizedException
- user not recognized - or supplied an incorrect password
-
resolveServerGroupName
Return a group name using a pattern.- Parameters:
pattern
- pattern to usename
- name of resource- Returns:
- formatted name or null which means ignore
-
resolveServiceGroupName
Return a group name using a pattern.- Parameters:
pattern
- pattern to useserviceName
- name of serviceoperationName
- requested operation- Returns:
- formatted name or null which means ignore
-
resolveElementGroupName
protected String resolveElementGroupName(String pattern, String qualifiedName, String operationName) Return a group name using a pattern.- Parameters:
pattern
- pattern to usequalifiedName
- qualified name of resourceoperationName
- requested operation- Returns:
- formatted name or null which means ignore
-
resolveOwnershipGroupName
protected String resolveOwnershipGroupName(String pattern, List<Classification> classifications, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) Return a group name using a pattern.- Parameters:
pattern
- pattern to useclassifications
- classifications associated with an elementrepositoryHelper
- manipulates repository service objectsserviceName
- calling servicemethodName
- calling method- Returns:
- formatted name or null which means ignore
-
resolveServerServiceOperationGroupName
protected String resolveServerServiceOperationGroupName(String pattern, String serverName, String serviceName, String operationName) Return a group name using a pattern.- Parameters:
pattern
- pattern to useserverName
- name of serverserviceName
- name of serviceoperationName
- requested operation- Returns:
- formatted name
-
validateUserInGroup
protected boolean validateUserInGroup(String userId, String groupName) throws UserNotAuthorizedException This method does the lookup of the user and group in the secrets store.- Parameters:
userId
- calling usergroupName
- group that they should be a member of- Returns:
- boolean indicating that they are not members of the group
- Throws:
UserNotAuthorizedException
- bad user id
-
validateUserInGroup
This method does the lookup of the user and group in the secrets store.- Parameters:
userAccount
- calling usergroupName
- group that they should be a member of- Returns:
- boolean indicating that they are not members of the group
-
checkNameInGroup
This method performs the nested look up of a user's name in the groups.- Parameters:
name
- name from the user accountlist
- list of names- Returns:
- boolean
-
validateUserForNewServer
Check that the calling user is authorized to create new servers.- Specified by:
validateUserForNewServer
in interfaceOpenMetadataPlatformSecurity
- Overrides:
validateUserForNewServer
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to access this platform
-
validateUserAsOperatorForPlatform
Check that the calling user is authorized to issue operator requests to the OMAG Server Platform.- Specified by:
validateUserAsOperatorForPlatform
in interfaceOpenMetadataPlatformSecurity
- Overrides:
validateUserAsOperatorForPlatform
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to issue operator commands to this platform
-
validateUserAsInvestigatorForPlatform
Check that the calling user is authorized to issue diagnostic requests to the OMAG Server Platform.- Specified by:
validateUserAsInvestigatorForPlatform
in interfaceOpenMetadataPlatformSecurity
- Overrides:
validateUserAsInvestigatorForPlatform
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to issue diagnostic commands to this platform
-
validateUserForServer
Check that the calling user is authorized to issue a (any) request to the OMAG Server Platform.- Specified by:
validateUserForServer
in interfaceOpenMetadataServerSecurity
- Overrides:
validateUserForServer
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to access this function
-
validateUserAsServerAdmin
Check that the calling user is authorized to update the configuration for a server.- Specified by:
validateUserAsServerAdmin
in interfaceOpenMetadataServerSecurity
- Overrides:
validateUserAsServerAdmin
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to change configuration
-
validateUserAsServerOperator
Check that the calling user is authorized to issue operator requests to the OMAG Server.- Specified by:
validateUserAsServerOperator
in interfaceOpenMetadataServerSecurity
- Overrides:
validateUserAsServerOperator
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to issue operator commands to this server
-
validateUserAsServerInvestigator
Check that the calling user is authorized to issue operator requests to the OMAG Server.- Specified by:
validateUserAsServerInvestigator
in interfaceOpenMetadataServerSecurity
- Overrides:
validateUserAsServerInvestigator
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling user- Throws:
UserNotAuthorizedException
- the user is not authorized to issue diagnostic commands to this server
-
validateUserForService
public void validateUserForService(String userId, String serviceName) throws UserNotAuthorizedException Check that the calling user is authorized to issue this request.- Specified by:
validateUserForService
in interfaceOpenMetadataServiceSecurity
- Overrides:
validateUserForService
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling userserviceName
- name of called service- Throws:
UserNotAuthorizedException
- the user is not authorized to access this service
-
validateUserForServiceOperation
public void validateUserForServiceOperation(String userId, String serviceName, String serviceOperationName) throws UserNotAuthorizedException Check that the calling user is authorized to issue this specific request.- Specified by:
validateUserForServiceOperation
in interfaceOpenMetadataServiceSecurity
- Overrides:
validateUserForServiceOperation
in classOpenMetadataSecurityConnector
- Parameters:
userId
- calling userserviceName
- name of called serviceserviceOperationName
- name of called operation- Throws:
UserNotAuthorizedException
- the user is not authorized to access this service
-
setSupportedZonesForUser
public List<String> setSupportedZonesForUser(List<String> supportedZones, String serviceName, String user) throws UserNotAuthorizedException Determine the appropriate setting for the supported zones depending on the user and the default supported zones set up for the service. This is called whenever an asset is accessed.- Overrides:
setSupportedZonesForUser
in classOpenMetadataSecurityConnector
- Parameters:
supportedZones
- default setting of the supported zones for the serviceserviceName
- name of the called serviceuser
- name of the user- Returns:
- list of supported zones for the user
- Throws:
UserNotAuthorizedException
- unknown user
-
validateSecurityTagAccess
protected boolean validateSecurityTagAccess(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, AccessOperation operation, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Determine whether the security tags provide access to the element- Parameters:
entityGUID
- unique identifier of entityentityTypeName
- type of entityclassifications
- list of classifications from entityuserAccount
- calling useroperation
- operation that they wish to performrepositoryHelper
- manipulates repository service objectsserviceName
- calling servicemethodName
- calling method- Returns:
- true=the user has access; false=no information on access for this user
- Throws:
UserNotAuthorizedException
- the user is not authorized for this type of access
-
validateZoneAccess
protected boolean validateZoneAccess(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, String createdBy, boolean isUserOwner, AccessOperation operation, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Determine whether the security tags provide access to the element- Parameters:
entityGUID
- unique identifier of entityentityTypeName
- type of entityclassifications
- list of classifications from entityuserAccount
- calling usercreatedBy
- original creator of the entityisUserOwner
- is the user an owneroperation
- operation that they wish to performrepositoryHelper
- manipulates repository service objectsserviceName
- calling servicemethodName
- calling method- Returns:
- true=the user has access; false=no information on access for this user
- Throws:
UserNotAuthorizedException
- the user is not authorized for this type of access
-
validateClassificationAccess
protected boolean validateClassificationAccess(String entityGUID, String entityTypeName, List<Classification> classifications, OpenMetadataUserAccount userAccount, AccessOperation operation, String createdBy, OMRSRepositoryHelper repositoryHelper, String serviceName, String methodName) throws UserNotAuthorizedException Determine whether the classifications provide access or restrict access to the element- Parameters:
entityGUID
- unique identifier of entityentityTypeName
- type of entityclassifications
- list of classifications from entityuserAccount
- calling useroperation
- operation that they wish to performcreatedBy
- original creator of the entityrepositoryHelper
- manipulates repository service objectsserviceName
- calling servicemethodName
- calling method- Returns:
- true=the user has access; false=no information on access for this user
- Throws:
UserNotAuthorizedException
- the user is not authorized for this type of access to this entity
-
validateUserForElementCreate
public 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.- Specified by:
validateUserForElementCreate
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForElementRead
in interfaceOpenMetadataElementSecurity
- 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
-
validateUserForAnchorMemberRead
public 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.- Specified by:
validateUserForAnchorMemberRead
in interfaceOpenMetadataElementSecurity
- 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
-
validateUserForElementDetailUpdate
public 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.- Specified by:
validateUserForElementDetailUpdate
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForElementStatusUpdate
in interfaceOpenMetadataElementSecurity
- 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
public 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- Specified by:
validateUserForElementAttach
in interfaceOpenMetadataElementSecurity
- 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
public 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- Specified by:
validateUserForElementDetach
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForElementAddFeedback
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForElementDeleteFeedback
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForElementClassify
in interfaceOpenMetadataElementSecurity
- 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
public 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- Specified by:
validateUserForElementDeclassify
in interfaceOpenMetadataElementSecurity
- 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
-
validateUserForAnchorMemberUpdate
public 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.- Specified by:
validateUserForAnchorMemberUpdate
in interfaceOpenMetadataElementSecurity
- Parameters:
userId
- identifier of useranchorEntity
- element detailsrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling method- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorMemberStatusUpdate
public 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.- Specified by:
validateUserForAnchorMemberStatusUpdate
in interfaceOpenMetadataElementSecurity
- Parameters:
userId
- identifier of useranchorEntity
- anchor detailsrepositoryHelper
- helper for OMRS objectsserviceName
- calling servicemethodName
- calling methodoriginalEntity
- entity being updatednewStatus
- new value for status- Throws:
UserNotAuthorizedException
- the user is not authorized to change this element
-
validateUserForAnchorAttach
public 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- Specified by:
validateUserForAnchorAttach
in interfaceOpenMetadataElementSecurity
- 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
public 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- Specified by:
validateUserForAnchorDetach
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForAnchorAddFeedback
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForAnchorDeleteFeedback
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForAnchorClassify
in interfaceOpenMetadataElementSecurity
- 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
public 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- Specified by:
validateUserForAnchorDeclassify
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForAnchorMemberDelete
in interfaceOpenMetadataElementSecurity
- 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
-
validateUserForElementDelete
public 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.- Specified by:
validateUserForElementDelete
in interfaceOpenMetadataElementSecurity
- 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
public 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.- Specified by:
validateUserForAnchorMemberAdd
in interfaceOpenMetadataElementSecurity
- 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
-
selectConnection
public 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.- Specified by:
selectConnection
in interfaceOpenMetadataElementSecurity
- 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
-
validateUserForTypeCreate
public void validateUserForTypeCreate(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create a type within a repository.- Specified by:
validateUserForTypeCreate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeCreate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeCreate
public void validateUserForTypeCreate(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create a type within a repository.- Specified by:
validateUserForTypeCreate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeCreate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeRead
public void validateUserForTypeRead(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific type within a repository.- Specified by:
validateUserForTypeRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve types
-
validateUserForTypeRead
public void validateUserForTypeRead(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific type within a repository.- Specified by:
validateUserForTypeRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve types
-
validateUserForTypeUpdate
public void validateUserForTypeUpdate(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update a typeDef within a repository.- Specified by:
validateUserForTypeUpdate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeUpdate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- current typeDef detailspatch
- proposed changes to type- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeDelete
public void validateUserForTypeDelete(String userId, String metadataCollectionName, TypeDef typeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a type within a repository.- Specified by:
validateUserForTypeDelete
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeDelete
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiontypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeDelete
public void validateUserForTypeDelete(String userId, String metadataCollectionName, AttributeTypeDef attributeTypeDef) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a type within a repository.- Specified by:
validateUserForTypeDelete
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeDelete
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionattributeTypeDef
- type details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeReIdentify
public void validateUserForTypeReIdentify(String userId, String metadataCollectionName, TypeDef originalTypeDef, String newTypeDefGUID, String newTypeDefName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- Specified by:
validateUserForTypeReIdentify
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeReIdentify
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionoriginalTypeDef
- type detailsnewTypeDefGUID
- the new identifier for the type.newTypeDefName
- new name for this type.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForTypeReIdentify
public void validateUserForTypeReIdentify(String userId, String metadataCollectionName, AttributeTypeDef originalAttributeTypeDef, String newTypeDefGUID, String newTypeDefName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the identifiers for a type within a repository.- Specified by:
validateUserForTypeReIdentify
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForTypeReIdentify
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionoriginalAttributeTypeDef
- type detailsnewTypeDefGUID
- the new identifier for the type.newTypeDefName
- new name for this type.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain types
-
validateUserForEntityCreate
public void validateUserForEntityCreate(String userId, String metadataCollectionName, String entityTypeGUID, InstanceProperties initialProperties, List<Classification> initialClassifications, InstanceStatus initialStatus) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create an instance within a repository.- Specified by:
validateUserForEntityCreate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityCreate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionentityTypeGUID
- unique identifier (guid) for the new entity's type.initialProperties
- initial list of properties for the new entity null means no properties.initialClassifications
- initial list of classifications for the new entity null means no classifications.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityRead
public EntityDetail validateUserForEntityRead(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntityRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Returns:
- entity to return (maybe altered by the connector)
- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve instances
-
validateUserForEntitySummaryRead
public void validateUserForEntitySummaryRead(String userId, String metadataCollectionName, EntitySummary instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntitySummaryRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntitySummaryRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve instances
-
validateUserForEntityProxyRead
public void validateUserForEntityProxyRead(String userId, String metadataCollectionName, EntityProxy instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForEntityProxyRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityProxyRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve instances
-
validateUserForEntityUpdate
public void validateUserForEntityUpdate(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update an instance within a repository.- Specified by:
validateUserForEntityUpdate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityUpdate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityClassificationAdd
public void validateUserForEntityClassificationAdd(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) throws UserNotAuthorizedException Tests for whether a specific user should have the right to add a classification to an entity instance within a repository.- Specified by:
validateUserForEntityClassificationAdd
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityClassificationAdd
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.properties
- list of properties for the classification.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityClassificationUpdate
public void validateUserForEntityClassificationUpdate(String userId, String metadataCollectionName, EntitySummary instance, String classificationName, InstanceProperties properties) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update the classification for an entity instance within a repository.- Specified by:
validateUserForEntityClassificationUpdate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityClassificationUpdate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.properties
- list of properties for the classification.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityClassificationDelete
public void validateUserForEntityClassificationDelete(String userId, String metadataCollectionName, EntitySummary instance, String classificationName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete a classification from an entity instance within a repository.- Specified by:
validateUserForEntityClassificationDelete
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityClassificationDelete
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsclassificationName
- String name for the classification.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityDelete
public void validateUserForEntityDelete(String userId, String metadataCollectionName, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an instance within a repository.- Specified by:
validateUserForEntityDelete
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityDelete
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityRestore
public void validateUserForEntityRestore(String userId, String metadataCollectionName, String deletedEntityGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to restore an instance within a repository.- Specified by:
validateUserForEntityRestore
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityRestore
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiondeletedEntityGUID
- String unique identifier (guid) for the entity.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityReIdentification
public void validateUserForEntityReIdentification(String userId, String metadataCollectionName, EntityDetail instance, String newGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the guid on an instance within a repository.- Specified by:
validateUserForEntityReIdentification
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityReIdentification
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewGUID
- the new guid for the instance.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityReTyping
public void validateUserForEntityReTyping(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the type name of an instance within a repository.- Specified by:
validateUserForEntityReTyping
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityReTyping
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewTypeDefSummary
- details of this instance's new TypeDef.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForEntityReHoming
public void validateUserForEntityReHoming(String userId, String metadataCollectionName, EntityDetail instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the home of an instance within a repository.- Specified by:
validateUserForEntityReHoming
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForEntityReHoming
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipCreate
public void validateUserForRelationshipCreate(String userId, String metadataCollectionName, String relationshipTypeGUID, InstanceProperties initialProperties, EntitySummary entityOneSummary, EntitySummary entityTwoSummary, InstanceStatus initialStatus) throws UserNotAuthorizedException Tests for whether a specific user should have the right to create an instance within a repository.- Specified by:
validateUserForRelationshipCreate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipCreate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectionrelationshipTypeGUID
- unique identifier (guid) for the new relationship's type.initialProperties
- initial list of properties for the new entity null means no properties.entityOneSummary
- the unique identifier of one of the entities that the relationship is connecting together.entityTwoSummary
- the unique identifier of the other entity that the relationship is connecting together.initialStatus
- initial status typically DRAFT, PREPARED or ACTIVE.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipRead
public Relationship validateUserForRelationshipRead(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have read access to a specific instance within a repository.- Specified by:
validateUserForRelationshipRead
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipRead
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Returns:
- relationship to return (maybe altered by the connector)
- Throws:
UserNotAuthorizedException
- the user is not authorized to retrieve instances
-
validateUserForRelationshipUpdate
public void validateUserForRelationshipUpdate(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to update an instance within a repository.- Specified by:
validateUserForRelationshipUpdate
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipUpdate
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipDelete
public void validateUserForRelationshipDelete(String userId, String metadataCollectionName, Relationship instance) throws UserNotAuthorizedException Tests for whether a specific user should have the right to delete an instance within a repository.- Specified by:
validateUserForRelationshipDelete
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipDelete
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance details- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipRestore
public void validateUserForRelationshipRestore(String userId, String metadataCollectionName, String deletedRelationshipGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to restore an instance within a repository.- Specified by:
validateUserForRelationshipRestore
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipRestore
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectiondeletedRelationshipGUID
- String unique identifier (guid) for the relationship.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipReIdentification
public void validateUserForRelationshipReIdentification(String userId, String metadataCollectionName, Relationship instance, String newGUID) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the guid on an instance within a repository.- Specified by:
validateUserForRelationshipReIdentification
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipReIdentification
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewGUID
- the new guid for the instance.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipReTyping
public void validateUserForRelationshipReTyping(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the type name of an instance within a repository.- Specified by:
validateUserForRelationshipReTyping
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipReTyping
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewTypeDefSummary
- details of this instance's new TypeDef.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateUserForRelationshipReHoming
public void validateUserForRelationshipReHoming(String userId, String metadataCollectionName, Relationship instance, String newHomeMetadataCollectionId, String newHomeMetadataCollectionName) throws UserNotAuthorizedException Tests for whether a specific user should have the right to change the home of a instance within a repository.- Specified by:
validateUserForRelationshipReHoming
in interfaceOpenMetadataRepositorySecurity
- Overrides:
validateUserForRelationshipReHoming
in classOpenMetadataSecurityConnector
- Parameters:
userId
- identifier of usermetadataCollectionName
- configurable name of the metadata collectioninstance
- instance detailsnewHomeMetadataCollectionId
- unique identifier for the new home metadata collection/repository.newHomeMetadataCollectionName
- display name for the new home metadata collection/repository.- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateEntityReferenceCopySave
public boolean validateEntityReferenceCopySave(String userId, EntityDetail instance) throws UserNotAuthorizedException Tests for whether a reference copy should be saved to the repository.- Specified by:
validateEntityReferenceCopySave
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of userinstance
- instance details- Returns:
- flag indicating whether the reference copy should be saved
- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-
validateRelationshipReferenceCopySave
public boolean validateRelationshipReferenceCopySave(String userId, Relationship instance) throws UserNotAuthorizedException Tests for whether a reference copy should be saved to the repository.- Specified by:
validateRelationshipReferenceCopySave
in interfaceOpenMetadataRepositorySecurity
- Parameters:
userId
- identifier of userinstance
- instance details- Returns:
- flag indicating whether the reference copy should be saved
- Throws:
UserNotAuthorizedException
- the user is not authorized to maintain instances
-