In this section: Build
Start
Reference code
- obsp (C)
- Conformance runner (reference service)
- obsp (Go)
- Plugfests (non-normative groundwork)
- Python reference pipelines (draft profiles, synthetic data)
- obsp-eo
- obsp-model-run (draft OIP-0012, MODEL-OBSERVER)
- obsp-sensing (draft OIP-0011, NETWORK-SENSING, provisional)
- obsp-space
- Rust reference workspace
- Performance bench (WP-RI-11)
- The 0.2 candidate (DRAFT)
- obsp-core (Rust reference library)
- obsp-federation
- obsp-node-embedded
- Node agent (obsp-node)
- Evidence verifier (obsp-verify)
- obsp-sdk (TypeScript / ES modules)
Tools
API reference
- All APIs
- Observatory Protocol service administration (production services)
- Observatory Protocol CloudEvents (draft OIP-0024 binding)
- Observatory Protocol correction subscriptions
- Observatory Protocol credential status (reference service)
- Observatory Protocol discovery (reference service)
- Observatory Protocol exchange API (reference)
- Observatory Protocol federation sync (draft OIP-0004)
- Observatory Protocol Field Topic Contract (MQTT 5 and Sparkplug B)
- Observatory Protocol participant gateway
- gRPC services
- Observatory Protocol implementations and conformance registry (reference service)
- Observatory Protocol transparency log (reference service)
- Observatory Protocol WIS 2.0 notifications (draft OIP-0009 binding)
Public services
Bindings and crosswalks
Node agent (obsp-node)
| Field | Value |
|---|---|
| Status | Reference code; no conformance claim |
| Version | 0.0.1 |
| Source | Rust reference workspace |
input adapter records.rs outbox.rs lib.rs (flush)
JSON lines --\ POST
>-- Reading -> QC (RANGE, STEP) -> observation -> replay batch -> append -> attempt -----> gateway
Sparkplug --/ (passport time-quality, provenance, (batchId = + fsync line, /node-ingest/
JSON (draft in force) quality-flag records; digest of settled on v0.1/replay-
OIP-0007) OIP-0008 envelope on each the cut) any answer batches
observation; key record and
passports published once
cargo run -p obsp-node -- run --config obsp-node/tests/data/node.json --input obsp-node/tests/data/readings-1.jsonl \
--gateway http://127.0.0.1:8080 --root ../..
cargo run -p obsp-node -- replay --config obsp-node/tests/data/node.json --gateway http://127.0.0.1:8080
cargo run -p obsp-node -- status --config obsp-node/tests/data/node.json
cargo run -p obsp-node -- apply-plan --config <node.json> --plan <plan.json> [--now <rfc3339>]
(The sample configuration writes its outbox next to itself; copy obsp-node/tests/data/ somewhere else to try it.)
Exit status: 0 every batch settled and every event acked; 1 an event or a plan was refused; 2 a usage, configuration
or input error; 3 batches remain queued because the gateway did not answer.
- Configuration (
src/config.rs): the node manifest and every sensor passport are validated against the live schemas and the passports must name the manifest’s node. The signing key is read from a file (32-byte seed in hexadecimal);obsp-node/tests/data/node-key.hexis a test key whose seed is derived from a public label. - Adapters (
src/adapters.rs): JSON lines (passportUni,property,resultTime,value,resultState; a null value isMISSING, never zero) and decoded Sparkplug B payloads as JSON per the draft binding of OIP-0007 (native id from the topic, the connector mapping’s fields and quality table,seqmodulo 256 per edge node with gaps recorded, NDEATH only for the current birthbdSeq, transient and unmapped metrics never in a result, STATE and commands never converted). Missing-data records and unmapped fields go to the run summary, not into observation records (theirconnector-outputcontract is a draft). Protobuf decoding is not done. - Records (
src/records.rs): observation records of the live schema (3.1.0) with inline quality flags, a time-quality record per batch from the declared clock source, a PROV-O provenance record per batch (raw input lines used by one acquisition activity of the node’s software agent), quality-flag records for every SUSPECT or BAD flag of the node’s own tests, references by UNI and RFC 8785 digest. Each observation carries an OIP-0008 draft envelope (Ed25519, object classobservation); the liveobservation-recordschema refuses asignaturemember today, so the gateway andobsp-verifycheck signed observations without the member against the live schema and the member against the draft envelope schema. The STEP limit comes from the passport’sextensions."obsp.qc".rateOfChange, a convention of this agent. With the featureobsp-0.2and"recordVersion": "4.0.0"the observation follows the OIP-0006 shape of the 0.2 series, with origin and subject class (checked against the series’ schema); a gateway refuses those records unless it serves the 0.2 candidate (see “The 0.2 candidate”). - Outbox and replay (
src/outbox.rs): every batch is appended and flushed to disk before it is sent; each transmission is recorded first (attempt), and any HTTP answer settles the batch (5xx and no answer leave it queued). The batch is a livereplay-batch;batchIdis the digest of its ordered event ids and payload digests, so a retry keeps it, andattemptnever changes an event id or payload digest. Each request carries anObsp-Request-Contextand anIdempotency-Key(rb-<batch>-a<attempt>). - Signed plans (
src/plans.rs): the node-side decision of the draft OIP-0003 (rollback and replay, expiry, threshold with distinct root-listed keys, mix-and-match, freeze, root chaining, the reservedtaskingkind), returningOBS-PLAN-0001to-0007before any state change. Beyond the draft’s reference decision, a signature counts only when its COSE_Sign1 signature verifies over the role’s payload.apply-planrefuses without a trusted root (trustedRoot, standing in for the bootstrap bundle member the draft leaves open) or without trusted time, and writes its trusted state only on acceptance. Every node vector of the draft gives its listed codes (obsp-node/tests/vectors/oip-0003/, copied).
Node intake of the gateway (feature ingest)
No operation of the gateway OpenAPI carries observations from a node, so the intake is a reference aid under its own
base path, /node-ingest/v0.1, and not a protocol contract:
| Route | What it does |
|---|---|
POST /replay-batches |
a live replay-batch with the rules of every consequential call (RequestContext, Idempotency-Key, media type, schema, idempotent replay, answer validated, store flushed first); the context’s tenant must be the batch’s. Per event: ACCEPTED; IDEMPOTENT_REPLAY (same id, same payload digest); CONFLICT (same id, other digest; never acked); REJECTED (payload digest not the RFC 8785 digest of the payload, unknown event type, payload failing its schema, a key record naming another controller than the batch’s node, or a signature that does not verify against the node’s key records received so far). Answer: a live replay-batch-result |
GET /records |
the stored events in arrival order (nodeUni, eventType, limit, offset), without payloads |
GET /records/{eventId} |
the payload exactly as received, ETag its digest |
Event types: observatory.node.observation.recorded, .timequality.recorded, .provenance.recorded,
.qualityflag.recorded, .passport.published, .key.published. Accepted events are written to the gateway’s store
(and its file) like every other write. The intake appraises nothing and enrols nothing; the claims stay
REPLAY_BATCH_NOT_AUTHORITY and REPLAY_BATCH_RESULT_NOT_READINESS.
Usage policies (feature policy, draft OIP-0014)
Off by default; built with --features policy and switched on with --policy-dir <dir> (policies and consent
records, each validated against the copied OIP-0014 schemas; --default-policy <uni> for records that name none).
Then every event payload of an intake batch, every record read back (GET /node-ingest/v0.1/records/{eventId}) and
every observation served as an exchange item is decided by the obsp-policy enforcement point. The request attributes
come from the RequestContext’s extensions["obsp.policy"] (purpose, recipient class, region, aggregation, consent
references, community approval; the action defaults to use, the time to the gateway’s clock); without them the
request is denied (OBS-GOV-0001, deny by default). A record names its policy at extensions["obsp.policy"]
(policyUni or target; an exchange item falls back to its product’s policy) and its sensitivity flags at
extensions["obsp.policy"].flags. These are NON-normative reference conventions (see the open questions in
obsp-policy/README.md).
A refusal answers 403 with a problem document valid against error-problem: category POLICY_DENIED, errorCode the
first OBS-GOV code, one violation per reason naming its rule (field the requirement id, code the reason code) and
policyDecisionRef the decision’s UNI. A refused intake batch stores nothing; an observation a flag withholds is left
out of an item list and refused when asked for alone (OBS-GOV-0007). Tests: obsp-gateway/tests/policy.rs.