-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* policies added * Update README.md UC contract description updated * Delete useData-restrictConnector-restrictPurpose-deleteAfter-countUsage-modifyInTransit-log-notify-InhibitDistibute.json complex policy deleted * Add files via upload * Add files via upload * Add files via upload * Update T7_PIP_and_PIP_Interfaces.md * Update T7_ODRL_policies.md * Add files via upload Obtain consent policy example and restrict location of participant policy example * Delete T7-ODRL-to-Rego-translation-document.md * Update pc9-odrl-restrict-time-interval-example.json * Update pc20-ids-restrict-payment-rent-example.json * Update pc17-odrl-distribute-next-policy-example.json * Update pc17-odrl-distribute-next-policy-example.json * Update README.md * Create README.md * Add files via upload * Add files via upload * Update README.md
- Loading branch information
1 parent
b82d0d1
commit 2c5f66e
Showing
67 changed files
with
3,549 additions
and
1,105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Here you can find example policies and templates specified in IDS and ODRL languages. | ||
|
||
## Authors | ||
|
||
| | | | ||
|:---|:---| | ||
| Arghavan Hosseinzadeh | Fraunhofer IESE | | ||
| Robin Brandstädter | Fraunhofer IESE | | ||
| Jessica Chwalek | Fraunhofer IESE | | ||
| | | | |
210 changes: 210 additions & 0 deletions
210
UsageControl/Contract/Policies/ids-complex-policy-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
{ | ||
"@context": { | ||
"ids":"https://w3id.org/idsa/core/", | ||
"idsc" : "https://w3id.org/idsa/code/" | ||
}, | ||
"@type": "ids:ContractAgreement", | ||
"@id": "https://w3id.org/idsa/autogen/contract/complex-policy-access", | ||
"profile": "http://example.com/ids-profile", | ||
"ids:provider": "http://example.com/ids/party/my-party", | ||
"ids:consumer": "http://example.com/ids/party/consumer-party", | ||
"ids:permission": [{ | ||
"ids:target": { | ||
"@id":"http://example.com/ids/data/1234" | ||
}, | ||
"ids:action": [{ | ||
"@id":"idsc:USE" | ||
}], | ||
"ids:constraint": [{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:CONNECTOR"}, | ||
"ids:operator": { "@id": "idsc:IN"}, | ||
"ids:rightOperand": [ | ||
{"@value": "http://example.com/ids/connector/12", "@type": "xsd:anyURI"}, | ||
{"@value": "http://example.com/ids/connector/34", "@type": "xsd:anyURI"}, | ||
{"@value": "http://example.com/ids/connector/56", "@type": "xsd:anyURI"}], | ||
"ids:pipEndpoint":{ | ||
"@type":"ids:PIP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/pip/id/connector", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/pip/ep/connector", | ||
"@type":"anyURI" | ||
} | ||
} | ||
},{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "https://w3id.org/idsa/core/purpose"}, | ||
"ids:operator": { "@id": "idsc:SAME_AS"}, | ||
"ids:rightOperand": [{"@value": "http://example.com/ids/purpose/Marketing", "@type": "xsd:anyURI"}], | ||
"ids:pipEndpoint":{ | ||
"@type":"ids:PIP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PIP/id/purpose", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/purpose", | ||
"@type":"anyURI" | ||
} | ||
} | ||
} ,{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:COUNT"}, | ||
"ids:operator": { "@id": "idsc:LTEQ"}, | ||
"ids:rightOperand": [{"@value": "10", "@type": "xsd:decimal"}], | ||
"ids:pipEndpoint":{ | ||
"@type":"ids:PIP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PIP/id/count", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/count", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}], | ||
"ids:preDuty": [{ | ||
"@type":"ids:Duty", | ||
"ids:action": [{ | ||
"@id":"idsc:REPLACE", | ||
"ids:refinement": [{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:REPLACE_WITH"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "xxxx", "@type": "xsd:string"}] | ||
},{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:JSON_PATH"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "$.name", "@type": "xsd:string"}] | ||
}] , | ||
"ids:pxpEndpoint":{ | ||
"@type":"ids:PXP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PXP/id/replace", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/replace", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] | ||
}], | ||
"ids:postDuty": [{ | ||
"@type":"ids:Duty", | ||
"ids:action": [{ | ||
"@id":"idsc:DELETE", | ||
"ids:refinement": [{ | ||
"ids:leftOperand": { "@id": "idsc:DATE_TIME"}, | ||
"ids:operator": { "@id": "idsc:BEFORE"}, | ||
"ids:rightOperand": [{ "@type": "xsd:datetimeStamp", "@value": "2023-04-30T11:43:00Z" }], | ||
"ids:pipEndpoint":{ | ||
"@type":"ids:PIP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PIP/id/date_time", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/date_time", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] , | ||
"ids:pxpEndpoint":{ | ||
"@type":"ids:PXP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PXP/id/delete", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/delete", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] | ||
},{ | ||
"@type":"ids:Duty", | ||
"ids:action": [{ | ||
"@id":"idsc:INCREMENT_COUNTER", | ||
"ids:pxpEndpoint":{ | ||
"@type":"ids:PXP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PXP/id/increment_counter", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/increment_counter", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] | ||
},{ | ||
"@type":"ids:Duty", | ||
"ids:action": [{ | ||
"@id":"idsc:LOG", | ||
"ids:refinement": [{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:LOG_LEVEL"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "idsc:ON_ALLOW", "@type": "xsd:string"}] | ||
},{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:SYSTEM_DEVICE"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "http://example.com/ids/system/logserver", "@type": "xsd:anyURI"}] | ||
}], | ||
"ids:pxpEndpoint":{ | ||
"@type":"ids:PXP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PXP/id/log", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/ep/log", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] | ||
},{ | ||
"@type":"ids:Duty", | ||
"ids:action": [{ | ||
"@id":"idsc:NOTIFY", | ||
"ids:refinement": [{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:NOTIFICATION_LEVEL"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "idsc:ON_ALLOW", "@type": "xsd:string"}] | ||
},{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:RECIPIENT"}, | ||
"ids:operator": { "@id": "idsc:DEFINES_AS"}, | ||
"ids:rightOperand": [{"@value": "http://example.com/ids/party/data-owner-party", "@type": "xsd:anyURI"}] | ||
}] , | ||
"ids:pxpEndpoint":{ | ||
"@type":"ids:PXP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/PXP/interfaceDescription/notify", | ||
"@type":"anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/PXPendpoint/notify", | ||
"@type":"anyURI" | ||
} | ||
} | ||
}] | ||
}] | ||
}], | ||
"ids:prohibition": [{ | ||
"ids:target": { | ||
"@id":"http://example.com/ids/data/1234" | ||
}, | ||
"ids:action": [{ | ||
"@id":"idsc:DISTRIBUTE" | ||
}] | ||
}] | ||
} |
64 changes: 64 additions & 0 deletions
64
UsageControl/Contract/Policies/odrl-complex-policy-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"@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/restrict-connector/312", | ||
"profile": "http://www.w3.org/ns/odrl/2/core", | ||
"dc:creator": "Data Provider 123", | ||
"dc:description": "The Connector-restricted Data Usage policy restricts the usage of the data to a specific IDS connector of a specific Data Consumer assuming that the Data Consumer owns one or more IDS Connector(s).", | ||
"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": [ "derive", "display" ], | ||
"constraint": [{ | ||
"leftOperand": "idsc:CONNECTOR", | ||
"operator": "isAnyOf", | ||
"rightOperand": [ | ||
{ "@value": "?connector1URI", "@type": "xsd:anyURI" }, | ||
{ "@value": "?connector2URI", "@type": "xsd:anyURI" } | ||
] | ||
},{ | ||
"leftOperand": "idsc:SECURITY_LEVEL", | ||
"operator": "isPartOf", | ||
"rightOperand": [ | ||
{ "@value": "idsc:TRUST_PLUS_SECURITY_PROFILE", "@type": "xsd:string" }, | ||
{ "@value": "idsc:TRUST_SECURITY_PROFILE", "@type": "xsd:string" } | ||
] | ||
},{ | ||
"leftOperand": "dateTime", | ||
"operator": "gteq", | ||
"rightOperand": { "@value": "2022-06-01T08:00Z", "@type": "xsd:dateTimeStamp" } | ||
},{ | ||
"leftOperand": "dateTime", | ||
"operator": "lteq", | ||
"rightOperand": { "@value": "2022-10-01T08:00Z", "@type": "xsd:dateTimeStamp" } | ||
}], | ||
"duty": [{ | ||
"action": [{ | ||
"rdf:value": { "@id": "idsc:REPLACE" }, | ||
"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" } | ||
}] | ||
}] | ||
}] | ||
} |
19 changes: 19 additions & 0 deletions
19
UsageControl/Contract/Policies/pc1-ids-restrict-consumer-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"@context": { | ||
"ids":"https://w3id.org/idsa/core/", | ||
"idsc" : "https://w3id.org/idsa/code/" | ||
}, | ||
"@type": "ids:ContractAgreement", | ||
"@id": "http://example.com/policy/restrict-data-consumer/12", | ||
"profile": "http://example.com/ids-profile", | ||
"ids:provider": "http://example.com/party/my-party", | ||
"ids:consumer": "http://example.com/ids/party/consumer-party", | ||
"ids:permission": [{ | ||
"ids:target": { | ||
"@id":"http://example.com/ids/data/d1234" | ||
}, | ||
"ids:action": [{ | ||
"@id":"idsc:USE" | ||
}] | ||
}] | ||
} |
22 changes: 22 additions & 0 deletions
22
UsageControl/Contract/Policies/pc1-odrl-restrict-consumer-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"@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/restrict-data-consumer/12", | ||
"profile": "http://www.w3.org/ns/odrl/2/core", | ||
"dc:creator": "Data Provider 123", | ||
"dc:description": "This policy restricts the usage of the data to a specific Data Consumer, regardless of how many connectors they have and without any further usage restriction.", | ||
"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", "distribute"] | ||
}] | ||
} |
35 changes: 35 additions & 0 deletions
35
UsageControl/Contract/Policies/pc10-ids-restrict-duration-offer-example.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"@context": { | ||
"ids":"https://w3id.org/idsa/core/", | ||
"idsc" : "https://w3id.org/idsa/code/" | ||
}, | ||
"@type": "ids:ContractOffer", | ||
"@id": "http://example.com/policy/restrict-data-consumer/12", | ||
"profile": "http://example.com/ids-profile", | ||
"ids:provider": "http://example.com/party/my-party", | ||
"ids:permission": [{ | ||
"ids:target": { | ||
"@id":"http://example.com/ids/data/d1234" | ||
}, | ||
"ids:action": [{ | ||
"@id":"idsc:USE" | ||
}], | ||
"ids:constraint": [{ | ||
"@type":"ids:Constraint", | ||
"ids:leftOperand": { "@id": "idsc:ELAPSED_TIME"}, | ||
"ids:operator": { "@id": "idsc:SHORTER_EQ"}, | ||
"ids:rightOperand": [{ "@type": "xsd:duration", "@value": "P2Y3M"}], | ||
"ids:pipEndpoint":{ | ||
"@type":"ids:PIP", | ||
"ids:interfaceDescription":{ | ||
"@value":"https://example.com/ids/pip/id/dt", | ||
"@type":"xsd:anyURI" | ||
}, | ||
"ids:endpointURI":{ | ||
"@value":"https://consumer.org/pip/ep/dt ", | ||
"@type":"xsd:anyURI" | ||
} | ||
} | ||
}] | ||
}] | ||
} |
Oops, something went wrong.