Class OMRSMetadataDefaultRepositorySecurity

java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.OMRSMetadataDefaultRepositorySecurity
All Implemented Interfaces:
OpenMetadataRepositorySecurity

public class OMRSMetadataDefaultRepositorySecurity extends Object implements OpenMetadataRepositorySecurity
OMRSMetadataDefaultRepositorySecurity provides a default instance repository security support that allows all actions. It is replaced if the server's security connector implements the repository security interface.
  • Constructor Details

    • OMRSMetadataDefaultRepositorySecurity

      public OMRSMetadataDefaultRepositorySecurity()
  • Method Details

    • validateUserForTypeCreate

      public 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.
      Specified by:
      validateUserForTypeCreate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      typeDef - type details
    • validateUserForTypeCreate

      public 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.
      Specified by:
      validateUserForTypeCreate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      attributeTypeDef - type details
    • validateUserForTypeRead

      public 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.
      Specified by:
      validateUserForTypeRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      typeDef - type details
    • validateUserForTypeRead

      public 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.
      Specified by:
      validateUserForTypeRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      attributeTypeDef - type details
    • validateUserForTypeUpdate

      public void validateUserForTypeUpdate(String userId, String metadataCollectionName, TypeDef typeDef, TypeDefPatch patch)
      Tests for whether a specific user should have the right to update a type within a repository.
      Specified by:
      validateUserForTypeUpdate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      typeDef - type details
      patch - changes to the type
    • validateUserForTypeDelete

      public 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.
      Specified by:
      validateUserForTypeDelete in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      typeDef - type details
    • validateUserForTypeDelete

      public 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.
      Specified by:
      validateUserForTypeDelete in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      attributeTypeDef - type details
    • validateUserForTypeReIdentify

      public 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.
      Specified by:
      validateUserForTypeReIdentify in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      originalTypeDef - type details
      newTypeDefGUID - the new identifier for the type.
      newTypeDefName - new name for this type.
    • validateUserForTypeReIdentify

      public 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.
      Specified by:
      validateUserForTypeReIdentify in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      originalAttributeTypeDef - type details
      newTypeDefGUID - the new identifier for the type.
      newTypeDefName - new name for this type.
    • validateUserForEntityCreate

      public 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 a instance within a repository.
      Specified by:
      validateUserForEntityCreate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      entityTypeGUID - 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.
    • validateUserForEntityRead

      public EntityDetail validateUserForEntityRead(String userId, String metadataCollectionName, EntityDetail instance)
      Tests for whether a specific user should have read access to a specific instance within a repository.
      Specified by:
      validateUserForEntityRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      Returns:
      entity to return (may be altered by the repositorySecurityConnector)
    • validateUserForEntitySummaryRead

      public 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.
      Specified by:
      validateUserForEntitySummaryRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForEntityProxyRead

      public 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.
      Specified by:
      validateUserForEntityProxyRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForEntityUpdate

      public void validateUserForEntityUpdate(String userId, String metadataCollectionName, EntityDetail instance)
      Tests for whether a specific user should have the right to update a instance within a repository.
      Specified by:
      validateUserForEntityUpdate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForEntityClassificationAdd

      public 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.
      Specified by:
      validateUserForEntityClassificationAdd in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      classificationName - String name for the classification.
      properties - list of properties for the classification.
    • validateUserForEntityClassificationUpdate

      public 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.
      Specified by:
      validateUserForEntityClassificationUpdate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      classificationName - String name for the classification.
      properties - list of properties for the classification.
    • validateUserForEntityClassificationDelete

      public 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.
      Specified by:
      validateUserForEntityClassificationDelete in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      classificationName - String name for the classification.
    • validateUserForEntityDelete

      public void validateUserForEntityDelete(String userId, String metadataCollectionName, EntityDetail instance)
      Tests for whether a specific user should have the right to delete a instance within a repository.
      Specified by:
      validateUserForEntityDelete in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForEntityRestore

      public void validateUserForEntityRestore(String userId, String metadataCollectionName, String deletedEntityGUID)
      Tests for whether a specific user should have the right to restore a instance within a repository.
      Specified by:
      validateUserForEntityRestore in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      deletedEntityGUID - String unique identifier (guid) for the entity.
    • validateUserForEntityReIdentification

      public 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 a instance within a repository.
      Specified by:
      validateUserForEntityReIdentification in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newGUID - the new guid for the instance.
    • validateUserForEntityReTyping

      public void validateUserForEntityReTyping(String userId, String metadataCollectionName, EntityDetail instance, TypeDefSummary newTypeDefSummary)
      Tests for whether a specific user should have the right to change the type of a instance within a repository.
      Specified by:
      validateUserForEntityReTyping in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newTypeDefSummary - details of this instance's new TypeDef.
    • validateUserForEntityReHoming

      public 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 a instance within a repository.
      Specified by:
      validateUserForEntityReHoming in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newHomeMetadataCollectionId - unique identifier for the new home metadata collection/repository.
      newHomeMetadataCollectionName - display name for the new home metadata collection/repository.
    • validateUserForRelationshipCreate

      public 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 a instance within a repository.
      Specified by:
      validateUserForRelationshipCreate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      relationshipTypeGUID - 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.
    • validateUserForRelationshipRead

      public Relationship validateUserForRelationshipRead(String userId, String metadataCollectionName, Relationship instance)
      Tests for whether a specific user should have read access to a specific instance within a repository.
      Specified by:
      validateUserForRelationshipRead in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      Returns:
      relationship to return (may be altered by the repositorySecurityConnector)
    • validateUserForRelationshipUpdate

      public void validateUserForRelationshipUpdate(String userId, String metadataCollectionName, Relationship instance)
      Tests for whether a specific user should have the right to update a instance within a repository.
      Specified by:
      validateUserForRelationshipUpdate in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForRelationshipDelete

      public void validateUserForRelationshipDelete(String userId, String metadataCollectionName, Relationship instance)
      Tests for whether a specific user should have the right to delete a instance within a repository.
      Specified by:
      validateUserForRelationshipDelete in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
    • validateUserForRelationshipRestore

      public void validateUserForRelationshipRestore(String userId, String metadataCollectionName, String deletedRelationshipGUID)
      Tests for whether a specific user should have the right to restore a instance within a repository.
      Specified by:
      validateUserForRelationshipRestore in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      deletedRelationshipGUID - String unique identifier (guid) for the relationship.
    • validateUserForRelationshipReIdentification

      public 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 a instance within a repository.
      Specified by:
      validateUserForRelationshipReIdentification in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newGUID - the new guid for the instance.
    • validateUserForRelationshipReTyping

      public void validateUserForRelationshipReTyping(String userId, String metadataCollectionName, Relationship instance, TypeDefSummary newTypeDefSummary)
      Tests for whether a specific user should have the right to change the type of a instance within a repository.
      Specified by:
      validateUserForRelationshipReTyping in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newTypeDefSummary - details of this instance's new TypeDef.
    • validateUserForRelationshipReHoming

      public 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.
      Specified by:
      validateUserForRelationshipReHoming in interface OpenMetadataRepositorySecurity
      Parameters:
      userId - identifier of user
      metadataCollectionName - configurable name of the metadata collection
      instance - instance details
      newHomeMetadataCollectionId - unique identifier for the new home metadata collection/repository.
      newHomeMetadataCollectionName - display name for the new home metadata collection/repository.
    • validateEntityReferenceCopySave

      public boolean validateEntityReferenceCopySave(EntityDetail instance)
      Tests for whether a reference copy should be saved to the repository.
      Specified by:
      validateEntityReferenceCopySave in interface OpenMetadataRepositorySecurity
      Parameters:
      instance - instance details
      Returns:
      flag indicating whether the reference copy should be saved
    • validateRelationshipReferenceCopySave

      public boolean validateRelationshipReferenceCopySave(Relationship instance)
      Tests for whether a reference copy should be saved to the repository.
      Specified by:
      validateRelationshipReferenceCopySave in interface OpenMetadataRepositorySecurity
      Parameters:
      instance - instance details
      Returns:
      flag indicating whether the reference copy should be saved