eclipse-tractusx / eclipse-tractusx/tutorial-resources

policies generated by policy playground cannot be expanded

Open
#561 1 comment 0 reactions 1 assignee Assigned to @lgblaumeiser View on GitHub
bug
Dominant language
HCL
Stars
19
Forks
33
PR merge metrics
No merged PRs in 30d

Description

### Current Behavior
If I generate the simplest policy [in the playground](https://eclipse-tractusx.github.io/tutorial-resources/policy-playground/):

```json
{
"@context": [
"http://www.w3.org/ns/odrl.jsonld",
"https://w3id.org/tractusx/edc/v0.0.1",
{
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
}
],
"@type": "PolicyDefinition",
"@id": "{{POLICY_ID}}",
"policy": {
"@type": "Set",
"permission": [
{
"action": "use",
"constraint": [
{
"leftOperand": "BusinessPartnerNumber",
"operator": "eq",
"rightOperand": ""
}
]
}
]
}
}
```

and I try to expand it on the [JSON-LD Playground](https://json-ld.org/playground/)
I get this error:
```
jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.
```

### Expected Behavior
to being able to expand the policy correctly.
The policy actually works if ingested in the Tractus-X connector because the context it's cached there, but the `https://w3id.org/tractusx/edc/v0.0.1` url should point to the actual file uploaded somewhere to permit eventually other connectors or tools to being able to expand it correctly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.