eclipse-tractusx / item-relationship-service

https://eclipse-tractusx.github.io/item-relationship-service/docs/
Apache License 2.0
7 stars 21 forks source link

Outdated type-signal in catalog for AAS-Resources #616

Closed arnoweiss closed 4 months ago

arnoweiss commented 4 months ago

Description

Since R23-12, standard CX-0002 has mandated the use of the property http://purl.org/dc/terms/type to be used as signal the type of a dcat:Dataset in a dcat:Catalog. In an EDC, the corresponding resource must be added during with the POST /v3/assets call, for instance like this [1]. Since its introduction, the property asset:prop:type was due for removal with the next breaking release.

Current behaviour

The IRS relies on the deprecated and (starting R24-05) optional property asset:prop:type [2].

Expected behavior

The IRS (as a Consumer application) should use the Property http://purl.org/dc/terms/type to discover Digital Twin Registries (and Submodels, despite not strictly necessary) in a Provider's catalog. This can be done, for instance, via EDC-Catalog-Filtering, see example [3]. Please note that this property holds an object with an @id property which is why the filter is nested.

If the IRS looks for either or both is an implementation detail. What matters is that Data Providers, adhering only to the current version of the standard are found by the IRS.

[1] POST /v3/assets

{
  "@context": {
    "edc": "https://w3id.org/edc/v0.0.1/ns/",
    "cx-common": "https://w3id.org/catenax/ontology/common#",
    "dct": "http://purl.org/dc/terms/"
  },
  "@id": "aas-dtr",
  "properties": {
    "dct:type": {"@id": "https://w3id.org/catenax/taxonomy#DigitalTwinRegistry"},
    "cx-common:version": "3.0"
  },
  "privateProperties": {
  },
  "dataAddress": {
    "@type": "DataAddress",
    "type": "HttpData",
    "baseUrl": "https://my-aas.dtr/api/v3.0",
    "oauth2:tokenUrl": "https://my-idp.url/token",
    "oauth2:clientId": "my-cid",
    "oauth2:clientSecretKey":"my-key",
    "proxyMethod": "true",
    "proxyQueryParams": "true",
    "proxyPath": "true"
  }
}

[2] https://github.com/eclipse-tractusx/item-relationship-service/blob/31ed8b8b38996640ec1d39d921c48bda434abad0/irs-edc-client/src/main/java/org/eclipse/tractusx/irs/edc/client/asset/EdcAssetService.java#L156

[3] POST /catalog/request

{
    "@context": {
        "edc": "https://w3id.org/edc/v0.0.1/ns/"
    },
    "@type": "CatalogRequest",
    "counterPartyAddress": "https://counter-party.address/api/v1/dsp",
    "counterPartyId": "BPNL000000FOOBAR",
    "protocol": "dataspace-protocol-http",
    "querySpec": {
        "offset": 0,
        "limit": 200,
        "filterExpression": {
            "operandLeft": "'http://purl.org/dc/terms/type'.'@id'",
            "operator": "=",
            "operandRight": "https://w3id.org/catenax/taxonomy#DigitalTwinRegistry"
        }
    }
}
ds-jhartmann commented 4 months ago

Hi @arnoweiss Thank you for raising this issue. I was not aware of this change. We will fix this ASAP.

ds-jhartmann commented 4 months ago

More information about the standard can be found in section 3.1.4 EDC Data Asset Structure of CX-0002

ds-jhartmann commented 4 months ago

Fixed in https://github.com/eclipse-tractusx/item-relationship-service/pull/647

ready for testing @ds-kgassner

ds-kgassner commented 4 months ago

successfully tested - approved from my side.

mkanal commented 4 months ago

LGFM. PO acceptance in behalf of @jzbmw