You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under very particular circumstances, a consumer's catalog-request fails if the provider has configured his assets in such a way that the JSON-LD compaction breaks.
Provider-side: create contract-definition with arbitrary policy, allowing the consumer to satisfy the access policy.
Consumer-side: query catalog
Context Information
Provider logs:
jakarta.ws.rs.InternalServerErrorException: Failed to compact JsonObject: When compacting an IRI would result in an IRI which could be confused with a compact IRI [code=IRI_CONFUSED_WITH_PREFIX].
The error is triggered here in the titanium json-ld lib. An issue with the same exception (though on a different endpoint) was fixed before, see #3172.
Setup: eclipse-edc 0.6.2 (as part of tractusx-edc 0.7.0).
Possible Root Cause
The error is triggered by the property "dct:type": {"@id": "https://w3id.org/my-taxonomy#MyAssetType"} ONLY IF the @context in the POST /v3/assets request does not bind the dct namespace. dct:type is interpreted as an expanded, absolute URI and persisted properly. However, upon catalog-request the property is loaded from the database and titanium processes it according to the standard context of the EDC that includes dct as set here:
All prerequisites of the IRI compaction algorithm, step 9 are then true and an exception is thrown. The same issue would likely occur with all other EDC-registered prefixes (dcat, dspace, ...).
The text was updated successfully, but these errors were encountered:
Bug Report
Describe the Bug
Under very particular circumstances, a consumer's catalog-request fails if the provider has configured his assets in such a way that the JSON-LD compaction breaks.
Expected Behavior
HTTP 200
- serve the Provider's catalog.Observed Behavior
HTTP 502
Steps to Reproduce
/v3/assets
with payload. Note the missing binding of thedct
prefix in the context.Context Information
Provider logs:
The error is triggered here in the titanium json-ld lib. An issue with the same exception (though on a different endpoint) was fixed before, see #3172.
Setup: eclipse-edc 0.6.2 (as part of tractusx-edc 0.7.0).
Possible Root Cause
The error is triggered by the property
"dct:type": {"@id": "https://w3id.org/my-taxonomy#MyAssetType"}
ONLY IF the@context
in thePOST /v3/assets
request does not bind thedct
namespace.dct:type
is interpreted as an expanded, absolute URI and persisted properly. However, upon catalog-request the property is loaded from the database and titanium processes it according to the standard context of the EDC that includesdct
as set here:Connector/data-protocols/dsp/dsp-http-api-configuration/src/main/java/org/eclipse/edc/protocol/dsp/http/api/configuration/DspApiConfigurationExtension.java
Line 121 in d77b676
All prerequisites of the IRI compaction algorithm, step 9 are then true and an exception is thrown. The same issue would likely occur with all other EDC-registered prefixes (
dcat
,dspace
, ...).The text was updated successfully, but these errors were encountered: