How to use IDSC- JsonPath ? #585
-
Hello together, we want to make a policy with IDSC - JsonPath and we are not sure how to make it. InformationModel/docs/serializations/ontology.ttl Lines 6776 to 6780 in 9be722b Our Qustions would be:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi, Here is an example for a policy that demands to modify the data in transit (before the usage): {
"@context": [
"http://www.w3.org/ns/odrl.jsonld",
{ "dc": "http://purl.org/dc/terms/",
"ids":"https://w3id.org/idsa/core/",
"idsc" : "https://w3id.org/idsa/code/" }
],
"@type": "Agreement",
"uid": "http://example.com/policy/modify-in-transit/42",
"profile": "http://www.w3.org/ns/odrl/2/core",
"dc:creator": "Data Provider 123",
"dc:description": "This policy demands to intercept the data flow and modify the data in transit.",
"dc:issued": "2022-05-19T12:00",
"ids:provider": "http://example.com/ids/party/123",
"ids:consumer": "http://example.com/ids/party/456",
"permission": [{
"target": "http://example.com/ids/data/789",
"assigner": "http://example.com/ids/party/123",
"assignee": "http://example.com/ids/party/456",
"action": "use",
"duty": [{
"action": [{
"rdf:value": { "@id": "idsc:REPLACE" },
"includedIn": "anonymize",
"refinement": [{
"leftOperand": "idsc:REPLACE_WITH",
"operator": "eq",
"rightOperand": { "@value": "xxxx", "@type": "xsd:string" }
},{
"leftOperand": "idsc:JSON_PATH",
"operator": "eq",
"rightOperand": { "@value": "$.name", "@type": "xsd:string" }
}]
}],
"constraint": [{
"leftOperand": "event",
"operator": "lt",
"rightOperand": { "@id": "odrl:policyUsage" }
}],
"ids:pxpEndpoint": [{
"@type":"ids:PXP",
"ids:interfaceDescription":{ "@value":"?interfaceURI", "@type":"xsd:anyURI" },
"ids:endpointURI":{ "@value":"?endPointURI", "@type":"xsd:anyURI" }
}]
}]
}]
} This policy is specified in ODRL core langauge and a few elements from the IDS information model is used in it. Of course, we can specifiy a policy completely in IDS namespace and entirely compatible with the Information Model. Then, we would use the ids:preduty to express that the duty must be executed before the rule action (i.e., use). In order to enforce this policy, the idsc:replace duty action has to be implemented in a way that replaces the name field of the data with xxxx as specified in the policy. I hope it helps. |
Beta Was this translation helpful? Give feedback.
Hi,
Here is an example for a policy that demands to modify the data in transit (before the usage):