diff --git a/negotiation/contract.negotiation.binding.https.md b/negotiation/contract.negotiation.binding.https.md index 8c51a852..47cac59c 100644 --- a/negotiation/contract.negotiation.binding.https.md +++ b/negotiation/contract.negotiation.binding.https.md @@ -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 @@ -215,10 +248,7 @@ Authorization: ... "@context": "https://w3id.org/dspace/v0.8/context.json", "@type": "dspace:ContractAgreementVerificationMessage", "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", - "dspace:hashedMessage": { - ... - } + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" } ``` diff --git a/negotiation/message/diagram/contract-agreement-verification-message.png b/negotiation/message/diagram/contract-agreement-verification-message.png index f893f547..e3740105 100644 Binary files a/negotiation/message/diagram/contract-agreement-verification-message.png and b/negotiation/message/diagram/contract-agreement-verification-message.png differ diff --git a/negotiation/message/diagram/contract-agreement-verification-message.puml b/negotiation/message/diagram/contract-agreement-verification-message.puml index 26aa557c..8f0ad397 100644 --- a/negotiation/message/diagram/contract-agreement-verification-message.puml +++ b/negotiation/message/diagram/contract-agreement-verification-message.puml @@ -13,11 +13,5 @@ class "dspace:ContractAgreementVerificationMessage" { dspace:consumerPid : String } -class HashedMessage { - dspace:digest : String - dspace:algorithm : String -} - -"dspace:ContractAgreementVerificationMessage" "1" *-- "1" "HashedMessage" : "dspace:hashedMessage" @enduml \ No newline at end of file diff --git a/negotiation/message/example/contract-agreement-verification-message.json b/negotiation/message/example/contract-agreement-verification-message.json index bd824262..38e9ecc9 100644 --- a/negotiation/message/example/contract-agreement-verification-message.json +++ b/negotiation/message/example/contract-agreement-verification-message.json @@ -2,9 +2,5 @@ "@context": "https://w3id.org/dspace/v0.8/context.json", "@type": "dspace:ContractAgreementVerificationMessage", "dspace:providerPid": "urn:uuid:a343fcbf-99fc-4ce8-8e9b-148c97605aab", - "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833", - "dspace:hashedMessage": { - "dspace:digest": "some-hash", - "dspace:algorithm": "SHA-384" - } + "dspace:consumerPid": "urn:uuid:32541fe6-c580-409e-85a8-8a9a32fbe833" } diff --git a/negotiation/message/schema/contract-agreement-verification-message-schema.json b/negotiation/message/schema/contract-agreement-verification-message-schema.json index 7f6fc26d..5c1071d5 100644 --- a/negotiation/message/schema/contract-agreement-verification-message-schema.json +++ b/negotiation/message/schema/contract-agreement-verification-message-schema.json @@ -25,22 +25,9 @@ }, "dspace:consumerPid": { "type": "string" - }, - "dspace:hashedMessage": { - "type": "object", - "properties": { - "dspace:digest": { - "type": "string" - }, - "dspace:algorithm": { - "type": "string" - } - }, - "required": [ "dspace:digest", "dspace:algorithm"] } - }, - "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid", "dspace:hashedMessage" ] + "required": [ "@context", "@type", "dspace:providerPid", "dspace:consumerPid" ] } } } \ No newline at end of file diff --git a/negotiation/message/shape/contract-agreement-verification-message-shape.ttl b/negotiation/message/shape/contract-agreement-verification-message-shape.ttl index f5340422..22404f00 100644 --- a/negotiation/message/shape/contract-agreement-verification-message-shape.ttl +++ b/negotiation/message/shape/contract-agreement-verification-message-shape.ttl @@ -48,33 +48,4 @@ dspace_shapes:ContractAgreementVerificationMessageShape sh:severity sh:Violation ; sh:message " (ContractAgreementVerificationMessageShape): A dspace:consumerPid property must point to exactly one xsd:string value."@en ; ] ; - sh:property [ - a sh:PropertyShape ; - sh:path dspace:hashedMessage ; - sh:node [ - a sh:NodeShape ; - sh:property [ - a sh:PropertyShape ; - sh:path dspace:digest ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:severity sh:Violation ; - sh:message " (ContractAgreementVerificationMessageShape): A ContractAgreementVerificationMessage requires a dspace:hashedMessage which has exactly one dspace:digest property pointing to exactly one xsd:string value."@en ; - ] ; - sh:property [ - a sh:PropertyShape ; - sh:path dspace:algorithm ; - sh:datatype xsd:string ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:severity sh:Violation ; - sh:message " (ContractAgreementVerificationMessageShape): A ContractAgreementVerificationMessage requires a dspace:hashedMessage which has exactly one dspace:algorithm property pointing to exactly one xsd:string value."@en ; - ] ; - ] ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:severity sh:Violation ; - sh:message " (ContractAgreementVerificationMessageShape): A dspace:hashedMessage property must point to exactly one hashed message object."@en ; - ] ; . \ No newline at end of file