Standards
The open standards Agri Stack uses, where it uses its own formats, and where a standard exists that is still to be explored.
Agri Stack is built from many OpenG2P components. This page lists, area by area, which open standard each part follows, which components use it, and where no standard is followed.
Components: RP Registry Platform, and the registries built on it: FR Farmer Registry, CSR Crop Sown Registry. Composite the Composite (partner entry point). CM Consent Manager. PM Partner Management. Catalogue (MDS) the catalogues of reference data. AWE Approval Workflow Engine. Plus Keycloak, the Audit Manager, Inji Certify, ODK Central and the cluster's Istio / Nginx.
Used
The standard is followed.
Partly
Followed in large part, adapted, or used as a mapping or inspiration.
Own
Our own format; no standard is applied.
To explore
A standard exists that should be evaluated for adoption.
Supported, not deployed
The software implements the standard, but no deployment turns it on yet (for example, a needed service is not installed).
Data exchange between systems
Registry search API
RP (FR, CSR), Composite
FR and CSR partner APIs; the Composite calling them
DCI (Digital Convergence Initiative) registry API: signed envelope, sync/search, idtype-value and expression queries
Used
Only the synchronous search is offered; DCI's asynchronous search and subscribe/notify are not (subscribe/notify is a TODO). Filters on activity registers (subject_id, crop year, season) are our use of DCI's expression query.
Farmer record
RP (FR)
FR's DCI record (spdci-extensions-dci:Farmer)
DCI / SPDCI farmer data model
Partly
Follows most of the DCI farmer model (personal details, identifiers, family, farm details). DCI defines more detail than is practical to fill; adds FARMER_ID beside the Fayda UIN and declared main_crops.
Crop activity, crop season and season-summary records
RP (CSR)
CSR's DCI records (spdci-extensions-agri:CropActivity, …:CropSeason, …:ActivityAggregate)
—
Own
Our own record types under an spdci-extensions-agri name; not a published DCI extension. To explore: proposing them as a DCI agriculture extension.
Composite partner API
Composite
POST /composite/v1/use-cases/{use_case}/query
Modelled on the DCI envelope (signed header + message)
Own
The body (subject, parameters, consent) and the response's data (shaped per use case) are our own. Publishing a JSON Schema / OpenAPI per use case is a TODO.
Data publishing to subscribers
RP (FR, CSR), Catalogue (MDS), WebSub hub
Registry outgestion (register records and activity events); catalogue notifications (version published / in effect, release published)
Partly
Commons-services now installs a WebSub hub (websub.<baseDomain>, G2P-5770). The registry platform and the catalogue can publish to it, but the catalogue's hub URL (catalogue.websubHubUrl) is still empty by default and the registry platform chart configures none, so nothing is pushed until they are pointed at the hub. Consumers poll meanwhile (catalogue change feed; DCI search). Wiring them is a TODO.
Payload validation
RP (CSR activity types), Catalogue (MDS; list attribute schemas)
Activity types' payloads
Used
Each activity type's payload is a JSON Schema; schema versions are kept per type. The Composite validates use-case files with strict pydantic models (core/models.py, unknown keys rejected), not JSON Schema.
Plausibility rules
RP (activity registers; CSR's rules)
Each activity register's configuration file
Used
Rules (warn or block) over the payload and the context's latest activities, run by a small built-in evaluator. Output records per format are Jinja templates (our own); DCI is one format.
Network discovery
OAN network layer (not an OpenG2P component)
OAN network layer
Used (outside the registries)
Only for discovering service providers and consumers; never for registry data.
Security, identity and trust
Request signatures
Partners, Composite, RP (FR, CSR partner APIs), PM (keys)
Partner → Composite → registries; responses
JWS (RFC 7515), detached, over {header, message}
Used
Public keys
PM, CM
Partner Management
JWK / JWKS (RFC 7517); SPKI PEM
Used
CM publishes the key that signs its consent tokens at /.well-known/jwks.json.
Service keystores
Composite, CM
The Composite's and CM's signing keys
PKCS#12
Used
Staff and service authentication
Keycloak; RP, PM, CM, Catalogue (MDS), AWE, Composite
Keycloak
OAuth 2.0, OpenID Connect
Used
Client credentials for service-to-service admin calls.
Transport
Istio (cluster)
Cluster
TLS; mutual TLS inside the mesh (Istio)
Used
National identity
RP (FR), Composite, CM
Farmer subject
Fayda (Ethiopia's national ID, built on MOSIP) FAN
Used
The FR farmer ID (FR-…) is our own identifier, linked to the FAN.
Certificates
RP (agent portal), Inji Certify
VC issuance (agent portal, Inji Certify)
Used
See VC issuance.
Credential status
Inji Certify, RP
Revoking a credential when its record changes
Partly
Certify keeps a status list; using it when the source record is changed or corrected is an open item.
Consent and data-share policy
Consent object
Partners, Composite, CM, RP
Partner → registries, validated by CM
JWT (RFC 7519) signed as JWS; JSON-LD @context
Partly
The claims (subject_id, purpose, grants, validity, jti, …) and the JSON-LD vocabulary are OpenG2P's own.
Consent records and receipts
CM
CM
Kantara Consent Receipt v1.1; ISO/IEC TS 27560 (consent records); ISO/IEC 29184 (online privacy notices and consent)
Used
The Consent Manager's consent receipt document (signed when a consent is approved, part of the partner's downloaded consent record) follows them. See CM standards and best practices.
Consent artefact semantics
CM
CM
DEPA / Account Aggregator (granular, revocable, time-bound, fetch semantics)
Used
Data-subject rights
CM
CM
GDPR principles (purpose limitation, minimisation, access, withdrawal)
Used
Purposes
CM, Composite
CM policies, use cases
W3C DPV (Data Privacy Vocabulary)
To explore
Purpose codes (e.g. credit-assessment) are our own.
Data-share policies
CM (PM later)
CM today, PM later
To explore
Policies are our own model (allowed scopes, purposes, subject ID types, validity).
Consent decision
CM (decision point), RP (enforcement point)
Registry ↔ CM
PDP / PEP pattern (XACML terminology)
Partly
The roles follow the pattern; the /validate API is our own.
Exchange consent tokens
CM (exchange and department roles), Composite
Agri Stack Exchange → department CMs
Compact JWS (RFC 7515), header typ: consent-receipt+jwt; keys published as JWKS (RFC 7517)
Partly
A short-lived consent token (called a receipt in the API and settings), signed by the Exchange CM per registry grant and verified offline by department CMs; in the spirit of OAuth 2.0 token exchange (RFC 8693), not an implementation of it. The claims are our own; sub is an object, so verify the JWS and read the claims rather than using a standard JWT validator. See Exchange consent tokens.
Consent scopes
RP (scope catalogue, enforcement), CM, Composite
Each registry's data scope catalogue
—
Own
Scopes are named, versioned groups of a registry's own fields, independent of DCI or any other output format. To explore: DPV personal data categories.
Catalogues and reference data
Lists (reference data)
Catalogue (MDS), RP
—
Own
Codes are the country's (e.g. CROP_TEFF, SEASON_MEHER); the catalogue APIs and list format are our own.
Lists as concept schemes
Catalogue (MDS)
Public catalogue (/public/datasets/{code}/skos)
W3C SKOS (JSON-LD)
Used
Opt-in: only lists marked public, at published versions. A skos:Concept per entry with skos:notation, language-tagged skos:prefLabel and skos:broader.
Crop and commodity codes
Catalogue (MDS)
CROP_COMMODITY
FAO AGROVOC, FAO Indicative Crop Classification, FAOSTAT commodity codes
To explore
As optional mappings from the country's codes.
Administrative areas
Catalogue (MDS), RP
Catalogues; every activity's location
OCHA COD-AB P-codes (e.g. ET040611)
Used
The Ethiopia country pack's geography; CC BY-IGO licence (see Country Data Architecture).
Shapes
RP (FR), Catalogue (MDS; boundaries in the object store)
FR land parcels; catalogue boundaries (also downloadable per level from the public catalogue)
GeoJSON (RFC 7946)
Used
Boundary features API
Catalogue (MDS)
Catalogue geography
To explore
Today the public catalogue offers a GeoJSON file per level, not a features API.
Query API for BI tools
Catalogue (MDS; public catalogue)
Catalogue datasets
OData (OASIS)
To explore
Lets Excel, Power BI and Tableau query a dataset live. Not needed while datasets are small and CSV/JSON downloads cover it; ODK Central's OData feed is already consumed by CSR's ODK ingestion. Not for registry or partner data (DCI and consent-scoped APIs).
Catalogue dataset descriptions
Catalogue (MDS)
Public catalogue (/public/catalog)
W3C DCAT (DCAT-AP style, JSON-LD)
Used
Opt-in: a dcat:Dataset per public list and for the geography when public, with licence, version and a distribution per format (CSV, JSON, SKOS, GeoJSON). Harvestable by CKAN / DCAT harvesters.
Registry and use-case descriptions
RP, Composite
Registries, use cases
To explore
For describing what each registry and use case offers.
TODO: agricultural data standards for the catalogues
Candidates, by dataset:
Crops and commodities (CROP_COMMODITY)
AGROVOC (FAO); Indicative Crop Classification ICC 1.1 (FAO, World Programme for the Census of Agriculture 2020); CPC / FAOSTAT item codes (UN / FAO); HS codes (WCO); EPPO codes
Crop growth stages (CROP_GROWTH_STAGE)
BBCH scale (BBCH monograph, Julius Kühn-Institut)
Pests, diseases, infestation (INFESTATION_AGENT, INFESTATION_TYPE, CROP_DAMAGE_CAUSE, PEST_CONTROL_ACTION)
EPPO codes (EPPO); IPPC glossary (IPPC / FAO); AGROVOC
Seed varieties and sources (SEED_VARIETY, SEED_TYPE, SEED_SOURCE)
WIEWS (FAO); Crop Ontology (CGIAR); national variety release lists
Livestock types and breeds (LIVESTOCK_TYPE, LIVESTOCK_BREED)
DAD-IS (FAO); AGROVOC
Soil and land (SOIL_FERTILITY)
World Reference Base for Soil Resources (FAO / IUSS); LCCS / ISO 19144 land cover (FAO / ISO)
Agro-ecological zones (AGRO_ECOLOGICAL_ZONE)
GAEZ (FAO / IIASA), alongside Ethiopia's traditional zones (Bereha, Kolla, Weyna Dega, Dega, Wurch)
Irrigation, water, land preparation, sowing, cropping system, means of acquisition (IRRIGATION_*, WATER_SOURCE, LAND_PREPARATION_METHOD, SOWING_METHOD, CROPPING_SYSTEM, MEANS_OF_ACQUISITION)
World Census of Agriculture 2020 concepts and classifications (FAO); AGROVOC
Fertilizer and machinery (FERTILIZER_TYPE, FARM_MACHINERY)
ADAPT (AgGateway); ISO 11783 (ISOBUS); FAO fertilizer classes (FAOSTAT fertilizers by product)
Farm activities and income (SOURCE_OF_INCOME)
ISIC Rev.4 (UN)
Crop condition (CROP_CONDITION)
AGROVOC; national crop assessment scales (e.g. Ethiopian Statistics Service crop surveys)
Units and geography
UCUM; OCHA P-codes (already used); ISO 3166 / UN M49
Cross-cutting
AgroPortal (ontology repository); GODAN; OGC agriculture work
For each dataset, the evaluation should record:
the best-fit standard and the body that publishes it;
how well our codes map to it (exact, partial, none);
whether its licence lets us republish it in the public catalogue;
the decision: keep our codes and publish mappings (as SKOS
skos:exactMatch/skos:closeMatchin the public catalogue), or adopt the standard's codes; then carry it into the country pack.
Records, time and measures
Dates and times
All services
Everywhere
ISO 8601
Used
Calendar conversion (Ethiopian calendar ships)
RP (CSR)
Activity dates, crop years, season windows
—
Own
Our own conversion; season windows follow the CSA Agricultural Sample Survey (Meher, Belg, irrigation).
Units
RP (FR, CSR)
Areas, quantities
—
Own
Hectares and quintals (shipped) by field name (e.g. area_ha, quantity_qt). To explore: UCUM unit codes.
Occurrence lifecycle
RP (activity registers)
Activity registers (active, superseded, voided)
HL7 FHIR statuses (amended, entered-in-error)
Partly
Used as a mapping for our statuses.
Observations
RP (activity registers)
Activity registers
ISO 19156 Observations & Measurements; OGC SensorThings; W3C PROV (provenance)
To explore
Operations
Deployment
All services
All services
Kubernetes, Helm, OCI container images
Used
See the OpenG2P deployment model.
Object storage
Garage (commons); RP, Catalogue (MDS), ODK, Novu, CM
All services
Amazon S3 API
Used
Garage replaced MinIO; services use the S3 API in-cluster at commons-garage:3900. CM keeps consent evidence in bucket consent-evidence.
Audit events
Audit Manager; RP, Catalogue (MDS), CM, Composite emit events
Audit Manager
Used
See Audit Manager.
Distributed tracing
Composite, RP, CM
Composite → registries → CM
To explore
Today hops are linked by the request ID in logs and audit events; no traceparent is sent.
Own formats and standards to explore
In one place, what is our own today and what to evaluate:
Own, with a candidate standard:
crop activity, crop season and summary records: propose as a DCI agriculture extension;
lists (reference data): map crop codes to AGROVOC / FAO classifications (publishing them as SKOS is done: the public catalogue);
purposes and policies: DPV and ODRL;
units: UCUM.
Own, by design:
the Composite's partner API body and response (a JSON Schema per use case is still to be published);
the consent object's claims and the CM
/validateAPI;the calendar conversion (Ethiopian calendar ships).
Hub installed, publishers not wired: WebSub (commons installs the hub; the registry platform and the catalogue publish only once pointed at it).
To explore, not yet used: OGC API – Features for boundaries, OData for BI tools on the public catalogue, DCAT for registry and use-case descriptions (the public catalogue already uses it), ISO 19156 / SensorThings / PROV for observations, W3C Trace Context and OpenTelemetry for tracing, Bitstring Status List for credentials after a record change.
Last updated
Was this helpful?