Contract negotiation¶
Contract negotiation is the process by which a consumer and a provider reach a binding agreement on the terms of a data transfer. The full state machine and all valid transitions are defined in the IDSA Dataspace Protocol specification. RUN-DSP implements this state machine as specified.
Contract hook¶
At each state transition, RUN-DSP calls the configured contract service via gRPC to determine whether to proceed. This hook is the extension point for policy enforcement.
sequenceDiagram
participant CR as Consumer RUN-DSP
participant PR as Provider RUN-DSP
participant CS as Contract service
CR->>PR: DSP negotiation message (e.g. REQUESTED)
PR->>CS: gRPC — should transition be accepted?
CS-->>PR: Accept / Reject
alt Accepted
PR->>CR: DSP response (next state)
else Rejected
PR->>CR: DSP TERMINATED
end
The Reference Contract Service accepts all transitions without applying any policy logic. For production use, replace it with an implementation that evaluates the actual data sharing policies of your deployment.