Skip to content

Commit

Permalink
replace providerId/consumerId with odrl:assigner / odrl:assignee
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbader-sap committed Feb 6, 2024
1 parent b883a68 commit 4c8ea8a
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 49 deletions.
6 changes: 3 additions & 3 deletions common/schema/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
"dspace:dataset": { "@type": "@id" },
"dspace:transportType": { "@type": "@id" },
"dspace:state": { "@type": "@id" },
"dspace:providerId": { "@type": "@id" },
"dspace:consumerId": { "@type": "@id" },
"dspace:reason": { "@container": "@set" },
"dspace:catalog": { "@container": "@set" },
"dspace:filter": { "@container": "@set" },
Expand All @@ -50,6 +48,8 @@
"odrl:leftOperand": { "@type": "@id" },
"odrl:operator": { "@type": "@id" },
"odrl:rightOperandReference": { "@type": "@id" },
"odrl:profile": { "@type": "@id" }
"odrl:profile": { "@type": "@id" },
"odrl:assigner": { "@type": "@id" },
"odrl:assignee": { "@type": "@id" }
}
}
8 changes: 4 additions & 4 deletions common/shape/odrl-shapes.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ dspace_shapes:AgreementShape
] ;
sh:property [
a sh:PropertyShape ;
sh:path dspace:providerId ;
sh:path odrl:assigner ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/odrl-shape.ttl> (AgreementShape): An dspace:providerId property must point to exactly one Provider Node."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/odrl-shape.ttl> (AgreementShape): An odrl:assigner property must point to exactly one Provider Node."@en ;
] ;
sh:property [
a sh:PropertyShape ;
sh:path dspace:consumerId ;
sh:path odrl:assignee ;
sh:nodeKind sh:IRI ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:severity sh:Violation ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/odrl-shape.ttl> (AgreementShape): An dspace:consumerId property must point to exactly one Consumer Node."@en ;
sh:message "<https://raw.githubusercontent.com/International-Data-Spaces-Association/ids-specification/master/schemas/odrl-shape.ttl> (AgreementShape): An odrl:assignee property must point to exactly one Consumer Node."@en ;
] ;
.
85 changes: 59 additions & 26 deletions negotiation/contract.negotiation.binding.https.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,61 @@

This specification defines a RESTful API over HTTPS for the [Contract Negotiation Protocol](./contract.negotiation.protocol.md).

* [Contract Negotiation HTTPS Binding](#contract-negotiation-https-binding)
* [1 Introduction](#1-introduction)
* [1.1 Prerequisites](#11-prerequisites)
* [1.2 Contract Negotiation Error](#12-contract-negotiation-error)
* [1.2.1 State Transition Errors](#121-state-transition-errors)
* [1.2.2 Object Not Found](#122-object-not-found)
* [1.2.3 Unauthorized Access](#123-unauthorized-access)
* [1.3 Authorization](#13-authorization)
* [2 Provider Path Bindings](#2-provider-path-bindings)
* [2.1 The `negotiations` Endpoint _(Provider-side)_](#21-the-negotiations-endpoint-provider-side)
* [2.2 The `negotiations/request` Endpoint _(Provider-side)_](#22-the-negotiationsrequest-endpoint-provider-side)
* [2.3 The `negotiations/:providerPid/request` Endpoint _(Provider-side)_](#23-the-negotiationsproviderpidrequest-endpoint-provider-side)
* [2.4 The `negotiations/:providerPid/events` Endpoint _(Provider-side)_](#24-the-negotiationsproviderpidevents-endpoint-provider-side)
* [2.5 The `negotiations/:providerPid/agreement/verification` Endpoint _(Provider-side)_](#25-the-negotiationsproviderpidagreementverification-endpoint-provider-side)
* [2.6 The `negotiations/:providerPid/termination` Endpoint _(Provider-side)_](#26-the-negotiationsproviderpidtermination-endpoint-provider-side)
* [3 Consumer Callback Path Bindings](#3-consumer-callback-path-bindings)
* [3.1 Prerequisites](#31-prerequisites)
* [3.2 The `negotiations/offers` Endpoint _(Consumer-side)_](#32-the-negotiationsoffers-endpoint-consumer-side)
* [3.3 The `negotiations/:consumerPid/offers` Endpoint _(Consumer-side)_](#33-the-negotiationsconsumerpidoffers-endpoint-consumer-side)
* [3.4 The `negotiations/:consumerPid/agreement` Endpoint _(Consumer-side)_](#34-the-negotiationsconsumerpidagreement-endpoint-consumer-side)
* [3.5 The `negotiations/:consumerPid/events` Endpoint _(Consumer-side)_](#35-the-negotiationsconsumerpidevents-endpoint-consumer-side)
* [3.6 The `negotiations/:consumerPid/termination` Endpoint _(Consumer-side)_](#36-the-negotiationsconsumerpidtermination-endpoint-consumer-side)
- [Contract Negotiation HTTPS Binding](#contract-negotiation-https-binding)
- [1 Introduction](#1-introduction)
- [1.1 Prerequisites](#11-prerequisites)
- [1.2 Contract Negotiation Error](#12-contract-negotiation-error)
- [1.2.1 State Transition Errors](#121-state-transition-errors)
- [1.2.2 Object Not Found](#122-object-not-found)
- [1.2.3 Unauthorized Access](#123-unauthorized-access)
- [1.3 Authorization](#13-authorization)
- [2 Provider Path Bindings](#2-provider-path-bindings)
- [2.1 The `negotiations` Endpoint _(Provider-side)_](#21-the-negotiations-endpoint-provider-side)
- [2.1.1 GET](#211-get)
- [Request](#request)
- [Response](#response)
- [2.2 The `negotiations/request` Endpoint _(Provider-side)_](#22-the-negotiationsrequest-endpoint-provider-side)
- [2.2.1 POST](#221-post)
- [Request](#request-1)
- [Response](#response-1)
- [2.3 The `negotiations/:providerPid/request` Endpoint _(Provider-side)_](#23-the-negotiationsproviderpidrequest-endpoint-provider-side)
- [2.3.1 POST](#231-post)
- [Request](#request-2)
- [Response](#response-2)
- [2.4 The `negotiations/:providerPid/events` Endpoint _(Provider-side)_](#24-the-negotiationsproviderpidevents-endpoint-provider-side)
- [2.4.1 POST](#241-post)
- [Request](#request-3)
- [Response](#response-3)
- [2.5 The `negotiations/:providerPid/agreement/verification` Endpoint _(Provider-side)_](#25-the-negotiationsproviderpidagreementverification-endpoint--provider-side)
- [2.5.1 POST](#251-post)
- [Request](#request-4)
- [Response](#response-4)
- [2.6 The `negotiations/:providerPid/termination` Endpoint _(Provider-side)_](#26-the-negotiationsproviderpidtermination-endpoint-provider-side)
- [2.6.1 POST](#261-post)
- [Request](#request-5)
- [Response](#response-5)
- [3 Consumer Callback Path Bindings](#3-consumer-callback-path-bindings)
- [3.1 Prerequisites](#31-prerequisites)
- [3.2 The `negotiations/offers` Endpoint _(Consumer-side)_](#32-the-negotiationsoffers-endpoint-consumer-side)
- [3.2.1 POST](#321-post)
- [Request](#request-6)
- [Response](#response-6)
- [3.3 The `negotiations/:consumerPid/offers` Endpoint _(Consumer-side)_](#33-the-negotiationsconsumerpidoffers-endpoint-consumer-side)
- [3.3.1 POST](#331-post)
- [Request](#request-7)
- [Response](#response-7)
- [3.4 The `negotiations/:consumerPid/agreement` Endpoint _(Consumer-side)_](#34-the-negotiationsconsumerpidagreement-endpoint-consumer-side)
- [3.4.1 POST](#341-post)
- [Request](#request-8)
- [Response](#response-8)
- [3.5 The `negotiations/:consumerPid/events` Endpoint _(Consumer-side)_](#35-the-negotiationsconsumerpidevents-endpoint-consumer-side)
- [3.5.1 POST](#351-post)
- [Request](#request-9)
- [Response](#response-9)
- [3.6 The `negotiations/:consumerPid/termination` Endpoint _(Consumer-side)_](#36-the-negotiationsconsumerpidtermination-endpoint-consumer-side)
- [3.6.1 POST](#361-post)
- [Request](#request-10)
- [Response](#response-10)

## 1 Introduction

Expand Down Expand Up @@ -338,8 +371,8 @@ Authorization: ...
"@type": "odrl:Offer",
"@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"dspace:providerId": "urn:tsdshhs636378",
"dspace:consumerId": "urn:jashd766",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
...
},
"dspace:callbackAddress": "https://......"
Expand Down Expand Up @@ -373,8 +406,8 @@ Authorization: ...
"@type": "odrl:Agreement",
"odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23",
"dspace:timestamp": "2023-01-01T01:00:00Z",
"dspace:providerId": "urn:tsdshhs636378",
"dspace:consumerId": "urn:jashd766",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
...
},
"dspace:callbackAddress": "https://......"
Expand Down
Binary file modified negotiation/message/diagram/contract-agreement-message.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions negotiation/message/diagram/contract-agreement-message.puml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class odrl:Agreement {
@id: String
odrl:target : xsd:anyURI
dspace:timestamp : xsd:dateTime
dspace:consumerId : String
dspace:providerId : String
odrl:assignee : String
odrl:assigner : String
}

"dspace:ContractAgreementMessage" "1" *-- "1" "odrl:Agreement" : "odrl:agreement"
Expand Down
4 changes: 2 additions & 2 deletions negotiation/message/example/contract-agreement-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"@type": "odrl:Agreement",
"odrl:target": "urn:uuid:3dd1add4-4d2d-569e-d634-8394a8836d23",
"dspace:timestamp": "2023-01-01T01:00:00Z",
"dspace:providerId": "urn:tsdshhs636378",
"dspace:consumerId": "urn:jashd766",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
"odrl:permission": [{
"odrl:action": "odrl:use" ,
"odrl:constraint": [{
Expand Down
4 changes: 2 additions & 2 deletions negotiation/message/example/contract-offer-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"@type": "odrl:Offer",
"@id": "urn:uuid:6bcea82e-c509-443d-ba8c-8eef25984c07",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"dspace:providerId": "urn:tsdshhs636378",
"dspace:consumerId": "urn:jashd766",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
"odrl:permission": [{
"odrl:action": "odrl:use" ,
"odrl:constraint": [{
Expand Down
4 changes: 2 additions & 2 deletions negotiation/message/example/contract-request-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:offer": {
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"dspace:providerId": "urn:tsdshhs636378",
"dspace:consumerId": "urn:jashd766",
"odrl:assigner": "urn:tsdshhs636378",
"odrl:assignee": "urn:jashd766",
"odrl:permission": [{
"odrl:action": "odrl:use" ,
"odrl:constraint": [{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"@type": "dspace:ContractAgreementMessage",
"dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab",
"dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833",
"dspace:consumerId": "...",
"dspace:providerId": "...",
"dspace:agreement": {
"@id": "some-other-id",
"@type": "odrl:Agreement",
"odrl:target": "urn:uuid:3dd1add8-4d2d-569e-d634-8394a8836a88",
"odrl:assignee": "...",
"odrl:assigner": "...",
"odrl:permission": [
{
"@id": "some-permission-id",
Expand Down
11 changes: 5 additions & 6 deletions negotiation/message/schema/contract-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
},
"AbstractPolicyRule": {
"properties": {
"dspace:providerId": {
"odrl:assigner": {
"type": "string"
},
"dspace:consumerId": {
"odrl:assignee": {
"type": "string"
}
},
Expand Down Expand Up @@ -100,7 +100,7 @@
]
}
],
"required": [ "@type", "dspace:providerId" ]
"required": [ "@type", "odrl:assigner" ]
},
"#/definitions/Offer": {
"type": "object",
Expand Down Expand Up @@ -154,9 +154,8 @@
"@type",
"@id",
"@target",
"dspace:providerId",
"dspace:consumerId",
"dspace:timestamp"
"odrl:assignee",
"odrl:assigner"
]
},
"RuleClass": {
Expand Down

0 comments on commit 4c8ea8a

Please sign in to comment.