# OIP-0025: Federation and delay-tolerant bindings: Dataspace Protocol, Bundle Protocol version 7 and OGC API - Processes

| Field | Value |
|---|---|
| Status | DRAFT |
| Function | `exchange` (§5.10), `federate` (§5.7), `observe` (§5.5) and `prove` (§5.11); no new function (the register keeps exactly twelve) |
| Requires | OIP-0004 (FederationBinding) and OIP-0014 (usage policy and policy decision) for the dataspace binding, which names their objects as those proposals describe them; OIP-0018 (trigger definitions and evaluations) for the process `obsp-evaluate-trigger`. The patches apply to the current tree on their own |
| Uses | OIP-0006 (the three times `acquiredAt`, `storedAt`, `receivedAt`) for the Bundle Protocol binding; OIP-0008 (signature envelope), referenced by name for the batch seal; OIP-0001 (correction state of a product) |
| Affects | §6 (one paragraph, no key word); new bindings `bindings/dataspace/`, `bindings/bpv7/`, `bindings/ogc-processes/` with three tests; `registers/relations.yaml` (new rows `EXT-DSP`, `EXT-BPV7`, `EXT-OGCPROC`); `registers/implements-edges.json` and `registers/requirements.yaml` regenerated; new cases CT-GRID-120 to CT-GRID-122, CT-NODE-120, CT-CONSUMER-120 and CT-CONSUMER-121 (CT-GRID-121, CT-GRID-122 and CT-NODE-120 automated by replay of the golden examples, `obsp.golden`, `sdk/python/src/obsp/inv_oip0025.py`; the other three manual) with their attestations or replay evidence; the demo-binding helper of `tests/test_validate.py` made independent of the shipped bindings; the attestations of the example set passed to the runner service in its API test |
| Protocol version | obsp/0.1 |
| Last call | 30 days (bindings of existing functions, no new protocol object) unless the editors rule otherwise |

## Problem

Three situations have no binding. Operators in a federation want to offer products to each other through a dataspace, and
OIP-0004 and OIP-0014 give them the binding and the usage policy but not the way a catalog, an offer, an agreement and a
transfer carry them. Nodes on links that are down for days (floats, buoys, remote stations, relays through a satellite)
store and forward batches, and §5.5 requires a durable outbox, but nothing says how a signed batch crosses a
delay-tolerant network, how the three observation times survive it, or what an expiry does to the node's copy. And a
consumer who wants to check a set of documents, or to see a trigger evaluated, has no standard way to ask a service to do
it. Without bindings two operators produce documents a counterpart cannot compare: an offer whose terms differ from the
policy, a delivered batch whose receive time is the creation time of its bundle, a batch removed from the outbox because its
bundle expired, a report whose "pass" hides an unchecked schema.

## Change

### Normative text (§6, one paragraph after the heading)

The paragraph names the three bindings and says that an endpoint or link that names one is held to every requirement of
that profile. It carries no key word, so the requirement index keeps its ids; the binding requirements
(`BND-DATASPACE-01` to `-11`, `BND-BPV7-01` to `-12`, `BND-OGCPROCESSES-01` to `-12`) are the normative content, each with
a conformance case. Each folder follows `bindings/README.md`: `PROFILE.md`, `binding.yaml`, the artefact, at least two
positive and two negative examples, and a test.

| Binding | Standard (edition) | Artefact | Requirements |
|---|---|---|---|
| `bindings/dataspace/` | Eclipse Dataspace Protocol (2025-1, not checked) | `dsp-obsp.schema.json`, `mapping.yaml` | BND-DATASPACE-01 to -11 |
| `bindings/bpv7/` | RFC 9171 Bundle Protocol Version 7 (RFC 9172 BPSec named; not checked) | `mapping.yaml`; payloads checked against `replay-batch` | BND-BPV7-01 to -12 |
| `bindings/ogc-processes/` | OGC API - Processes - Part 1: Core 1.0 (OGC 18-062r2, not checked) | `obsp-processes.schema.json`, `obsp-verify.process.json`, `obsp-evaluate-trigger.process.json`, `mapping.yaml` | BND-OGCPROCESSES-01 to -12 |

### What the bindings decide

1. **Dataspace.** The catalog is a DCAT catalog with one dataset per ProductManifest (`obsp:digest` is the OBSP digest of
   the manifest). The offer is the OIP-0014 usage policy of type Offer, named by uid and digest, its permissions copied
   without change. A catalog served under an OIP-0004 federation binding names the binding by UNI and digest and lists only
   products inside its scope. A withdrawn or recalled product is not offered. Negotiation and transfer move only along the
   state tables of the mapping; an agreement names the offer it accepts and the PERMIT policy decision behind it; a transfer
   starts only from a FINALIZED agreement, lists every record by UNI, version and digest and is COMPLETED only after the
   consumer compared each digest; a correction notice that withdraws a product ends a running transfer in TERMINATED; the
   consumer keeps the agreement id and policy digest with every record.
2. **Bundle Protocol version 7.** A bundle carries one `replay-batch` of its node in the payload block as canonical JSON, and
   a seal block with the batch digest and the signature reference. Source and destination are `dtn` endpoint IDs, the source
   derived from the node UNI. The creation timestamp is the sealing time, which is `storedAt`; `acquiredAt` is the replay
   event's `recordedAt`; `receivedAt` is the receiving gateway's own clock, never a bundle field; the lifetime gives the expiry
   and a bundle that arrives after it is not accepted. A node with no trusted clock sends creation time zero and a Bundle Age
   block, and the receiver marks `storedAt` as estimated. The outbox is the custody: a batch leaves it only when a
   `replay-batch-result` acknowledges it, and after an expiry the node bundles the same batch again with the next attempt
   number. The receiver records the nodes the bundle passed and its hop count; a second delivery is IDEMPOTENT_REPLAY; a
   BPSec integrity block is verified when present and never replaces the seal. The worked example is a float with no link for
   seven days.
3. **OGC API - Processes.** `obsp-verify` takes an evidence set (documents with their declared digests and, optionally, the
   schema each names) and returns a report that recomputes every digest and schema check, with PASS, FAIL or INCONCLUSIVE and
   a fixed claim that it is a check of supplied documents and nothing about their sources. `obsp-evaluate-trigger` takes an
   OIP-0018 definition, records and a time and returns the evaluation, naming the definition by UNI, version and digest,
   listing inputs in order and giving INSUFFICIENT_EVIDENCE, never NOT_MET, below the minimum evidence. Both are synchronous
   and read-only; a client never shows an uncertain result as a pass or a failure.

### Registers

- `registers/relations.yaml`: three new external rows, each naming its binding folder in `artefacts`. No existing row states
  these standards.
- `registers/implements-edges.json` regenerated (44 edges); `registers/requirements.yaml` regenerated (the §5.5, §5.7, §5.10
  and §5.11 requirements gain the new cases; the new paragraph has no key word, so no id changes).

## Compatibility

Additive: three bindings, three relation rows, six cases (three automated, three manual), one non-normative paragraph. No schema of `schemas/json`
changes and no existing record becomes invalid. Three existing tests change: the demo-binding helper of
`tests/test_validate.py` checks the demo alone, so it no longer depends on how many bindings ship (the same hunk as
OIP-0009 and OIP-0019), and the API test of the conformance runner service passes the example set's self-attestations
with its upload, because the manual cases need them. The bindings are `proposed` until this proposal is accepted. The
dataspace binding needs OIP-0004 and OIP-0014 accepted first to move its stand-in documents to their schemas; the process
`obsp-evaluate-trigger` needs OIP-0018 for the same reason.

## Tests

| Requirement | Case | Kind |
|---|---|---|
| BND-DATASPACE-01 to -04, -07, -10 (provider) and -05, -06, -08, -09 | CT-GRID-120 | manual (a negotiation and a transfer between two parties); attested; `tests/test_dataspace_binding.py` |
| BND-DATASPACE-04, -05, -06, -08, -09, -11 | CT-CONSUMER-120 | manual, attested |
| BND-BPV7-01, -03 to -08, -10 to -12 | CT-GRID-121 | automated: replay of the golden delivery records (`binding-replay-bpv7-gateway`); `tests/test_bpv7_binding.py` |
| BND-BPV7-01 to -07, -09 | CT-NODE-120 | automated: replay of the golden bundles and outbox (`binding-replay-bpv7-node`) |
| BND-OGCPROCESSES-01 to -11 | CT-GRID-122 | automated: replay of the golden process descriptions and responses (`binding-replay-ogc-processes-processes`); `tests/test_ogcprocesses_binding.py` |
| BND-OGCPROCESSES-03 to -06, -12 | CT-CONSUMER-121 | manual, attested |

CT-GRID-120, CT-CONSUMER-120 and CT-CONSUMER-121 are manual until the live harness reaches these endpoints; the other three are automated. The case numbers 120 and above leave the lower
numbers to the proposals that use them. Each binding test validates every positive example against its artefact (or the
existing `replay-batch` schema), recomputes what can be recomputed (catalog from its context, batch ids, payload and seal
digests, DTN time, verification reports), checks that every positive example breaks no requirement, and that every
negative example breaks exactly the requirement its file name states.

Negative examples, one broken requirement each: dataspace `offer-without-policy-reference` and
`offer-terms-differ-from-policy` (-02), `catalog-without-federation-binding` and `offer-outside-binding-scope` (-03),
`withdrawn-product-offered` (-04), `negotiation-skips-agreement` (-05), `agreement-differs-from-offer` (-06),
`agreement-without-permit-decision` (-07), `transfer-before-finalized` (-08), `transfer-completed-without-digest-check` and
`transfer-mismatch-accepted` (-09), `transfer-continues-after-withdrawal` (-10), `received-without-agreement-reference`
(-11); Bundle Protocol `source-not-dtn-scheme` (-01), `node-name-not-from-node-uni` (-02), `payload-batch-for-other-node`
(-03), `seal-digest-does-not-match-batch` (-04), `creation-before-event-recorded` (-05), `no-clock-without-bundle-age` (-06),
`accepted-after-expiry` (-07), `received-at-from-bundle-field` (-08), `outbox-pruned-on-expiry` (-09),
`delivery-without-path` (-10), `duplicate-accepted-twice` (-11), `failed-integrity-block-accepted` (-12); OGC API -
Processes `description-unknown-process-id` (-01), `description-untyped-input` (-02), `verify-declared-digest-copied` (-03),
`verify-fail-reported-as-pass` and `verify-unknown-schema-passed` (-04), `verify-claims-certification` (-05),
`evaluate-insufficient-as-not-met` (-06), `evaluate-definition-digest-mismatch` (-07), `evaluate-inputs-unordered` (-08),
`evaluate-starts-an-action` and `description-not-read-only` (-09), `error-not-a-problem-document` (-10),
`description-without-sync-execute` (-11).

## Open questions

1. Every edition, clause, block type number, message and state name, member name, conformance class URI and URL in the three
   bindings is `checked: not checked` against the published texts (Dataspace Protocol 2025-1; RFC 9171, 9172, 9173; OGC
   18-062r2). A person must compare them before any binding leaves proposed status. In particular: the private block type
   range used for the seal block, the CRC rule, and whether Core 1.0 allows the extension members `obsp:readOnly` and
   `obsp:requires`.
2. The dataspace documents of OIP-0004 and OIP-0014 are stand-ins written from those proposals' text. Should the agreement of
   a negotiation be stored as an OIP-0014 `Agreement` and referenced, and how does a product id belong to a federation
   namespace?
3. The seal block carries a signature reference because the envelope is OIP-0008, a draft; the examples are marked
   `EXAMPLE-NOT-SIGNED`. Should the signature be a BPSec integrity block with a security context of its own?
4. `acquiredAt` is taken from the replay event's `recordedAt`, because OIP-0006 times belong to the observation record. Should
   the batch carry the records' own times?
5. How the `replay-batch-result` reaches a node that is still cut off, and whether bundle-layer status reports may trigger an
   earlier re-bundling, are left to the deployment.
6. `obsp-verify` checks digests and schemas only; signatures, proof receipts and trust anchors are operator decisions.
   Should the result word PASS change (for example CONSISTENT) so a report cannot be misread as assurance?
7. `obsp-evaluate-trigger` waits for the OIP-0018 reference evaluator; the test checks the rules that need none. Should the
   binding wait for it and its vectors?
8. The attestations: `cases.patch` creates `conformance/examples/OBSP-GRID/attestations.yaml` (CT-GRID-120 only), which OIP-0001,
   OIP-0002 and OIP-0009 also create, and appends to the OBSP-CONSUMER file. Whichever proposal is accepted later merges the
   entries.

Acceptance needs appointed editors, OIP-0004, OIP-0014 and OIP-0018 accepted first for the stand-ins to move, and a last-call
window. Until then this proposal stays at DRAFT and none of the three bindings exists in the protocol.
