In this section: Learn
Guides
- Guide: choosing and implementing a binding
- Guide: OBSP-COMMUNITY (COMMUNITY)
- Conformance guide
- Guide: OBSP-CONSTELLATION (CONSTELLATION)
- Guide: OBSP-CONSUMER
- Guide: the exchange plane (reference implementation)
- Guide: OBSP-GRID
- Implementers guide
- Guide: OBSP-MOBILE (MOBILE)
- Guide: OBSP-MODEL-OBSERVER (MODEL-OBSERVER)
- Guide: OBSP-NETWORK-SENSING (NETWORK-SENSING, provisional)
- Guide: OBSP-NODE
- Guide: operating the reference stack
- Operators guide
- Guide: OBSP-PROVIDER
- Python SDK: the 0.2 candidate mode (DRAFT)
- Release guide
- Guide: OBSP-SITE
- Guide: OBSP-SOV (operator sovereignty overlay)
- Start here: from a clone to a checked evidence set in 30 minutes
- Guide: the web front ends
Domain packs
- All domain packs
- Agriculture: fields, crops, livestock and stored grain
- Air quality: reference monitors and sensor networks
- Cryosphere: snow, glaciers, permafrost, sea and lake ice
- Greenhouse gases and methane: in-situ, flux and remote sensing
- Health (One Health): environment, animals and people
- Hydrology: river, lake, groundwater and water-quality stations
- Infrastructure: structural health of bridges, dams, tunnels and buildings
- Meteorology: surface synoptic and climate stations (GBON-oriented)
- Ocean: moorings, buoys, profiling floats and coastal stations
- Seismology and geodesy: seismometers, strong motion, GNSS and InSAR
- Space weather: geomagnetism, ionosphere and the solar wind
Participants
- Non-profits, humanitarian organisations, communities and citizen networks
- Device makers
- Enterprises and infrastructure owners
- Governments, agencies and utilities
- Individual experts, developers and students
- United Nations agencies and intergovernmental organisations
- National consortiums, national standards councils and national hosts
- Universities, observatories and research networks
- Managed-service and technology providers
Security and privacy
- Threat note: obsp-mcp (reference Model Context Protocol server)
- Threat note: credential status publisher (reference service)
- Threat note: discovery (reference service)
- Threat note: production public services
- Threat note: implementations and conformance registry (reference service)
- Threat note: transparency log (reference service)
- Supply chain: controls and current status
- Threat model of the Observatory Protocol (version 2)
- Privacy assessments
- Draft privacy impact assessment: COMMUNITY profile (OIP-0017)
- Draft privacy impact assessment: MOBILE profile, person-carried case (OIP-0013)
- Draft privacy impact assessment: NETWORK-SENSING profile (OIP-0011)
- Privacy impact assessment template
Pilot kits
Operations
- Operations
- Capacity scaling
- Capacity plan
- Chaos and resilience experiments
- Data plane
- Deploy
- Error-budget policy
- Game days
- Game day: clock skew
- Game day: disk full
- Game day: federation partition and rejoin
- Game day: replica loss
- Game day: slow or unreachable database
- Incident response
- Key rotation and compromise recovery
- Load and soak testing
- Observability conventions
- Offline site operation
- What the owner must decide
- Restore
- Rollback
- Service-level objectives
- Static web sites
- Supply chain and release hardening: the checks
- Variables
Python SDK: the 0.2 candidate mode (DRAFT)
The obsp package (sdk/python) validates documents against the live obsp/0.1 schemas, computes RFC 8785 digests and runs
the conformance suite. That behaviour is the default and does not change. This guide covers the opt-in 0.2 candidate
mode, obsp.candidate, which brings the Python SDK level with the TypeScript SDK (reference/typescript/obsp-sdk) and the
Rust verifier for the draft proposals.
Every proposal is a DRAFT. Nothing in obsp.candidate is part of the protocol until the editors accept the proposals, and
nothing in it makes a conformance claim: a result describes the documents checked, never an implementation.
Install
python3 -m pip install -e 'sdk/python[candidate]' # from the repository root; the extra adds the cryptography package
The default package needs only jsonschema and PyYAML. The candidate mode needs cryptography for signatures (Ed25519,
ECDSA P-256 and P-384, and ML-DSA when the installed version offers it). Without it the default commands work as before
and a candidate command says which package is missing. The package is typed (py.typed).
What is in it
| Module | What it does |
|---|---|
obsp.candidate.objects_02, objects_05, objects_drafts |
dataclasses for every schema of the 0.2 candidate (46), of the 0.5 series end state (66) and of the schemas the drafts outside the series add (7), generated from the JSON Schemas |
obsp.candidate.signature, algorithms |
signature envelopes (OIP-0008): sign and verify, the algorithm register, the payload rules |
obsp.candidate.draft_checks (and proofs, plans, observation, mobile, triggers, coverage) |
the 23 checks the drafts define |
obsp.candidate.verify |
a set of documents: schemas, identifiers, digests, signatures, references and the draft checks |
obsp.candidate.compact |
compact CBOR (OIP-0027): the key tables and the converter in both directions |
obsp.candidate.triggers |
the OIP-0018 trigger evaluator |
obsp.candidate.schemas |
the bundled candidate schemas (CandidateSchemas) |
Typed objects
from obsp.candidate import objects_02 as o
record = o.SCHEMAS["observation-record"].from_dict(document) # a dataclass; nested objects are dataclasses too
record.observer.class_ # a member named like a Python keyword gets a trailing underscore
record.to_dict() == document # the document comes back; unknown members are kept where the schema allows them
The classes check nothing: validation is the schema’s (obsp verify, or CandidateSchemas("0.2").validate(name, document)).
A required member that is missing is a ValueError; from_dict(..., strict=True) also refuses a member a closed schema does
not allow. An optional member that is absent is None and is left out again by to_dict, so an explicit null is not kept.
The classes and obsp/candidate/data/schemas.json are generated from the integration series (oips/integration/0.2,
oips/integration/0.5) and the drafts, which are applied to a temporary copy of the files they touch, so the tree is never
changed:
python3 tools/gen_python_objects.py # rewrite the generated files
python3 tools/gen_python_objects.py --check # exit 1 when a file is stale (a test runs the same comparison)
Regenerate after a schema, draft or series change. The generated files carry no hand edits.
Signatures
from obsp.candidate.signature import sign_envelope, verify_envelope, public_jwk
signed = sign_envelope(document, secret_bytes, "ed25519", "uni:key:example-1", payload_rule="integration-0.2")
result = verify_envelope(signed, [key_record], object_class="receipt", payload_rule="integration-0.2")
result.status, result.code # 'valid' | 'invalid' | 'unavailable', and OBS-SIG-0001 to OBS-SIG-0008 on failure
A COSE_Sign1 (RFC 9052) with a detached JCS payload, as the OIP-0008 draft describes. Two payload rules (SIG-2): oip-0008
(the default, the draft as written: the payload leaves out signature) and integration-0.2 (the 0.2 series, which adopts
OIP-0002’s proposal that it also leaves out transparencyReceipt; OIP-0002’s open question 2 stays open). Algorithms:
ed25519, es256, es384, and ml-dsa-44, ml-dsa-65, ml-dsa-87 when cryptography provides them; otherwise the result
is unavailable, never valid. Keys are resolved against key records by UNI or RFC 7638 thumbprint. The failure codes and the
order of the checks are those of the TypeScript SDK, and the 18 published vectors give their stated results.
The 23 checks
run_draft_checks(items) takes documents with the schema each was detected as and returns one row per subject document and
check: PASS, FAIL, or INCONCLUSIVE when the set lacks a document the check needs (or, for PRV-6, when a location proof has fewer
than two independent sources). The ids, requirement ids and verdicts are those of the TypeScript SDK.
| Check | Draft | Requirements | Where |
|---|---|---|---|
proof-challenge-window |
OIP-0002 | PRV-1 | 0.2 series |
proof-receipt-bound-to-challenge |
OIP-0002 | PRV-2, PRV-3 | 0.2 series |
proof-challenge-not-replayed |
OIP-0002 | PRV-4 | 0.2 series |
verification-report-inputs-match |
OIP-0002 | PRV-9, PRV-5 | 0.2 series |
location-proof-independent-sources |
OIP-0002 | PRV-6 | 0.2 series |
time-proof-trusted-time-quality |
OIP-0002 | PRV-7 | 0.2 series |
eo-custody-chain-linked |
OIP-0002 | PRV-8 | 0.2 series |
transparency-receipt-binds-statement |
OIP-0002 | PRV-10 | 0.2 series |
plan-threshold-signed |
OIP-0003 | ORCH-3, ORCH-6 | 0.2 series |
plan-metadata-consistent |
OIP-0003 | ORCH-4 | 0.2 series |
plan-version-unique |
OIP-0003 | ORCH-1 | 0.2 series |
plan-kind-reserved |
OIP-0003 | ORCH-8 | 0.2 series |
plan-not-expired-when-accepted |
OIP-0003 | ORCH-2 | 0.2 series |
plan-timestamp-fresh |
OIP-0003 | ORCH-5 | 0.2 series |
plan-version-monotonic |
OIP-0003 | ORCH-1 | 0.2 series |
receipt-references-plan |
OIP-0003 | ORCH-7 | 0.2 series |
observation-origin-consistent |
OIP-0006 | OBS-3 | 0.2 series |
observation-subject-policy |
OIP-0006 | OBS-4 | 0.2 series |
trajectory-time-ordered |
OIP-0013 | MOB-2 | draft outside the series |
trajectory-speed-plausible |
OIP-0013 | MOB-3 | draft outside the series |
trigger-evaluation-links-definition |
OIP-0018 | TRG-6, TRG-4 | draft outside the series |
trigger-evaluation-reproducible |
OIP-0018 | TRG-7 | draft outside the series |
coverage-chunks-in-manifest |
OIP-0020 | EOP-2 | draft outside the series |
Commands
obsp routes verify, sign, compact and trigger to the candidate mode; every other command goes unchanged to the default
command line (obsp --help names both).
obsp verify --profile 0.2 ./evidence # files or folders of JSON; --json for a report, --brief for no findings
obsp sign doc.json --key key.txt --alg ed25519 --kid uni:key:example-1 --payload-rule integration-0.2 --out signed.json
obsp compact tables
obsp compact encode observation record.json --hex # JSON to compact CBOR (OIP-0027)
obsp compact decode observation record.cbor.hex --hex
obsp trigger evaluate --definition def.json --at 2026-11-01T12:00:00Z records.json
obsp trigger evaluate --definition def.json --check evaluation.json records.json # TRG-7: does the evaluation reproduce?
verifychecks, for each document: JSON, schema (found by_schemaTitle,apiVersion,kind, or by fit), identifier, digests, signature (against the key records in the set, payload ruleintegration-0.2), references between the documents (digest recomputed), and the draft checks. The report has the shape of the web verifier’s. Exit codes: 0 PASS, 1 FAIL, 3 INCONCLUSIVE (a key, a document or an algorithm the set lacks), 2 usage error.--profile 0.2is the only profile.signreads a private key from a file (hex text, or JSON withseedHex: an Ed25519 seed, an EC scalar or an ML-DSA seed). Keep keys out of the command line and out of the tree; the test keys of the OIP-0008 vectors are published and protect nothing.--signer-rolesetssignature.signerRole, which some schemas require.compactconverts between a JSON document and its compact form for the tablesobservation,time-qualityandevidence-batch, and refuses a member the table does not know and a CBOR item that is not deterministically encoded.trigger evaluateprints the reproducible part of an evaluation (definition, basis, window, inputs, excluded, computed, result). Sums are correctly rounded and values are rounded half to even to six places, so the result does not depend on the order of the records. Time counts as trusted only through a time-quality record given with--time-quality.
How the three agree
sdk/python/tests/test_candidate_crosscheck.py runs Node.js on the web verifier’s example sets of the 0.2 mode and on 140
sets each changed in one place, and requires the Python report to equal the TypeScript one: verdict, detected schema, every
check with its status and message key, and the findings of the draft checks. The published signature vectors
(test_candidate_signature.py), the plan vectors of the series and the ten OIP-0018 evaluator vectors
(test_candidate_checks.py) and the OIP-0027 vectors (test_candidate_compact.py) are run against the Python code directly.
The cross-check is skipped when Node.js is not installed.
One difference is on purpose: the TypeScript evaluator throws when a trigger definition has lost a required member, while the Python check reports the evaluation as INCONCLUSIVE.
Limits
- Draft material only: the schemas, the register, the payload rules and the checks follow proposals that may change. The results of the checks describe documents; none of them is a conformance level or a claim about an implementation.
- No pure-Python signature fallback: without
cryptographythere is no signing or verifying, and without ML-DSA in the installed version those vectors are reported as unavailable. - The 0.5 series end state has classes but no profile:
obsp verifyvalidates against the 0.2 candidate only. - The Rust verifier and the TypeScript SDK are separate code; this module is a port checked against them, not a binding.
Tests
make sdk-test # includes the candidate tests (part of make check)
make ts # the TypeScript side, when Node.js is installed