Skip to content

Commit

Permalink
Merge pull request #8559 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Create element metadata security
  • Loading branch information
mandy-chessell authored Jan 3, 2025
2 parents e8308ec + 19177ef commit fd1f3a1
Show file tree
Hide file tree
Showing 344 changed files with 18,213 additions and 23,389 deletions.
2 changes: 1 addition & 1 deletion EgeriaContentPacksGUIDMap.json

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ platform.configstore.endpoint=data/servers/{0}/config/{0}.config
### By default, there is no platform metadata security connector.
### The values below are for a sample platform metadata security connector based off of Coco Pharmaceutical persona
###############################################
platform.security.provider=org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaSecretsSecurityProvider
platform.security.provider=org.odpi.openmetadata.metadatasecurity.accessconnector.OpenMetadataAccessSecurityProvider
platform.security.name=Coco Pharmaceuticals Platform
platform.security.secrets.provider=org.odpi.openmetadata.adapters.connectors.secretsstore.yaml.YAMLSecretsStoreProvider
platform.security.secrets.location=loading-bay/secrets/demo-user-directory.omsecrets
platform.security.secrets.location=loading-bay/secrets/coco-user-directory.omsecrets
platform.security.secrets.collection=userDirectory

###############################################
Expand Down Expand Up @@ -65,14 +65,16 @@ platform.placeholder.variables=\
"egeriaEndpoint" : "https://localhost:9443",\
"postgreSQLDatabaseURL" : "jdbc:postgresql://localhost:5432/egeria",\
"secretsStore" : "loading-bay/secrets/default.omsecrets",\
"postgreSQLServerCollectionName" : "PostgreSQL Server:LocalPostgreSQL1"\
"postgreSQLServerCollectionName" : "PostgreSQL Server:LocalPostgreSQL1",\
"metadataAccessSecretsStore" : "loading-bay/secrets/coco-user-directory.omsecrets",\
"metadataAccessCollectionName" : "userDirectory"\
}

################################################
### startup servers configuration
################################################
#userId used to start up the list of configured servers default is 'system'
startup.user=system
startup.user=platform
# Comma separated names of servers to be started. The server names should be unquoted.
startup.server.list=active-metadata-store,engine-host,integration-daemon,view-server,simple-metadata-store

Expand Down
8 changes: 5 additions & 3 deletions container.application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ platform.configstore.endpoint=data/servers/{0}/config/{0}.config
### By default, there is no platform metadata security connector.
### The values below are for a sample platform metadata security connector based off of Coco Pharmaceutical persona
###############################################
platform.security.provider=org.odpi.openmetadata.metadatasecurity.samples.CocoPharmaSecretsSecurityProvider
platform.security.provider=org.odpi.openmetadata.metadatasecurity.accessconnector.OpenMetadataAccessSecurityProvider
platform.security.name=Coco Pharmaceuticals Platform
platform.security.secrets.provider=org.odpi.openmetadata.adapters.connectors.secretsstore.yaml.YAMLSecretsStoreProvider
platform.security.secrets.location=loading-bay/secrets/demo-user-directory.omsecrets
platform.security.secrets.location=loading-bay/secrets/coco-user-directory.omsecrets
platform.security.secrets.collection=userDirectory

###############################################
Expand Down Expand Up @@ -66,13 +66,15 @@ platform.placeholder.variables=\
"postgreSQLDatabaseURL" : "jdbc:postgresql://host.docker.internal:5442/egeria",\
"secretsStore" : "loading-bay/secrets/default.omsecrets",\
"postgreSQLServerCollectionName" : "PostgreSQL Server:LocalPostgreSQL1"\
"metadataAccessSecretsStore" : "loading-bay/secrets/coco-user-directory.omsecrets",\
"metadataAccessCollectionName" : "userDirectory"\
}

################################################
### startup servers configuration
################################################
#userId used to start up the list of configured servers default is 'system'
startup.user=system
startup.user=platform
# Comma separated names of servers to be started. The server names should be unquoted.
startup.server.list=active-metadata-store,engine-host,integration-daemon,view-server,simple-metadata-store

Expand Down
2 changes: 1 addition & 1 deletion content-packs/APIsContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheAtlasContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheKafkaContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoBusinessSystemsArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoClinicalTrialsTemplatesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoComboArchive.omarchive

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoGovernanceProgramArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoOrganizationArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoSustainabilityArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CocoTypesArchive.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ObservabilityContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/PostgresContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/UnityCatalogContentPack.omarchive

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions open-metadata-distribution/omag-server-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:jdbc-resource-connector')
implementation project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-encrypted-file-store-connector')
implementation project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-file-store-connector')
implementation project(':open-metadata-implementation:adapters:open-connectors:metadata-security-connectors:open-metadata-access-security-connector')
implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:files-integration-connectors')
implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-audit-integration-connector')
implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:jdbc-integration-connector')
Expand Down Expand Up @@ -92,7 +93,6 @@ dependencies {
implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility')
implementation project(':open-metadata-resources:open-metadata-archives:core-content-pack')
implementation project(':open-metadata-resources:open-metadata-samples:sample-metadata:big-glossaries')
implementation project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples')
implementation project(':open-metadata-resources:open-metadata-samples:governance-action-samples')
implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-avro-sample')
implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-csv-sample')
Expand Down Expand Up @@ -217,6 +217,7 @@ distributions {
from { project(':open-metadata-implementation:adapters:open-connectors:governance-action-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:nanny-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:report-generating-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:metadata-security-connectors:open-metadata-access-security-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:files-integration-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:csv-lineage-import-integration-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-audit-integration-connector').jar }
Expand All @@ -225,7 +226,6 @@ distributions {
from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openlineage-integration-connectors').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:inmemory-open-metadata-topic-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:kafka-open-metadata-topic-connector').jar }
from { project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples').jar }
from { project(':open-metadata-resources:open-metadata-samples:governance-action-samples').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector').jar }
from { project(':open-metadata-implementation:adapters:open-connectors:secrets-store-connectors:env-variable-secrets-store-connector').jar }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,17 +734,17 @@ private EntityDetail entityOfInterest(String userId,
{
fullEntity = entity;

assetHandler.validateAnchorForEntity(userId,
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
assetHandler.validateEntityAndAnchorForRead(userId,
fullEntity.getType().getTypeDefName(),
fullEntity,
guidParameterName,
false,
false,
true,
false,
supportedZones,
effectiveTime,
methodName);
}
}
else if (entityProxy != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2196,17 +2196,17 @@ public GUIDListResponse getAssetsByMeaning(String serverName,
}
else
{
EntityDetail anchorEntity = handler.validateAnchorForEntity(userId,
OpenMetadataType.OPEN_METADATA_ROOT.typeName,
entity,
entityGUIDParameterName,
false,
false,
false,
false,
handler.getSupportedZones(),
new Date(),
methodName);
EntityDetail anchorEntity = handler.validateEntityAndAnchorForRead(userId,
OpenMetadataType.OPEN_METADATA_ROOT.typeName,
entity,
entityGUIDParameterName,
false,
false,
false,
false,
handler.getSupportedZones(),
new Date(),
methodName);
if ((anchorEntity != null) && (repositoryHelper.isTypeOf(serverName, anchorEntity.getType().getTypeDefName(), OpenMetadataType.ASSET.typeName)))
{
if (! guids.contains(anchorEntity.getGUID()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ public void setConfidentialityClassification(String
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param elementGUID unique identifier of the metadata element to unclassify
* @param elementGUID unique identifier of the metadata element to declassify
* @param externalIdentifier unique identifier of the element in the external asset manager
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
Expand Down Expand Up @@ -851,7 +851,7 @@ public void setRetentionClassification(String userId,
* @param userId calling user
* @param assetManagerGUID unique identifier of software capability representing the caller
* @param assetManagerName unique name of software capability representing the caller
* @param elementGUID unique identifier of the metadata element to unclassify
* @param elementGUID unique identifier of the metadata element to declassify
* @param externalIdentifier unique identifier of the element in the external asset manager
* @param effectiveTime the time that the retrieved elements must be effective for
* @param forLineage return elements marked with the Memento classification?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,7 @@ public void clearAssetRelationship(String userId,
relationshipTypeName,
forLineage,
forDuplicateProcessing,
assetHandler.getSupportedZones(),
effectiveTime,
methodName);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private void addCorrelationPropertiesToPorts(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
portGUIDParameterName,
OpenMetadataType.PORT_TYPE_NAME,
OpenMetadataType.PORT.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -1274,18 +1274,18 @@ public String createPort(String userId,
invalidParameterHandler.validateObject(portProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(portProperties.getQualifiedName(), qualifiedNameParameterName, methodName);

String typeName = OpenMetadataType.PORT_TYPE_NAME;
String typeName = OpenMetadataType.PORT.typeName;

if (portProperties.getTypeName() != null)
{
typeName = portProperties.getTypeName();
}

int portType = PortType.OTHER.getOpenTypeOrdinal();
int portType = PortType.OTHER.getOrdinal();

if (portProperties.getPortType() != null)
{
portType = portProperties.getPortType().getOpenTypeOrdinal();
portType = portProperties.getPortType().getOrdinal();
}

String portGUID = processHandler.createPort(userId,
Expand All @@ -1309,7 +1309,7 @@ public String createPort(String userId,
this.createExternalIdentifier(userId,
portGUID,
portGUIDParameterName,
OpenMetadataType.PORT_TYPE_NAME,
OpenMetadataType.PORT.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -1358,7 +1358,7 @@ public void updatePort(String userId,
invalidParameterHandler.validateObject(portProperties, propertiesParameterName, methodName);
invalidParameterHandler.validateName(portProperties.getQualifiedName(), qualifiedNameParameterName, methodName);

String typeName = OpenMetadataType.PORT_TYPE_NAME;
String typeName = OpenMetadataType.PORT.typeName;

if (portProperties.getTypeName() != null)
{
Expand All @@ -1375,11 +1375,11 @@ public void updatePort(String userId,
effectiveTime,
methodName);

int portType = PortType.OTHER.getOpenTypeOrdinal();
int portType = PortType.OTHER.getOrdinal();

if (portProperties.getPortType() != null)
{
portType = portProperties.getPortType().getOpenTypeOrdinal();
portType = portProperties.getPortType().getOrdinal();
}

processHandler.updatePort(userId,
Expand Down Expand Up @@ -1752,7 +1752,7 @@ public void removePort(String userId,
this.validateExternalIdentifier(userId,
portGUID,
portGUIDParameterName,
OpenMetadataType.PORT_TYPE_NAME,
OpenMetadataType.PORT.typeName,
correlationProperties,
forLineage,
forDuplicateProcessing,
Expand Down Expand Up @@ -1982,7 +1982,7 @@ public PortElement getPortDelegation(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
portGUIDParameterName,
OpenMetadataType.PORT_TYPE_NAME,
OpenMetadataType.PORT.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down Expand Up @@ -2096,7 +2096,7 @@ public PortElement getPortByGUID(String userId,
element.setCorrelationHeaders(this.getCorrelationProperties(userId,
element.getElementHeader().getGUID(),
portGUIDParameterName,
OpenMetadataType.PORT_TYPE_NAME,
OpenMetadataType.PORT.typeName,
assetManagerGUID,
assetManagerName,
forLineage,
Expand Down
Loading

0 comments on commit fd1f3a1

Please sign in to comment.