Choose what this site may use

This site uses strictly necessary cookies to work and to remember your privacy choices. With your permission it would also load content hosted by other services, such as videos, maps and fonts, which then receive your network address and device data. We do not sell or share your personal information and we run no advertising. Choose Accept all, Reject all or Customise. You can change your mind at any time through Privacy choices at the foot of every page.

  • Always on

    Needed for the site to work and to remember your privacy choices. Always on.

  • Remembers settings you choose, such as the light or dark display, in your browser.

  • Loads videos, maps and other content hosted by other services. Those services receive your address and device data.

Menu Close
In this section: Learn
Start
Guides
Domain packs
Participants
Security and privacy
Pilot kits
Operations
Ecosystem

Guide: OBSP-NODE

Source docs/guides/node.md

On this page
  1. Who it is for
  2. Functions and objects
  3. Walkthrough
  4. What the live tree supports, and what only a draft proposes
  5. Self-test
  6. Common errors

Status: live profile of specification 0.1 (section 7.1). The functions and objects below are in the live tree. Where a draft proposal changes or extends them, the text says so and names the proposal.

Who it is for

Firmware and agent authors: the software on a sensor, a gateway, a radio, an edge computer or a data logger that joins a site, describes its instruments, keeps time, sends observations and applies a signed plan. If you also admit nodes, correct records or verify proofs locally, read the SITE guide after this one.

Functions and objects

Function Specification What the node does Objects (schema in schemas/json/)
join 5.1 proves what it is, receives identity, policy and a first plan node-manifest, attestation-evidence, attestation-result, node-bootstrap-bundle, request-context
describe 5.3 states what each instrument is and how it was calibrated sensor-passport, calibration-record
time 5.4 reports time quality with every observation time-quality
observe 5.5 sends observations store-and-forward, at least once observation-record, event-envelope, replay-batch, replay-batch-result
qualify 5.6 attaches quality flags and provenance quality-flag, provenance
orchestrate 5.8 applies a signed plan, records what it did (it does not compile plans) plan, reconciliation-receipt, observed-state-receipt
exit 5.12 closes its record when decommissioned decommission-record

The cases are CT-NODE-001 to CT-NODE-009 in conformance/cases/OBSP-NODE/. The protocol’s principles apply to every line of firmware: a missing value is a typed state, never zero (P5); a consequential command without a request context is refused (OBS-CTX-0001); no secret is ever inline, only a secret:// reference.

Walkthrough

Set up once (see start here): python3 -m pip install -r requirements.txt && python3 -m pip install -e sdk/python.

  1. Read the contract. Specification sections 4, 5.1 to 5.6, 5.8 and 5.12, then the example set conformance/examples/OBSP-NODE/: one valid document for each object above, with attestations.yaml for the manual cases. Every positive document is also in fixtures/positive/ and every broken one in fixtures/negative/.
  2. Copy the example set and replace it object by object. Evidence files are named <schema-name>.<label>.json; the suite finds the schema from the file’s apiVersion, kind or _schemaTitle, and reports any file it cannot place.
cp -R conformance/examples/OBSP-NODE evidence
obsp validate evidence/node-manifest.example.json --schema node-manifest
  1. Join. Write the node-manifest and the attestation-evidence your node can really produce. A node with a hardware root of trust says so and carries the quote; a node without one marks the root SOFTWARE_ROOT explicitly (see fixtures/positive/attestation-evidence.software-root.valid.json and the negative ...software-root-implicit.json and ...tpm-without-quote.json). The attestation-result is issued by a verifier, never by the node (attestation-result.signed-by-node.json is rejected) and carries a nonce and an expiry.
  2. Describe. One sensor-passport per instrument: device class from the register, units in UCUM, firmware digest, mounting, calibration history. Every observation-record names the passport version it was made with. A calibration-record names its passport by UNI, and a passport’s history lists only records that exist.
  3. Time. Emit a time-quality with every observation. GNSS_ONLY, SYSTEM_CLOCK and UNKNOWN are never trusted time; a spoofing indicator lowers the quality (time-quality.spoofing-suspected-trusted.json is rejected). An unknown offset is a typed state, never 0.
  4. Observe. Write observations to a local durable outbox first, publish at least once with an idempotency key, and absorb duplicates. Record every replay outcome with the vocabulary of replay-batch-result; a gap is recorded, never filled silently.
  5. Qualify. Quality flags come from the controlled vocabulary and always name the test that set them (quality-flag.missing-test-code.json, ...free-text-test-code.json). provenance is PROV-shaped: entities, activities and agents, with roles and no company as an agent role.
  6. Orchestrate. Apply a plan by the smallest reversible step and write an observed-state-receipt; on failure roll back and say so in the reconciliation-receipt. A plan’s executionPermitted stays false: a plan is a proposal, and a node’s own receipts are evidence of what it did, not control authority (plan.execution-true.json is rejected).
  7. Exit. On decommissioning revoke identities, export the owner’s data in an open format and issue a decommission-record with an export manifest, the digest of that manifest and final evidence (decommission-record.proprietary-export-format.json and ...key-retained.json are rejected).
  8. Run the suite on your evidence (next section).

Reference code you can read or run

What Where Command
Python SDK: validate, digest, run the suite sdk/python/ obsp validate, obsp digest, obsp conformance run
TypeScript SDK: canonical JSON, digests, schema validation (browser and Node.js 20+) reference/typescript/obsp-sdk/ make ts
Rust agent: JSON-lines and Sparkplug-JSON input, outbox with replay, passports, time quality, plan decisions reference/rust/obsp-node/ make rust
A gateway for the agent to talk to reference/rust/obsp-gateway/ cargo run -p obsp-gateway from reference/rust
A responder for harness tests, no Rust needed conformance/harness/reference/ see “Self-test” below

The Rust agent is configured by one JSON file; the repository’s test data is a working example: reference/rust/obsp-node/tests/data/node.json. From reference/rust, cargo run -p obsp-node -- run --config obsp-node/tests/data/node.json --input obsp-node/tests/data/readings-1.jsonl --no-send queues the readings in the outbox; status and replay follow. It needs a Rust toolchain (1.87 or later). These crates are reference aids: passing their tests says nothing about your implementation.

What the live tree supports, and what only a draft proposes

Topic Live in 0.1 Only in a draft
Objects and the nine NODE cases yes
Wire contracts for field channels AsyncAPI document schemas/asyncapi/obsp-field.asyncapi.yaml; protobuf package obsp.v1 holds only common.proto so far
Typed units, observed property, feature of interest, geometry, origin, subject class on the observation no OIP-0006
Connector contract and the Sparkplug B binding named in section 6, no binding folder OIP-0007
Signature envelope and algorithm register no signature member on the records OIP-0008
Signed plans, TUF roles, rollback protection (gap G-ORCH-1) plan objects and receipts only OIP-0003
LoRaWAN, OPC UA, NMEA 0183, SDI-12 and WIS 2.0 ingest connectors no OIP-0019

A node built for the drafts keeps working against 0.1 as long as it emits the live shape; see bindings for choosing a field binding. Test a draft by applying its patches to a throwaway copy of the tree (the folder’s README.md lists them in order), never by editing the live tree.

Self-test

obsp conformance run --profile OBSP-NODE --evidence ./evidence --out report.json
obsp conformance run --profile OBSP-NODE --sovereignty --evidence ./evidence   # adds SOV-1 to SOV-10 (see the SOV guide)

The suite prints one line per case and exits 0 when the profile result is PASS, and 1 when a case fails. To test the protocol exchange itself, run the live harness against a gateway you operate:

PYTHONPATH=sdk/python/src:. python3 -m conformance.harness.reference.responder --port 8080      # a test double, shell 1
PYTHONPATH=sdk/python/src:. python3 -m conformance.harness.run --endpoint http://127.0.0.1:8080/obsp/v0.1 --profile OBSP-NODE   # shell 2

The harness reaches only the endpoint you name and runs 21 CT-LIVE- checks on joinNode, describeNode and the other gateway operations. For a NODE run it covers join and describe only, so the result is INCOMPLETE, never PASS; the other functions are checked on documents. The conformance runner service wraps both modes, can sign the report and keeps a hash-chained log.

What a SELF_TESTED claim means. You ran the open suite on evidence you publish, and anyone can rerun it and get the same report (CNF-3). It states a tested scope: the profile, the version and the evidence. It is not a certification, an accreditation or an endorsement, says nothing about safety, security or fitness for a purpose, and the suite does not run your device. Write the claim as a conformance-claim naming the digests of the report and the evidence; the conformance guide has the steps.

Common errors

What you see Cause Fix
schema not recognised (name the file <schema-name>.<label>.json) the suite cannot place a file name it by schema, or set apiVersion and kind
CT-NODE-001 ... evidenceRef.evidenceUni ... names no attestation-evidence in the set the result points at evidence you did not include add the evidence document or fix the UNI
CT-NODE-003 ... names no sensor-passport in the set, or a calibrationHistory entry with no record broken passport and calibration links include both documents; keep UNIs and versions identical
CT-NODE-004 ... no time-quality document or time is trusted while an integrity flag is raised missing time evidence, or trust claimed with a raised flag emit time-quality; lower the trust when a flag is raised
CT-NODE-009 ... no exported files empty export manifest list the exported files in an open format
'testCode' is a required property a quality flag without its test name the test and its version
a gateway answers 400 OBS-CTX-0001 consequential call without a valid request context send Obsp-Request-Context (base64url of RFC 8785 JSON)
a gateway answers OBS-CTX-0002, OBS-IDEM-0002 or OBS-IDEM-0001 idempotency key differs from the context, is missing, or is reused with another body one key per command; resend the same body
a gateway answers OBS-CONTRACT-0001 body does not validate against its schema validate with obsp validate before sending
a gateway answers 403 OBS-JOIN-0001 the attester is not a node, or names another node than the manifest use one node UNI throughout
verifier reports OBS-SIG-0001 to OBS-SIG-0008 a draft OIP-0008 envelope failed (unknown or deprecated algorithm, unresolvable key, digest mismatch, bad signature, wrong class, provisional algorithm, malformed header) only when you use the draft envelope; see the start-here verifier step

The OBS-CTX-0001 code is defined by the specification (4.3). The other gateway codes belong to the reference gateway and the harness and are listed in reference/rust/obsp-gateway/src/problem.rs.