eclipse-dataspace-protocol-base / DataspaceProtocol

The Dataspace Protocol is a set of specifications designed to facilitate interoperable data sharing between entities governed by usage control and based on Web technologies. These specifications define the schemas and protocols required for entities to publish data, negotiate Agreements, and access data in a data space
https://eclipse.dev/dataspace-protocol-base
Apache License 2.0
4 stars 0 forks source link

Contract termination #15

Closed ununhexium closed 1 month ago

ununhexium commented 1 month ago

Contract termination

This is a proposal to add support for contracts termination in the IDS protocol.

Motivation

One of our clients requested a contract to be terminated before its planned date as set by its policy.

Contracts termination is a mechanism that is available in most contracts, where either party may terminate it under various conditions.

sovity implemented this contract termination here, but it's working as a workaround, and we believe that this feature would be best if available as a standard IDS state.

https://github.com/sovity/edc-ce/tree/main/extensions/contract-termination

But this should be a feature that is supported at the protocol level, as it's a feature common to all contracts, be it physical or virtual.

In real life, these contract termination may be subject to terms and conditions which could be implemented as policies but this is an area that we didn't explore.

Implementation ideas

In principle, we would only need a new transition after the finalized state.

https://docs.internationaldataspaces.org/ids-knowledgebase/v/dataspace-protocol/contract-negotiation/contract.negotiation.protocol#id-1.2-state-machine

Something similar to

---
title: Termination transition
---
stateDiagram-v2
    [*] --> Requested: C
    [*] --> Offered: P
    Requested --> Offered: P
    Requested --> Agreed: P
    Offered --> Requested: C
    Offered --> Accepted: C
    Accepted --> Agreed: P
    Agreed --> Verified: C
    Verified --> Finalized: P
    Finalized --> [*]

    Requested --> Terminated: C/P
    Offered --> Terminated: C/P
    Accepted --> Terminated: P
    Agreed --> Terminated: C
    Verified --> Terminated: P
    Finalized:::new --> Terminated: P/C user termination
    Terminated:::new --> [*]

    classDef new fill:#ff7b06,color:black,font-weight:bold

    class Cancelled new

This could be implemented in a more generic way, as suggested in this conversation:

https://github.com/eclipse-tractusx/tractusx-edc/discussions/1392#discussioncomment-10014438

Related topic

https://github.com/sovity/edc-ee/wiki/Policy%E2%80%90Monitor


Would it be possible to add such a transition directly in the IDS specification such that what is a quasi-ubiquitous IRL contract feature be available for everyone?

ununhexium commented 1 month ago

Moved to https://github.com/eclipse-dataspace-protocol-base/DataspaceProtocol/discussions/17