Skip to main content

Data exchange: under which terms?

Finding a dataset is not the same as getting it. This step brings the previous two together: the catalog from step 2 says what's on offer, the credentials from step 1 decide whether you get it.

The idea

Every exchange has two phases, handled by separate components.

  1. Negotiate. The two companies' Control Planes agree on a contract, checked against the provider's policy. When they agree, they start a transfer.
  2. Deliver. The data travels through the provider's HTTP Data Plane, which only serves transfers the Control Planes agreed on.
DECIDE: CONTROL PLANESDELIVER: DATA PLANEAliceControl PlaneCharlieControl Plane1 · request a contract for Charlie HTTPBin2 · policy met, agreement signed3 · start a transfer under that agreementAliceDataspace StarterCharlieHTTP Data PlaneHTTPBinthe backend4 · GET /anythingthe data plane learns about the transfer
Two lanes. The Control Planes decide and keep the paperwork. The Data Plane carries the data, and only for a transfer the Control Planes agreed on.

In the playground every company accepts contracts automatically, so both phases run in a few seconds.

Try it: Alice gets data from Charlie

  1. Open Alice's Dataspace Starter and log in.
  2. In the left menu, click Tester. Under Select Participant, pick Charlie's DID (it ends in tenants:charlie).
  3. Select dataset Charlie HTTPBin. In the list of operations, open GET /anything and click Use operation in Tester.
  4. Click Execute. The status line walks through the diagram above:
Status messageWhere you are in the diagram
Negotiating a contract for the dataset…1 and 2: the Control Planes negotiate
Agreement reached — starting the transfer…3: a transfer starts under the agreement
Transfer <id> started — pulling through the data plane.4: Charlie's Data Plane serves the request

HTTPBin sends your request back, so the response looks roughly like this:

{ "args": {}, "headers": { "...": "..." }, "method": "GET", "origin": "...", "url": "..." }

Try it: Bob's research dataset

Now repeat the exchange with a dataset that has a stricter policy. Bob Research HTTPBin is only for companies that hold the research credential you saw in step 1.

AlicememberCharliememberresearchBob Research HTTPBinpolicy asks forresearch credentialRefusedno agreementAgreementtransfer can start
Same dataset, same request, different credentials. The policy makes the decision, not a person and not the data plane.
  1. In Alice's Tester, pick Bob's DID and dataset Bob Research HTTPBin, choose an operation, and click Execute. The negotiation fails with Could not negotiate a transfer for this dataset.
  2. Open Charlie's Dataspace Starter and do the same. Charlie's Wallet presents the research credential, Bob's Control Plane accepts, and the data arrives.
What the policy looks like

The rule on Bob's dataset is a single constraint:

{
"leftOperand": "tsg:presentationScope",
"operator": "eq",
"rightOperand": "tsg.req.playground-research-partner:1"
}

During negotiation, Bob's Control Plane turns this into a request: "present a PlaygroundResearchCredential issued by the Authority". The rule is configuration, not code, so swapping in a Chamber of Commerce registration or a sector license works the same way.

Look behind the scenes

Every exchange above left records in the Control Plane. Open the participants Control Plane, switch to Alice or Charlie in the profile menu, and look under Negotiations and Transfers. You can also go back to the Tester and try other operations, such as POST /post with a JSON body or GET /status/418.

You have seen the whole flow

StepWhat happened
1. IdentityThe Authority gave each company credentials. Only Charlie is a research partner.
2. DiscoveryAlice found datasets by asking Bob and Charlie directly.
3. Data exchangeAlice got Charlie's data after an automatic negotiation, and was refused Bob's research data. Charlie was not.

Up to here you used companies someone else runs. The last step is optional and technical: deploy your own participant on Kubernetes and exchange data with Alice, Bob and Charlie.

Next: 4. Join with your own participant