Skip to content
Registry stack docs v0 · draft

Registry Relay reference

Use this page to look up config keys, source binding options, API routes, auth fields, audit record fields, environment variables, and startup error codes for Registry Relay release tag v0.1.1. This reference is hand-maintained against the upstream source; check linked upstream files for the latest detail. For the shared primitives this reference refers to (auth, audit, OIDC, HTTP security, outbound HTTP, crypto, SD-JWT), see the Registry Platform reference.

Jump to: Environment variables | Auth failure codes | Startup error codes

The config file is a single YAML document. Unknown fields are rejected for most blocks. Source: docs/configuration.md (root shape; every key in the following table is documented there unless otherwise noted).

KeyTypeRequiredPurpose
serverobjectyesHTTP listener addresses, CORS, cache dir, timeouts
catalogobjectyesCatalog title, base URL, publisher, participant_id
authobjectyesAuth mode (api_key or oidc) and credentials
datasetsarrayyesDataset and entity configurations
auditobjectyesAudit sink (stdout, file, syslog) and format
metadataobjectnoPath to a portable metadata.yaml manifest (split config); see docs/metadata.md
vocabulariesobjectnoCustom vocabulary prefix mappings (compact IRIs)
claim_verificationobjectnoHMAC binding key for submitted claim hashing
evidence_verificationobjectnoPer-principal, per-offering rate-limit settings
provenanceobjectnoOpt-in signed Verifiable Credential issuer config
standardsobjectnoFeature-gated standards adapters (SP DCI, PublicSchema)
FieldDefaultPurpose
server.bind0.0.0.0:8080Public data-plane listener
server.admin_bindnot setOptional; not enabled unless configured. Example: 127.0.0.1:8081
server.cache_dir./cacheWritable cache for normalized Parquet and ingest state
server.max_source_file_bytes256 MiBMaximum bytes for any single source file or Postgres snapshot
server.xlsx_max_file_bytes256 MiBMaximum bytes for XLSX files specifically
server.request_timeout30sPer-request timeout
server.cors.allowed_originsempty (deny)Explicit allowed CORS origins
server.trust_proxy.enabledfalseWhether to resolve client IP from X-Forwarded-For

All source bindings are table-level. Table IDs are private and never appear in public API paths. Source: docs/configuration.md sources section.

Set source.type: file and provide source.path.

Formatformat keyKey optionsNotes
CSVformat.csvheader_rowheader_row: 1 when the first row contains column names
XLSXformat.xlsxsheet, header_row, data_rangeUse data_range when the worksheet has surrounding notes
Parquetomit formatn/aLoader infers from .parquet extension; loaded via DataFusion

Supported materialization: snapshot only. Supported refresh modes: mtime, interval, manual.

Set source.type: postgres. Credentials are loaded from the environment variable named by source.connection_env. Source: docs/configuration.md PostgreSQL sources section.

Config keyPurpose
source.connection_envEnv var name holding the PostgreSQL connection string
source.table.schemaDatabase schema name (for structured table sources)
source.table.nameDatabase table name
source.querySingle SELECT or WITH statement (snapshot only; no semicolons; no caller input interpolated)
source.change_token_sqlSQL returning a change token for mtime refresh (snapshot only)
source.connect_timeoutDefault 5s
source.query_timeoutDefault 30s
source.live_max_connectionsDefault 8 (live mode only)

Supported materializations: snapshot (table or query) and live (structured table only). live is not supported for query sources.

SourceMaterializationFiltersProjectionStrong validators
filesnapshotgateway-sidegateway-sideyes
postgres table or querysnapshotgateway-sidegateway-sideyes
postgres tablelivegateway-sidePostgres column pushdown (filter-free scans only)no

Source: docs/configuration.md datasource capability matrix table.

All /metadata/* routes require the caller’s <dataset_id>:metadata scope. They expose caller-scoped views filtered by the authenticated principal’s metadata scopes. They do not grant row, aggregate, evidence-verification, or admin access. Source: docs/metadata.md relay endpoints section; docs/api.md.

PathOutput formatStandardNotes
GET /metadataJSONn/aLanding page; links to other metadata routes
GET /metadata/catalogJSONn/aFull catalog JSON
GET /metadata/dcatJSON-LD (application/ld+json)DCAT 3Base DCAT catalog with distributions and data services
GET /metadata/dcat/bregdcat-apJSON-LDBRegDCAT-AP 2.00Includes CPSV public service nodes, ADMS status, publisher type, spatial coverage
GET /metadata/shaclJSON-LDSHACL CoreNode shapes for entity validation
GET /metadata/policiesJSON-LDODRLODRL Offer documents for datasets visible to the caller
GET /metadata/profilesJSONn/aApplication profile listing
GET /metadata/profiles/{profile}JSONn/aOne application profile
GET /metadata/datasetsJSONn/aDataset listing
GET /metadata/datasets/{dataset_id}JSONn/aOne dataset metadata
GET /metadata/datasets/{dataset_id}/policyJSON-LDODRLDataset-scoped ODRL Offer
GET /metadata/datasets/{dataset_id}/entitiesJSONn/aEntity listing for one dataset
GET /metadata/datasets/{dataset_id}/entities/{entity}JSONn/aOne entity metadata
GET /metadata/datasets/{dataset_id}/entities/{entity}/schemaJSONJSON Schema Draft 2020-12Entity schema (caller-scoped)
GET /metadata/datasets/{dataset_id}/entities/{entity}/shaclJSON-LDSHACL CoreEntity SHACL node shape
GET /metadata/schema/{dataset_id}/{entity}/schema.jsonJSONJSON Schema Draft 2020-12Alternate entity schema path
GET /metadata/ogc/recordsJSONOGC API RecordsDataset catalog records (metadata-only; feature: ogcapi-records)
GET /metadata/ogc/records/{record_id}JSONOGC API RecordsOne catalog record
GET /metadata/evidence-offeringsJSONn/aList of evidence offerings
GET /metadata/evidence-offerings/{offering_id}JSONn/aOne evidence offering

Source: docs/api.md auth-gated routes; docs/metadata.md relay endpoints.

Registry Relay supports two modes: API key and OpenID Connect / OAuth 2.0 (OIDC) resource-server. Exactly one mode is active per deployment. Source: docs/api.md authentication section; docs/configuration.md.

  • Config value: auth.mode: api_key
  • Client sends: Authorization: Bearer <key> or X-Api-Key: <key>
  • Token source: Operator-generated; SHA-256 fingerprint in env var
  • Principal ID: auth.api_keys[].id value
  • Config value: auth.mode: oidc
  • Client sends: Authorization: Bearer <jwt>
  • Token source: External IdP (client credentials or other grant)
  • Principal ID: JWT sub (preferred), then client_id, then azp
FieldPurpose
auth.oidc.issuerCompared verbatim against JWT iss claim
auth.oidc.audienceOne or more accepted aud values
auth.oidc.discovery_urlOIDC discovery document; exactly one of discovery_url or jwks_url must be set
auth.oidc.jwks_urlExplicit JWKS endpoint
auth.oidc.algorithmsAccepted signature algorithms (RS256, ES256, EdDSA; HS* and none are absent)
auth.oidc.jwks_cache_ttlSteady-state JWKS cache TTL (default 10m)
auth.oidc.leewayClock skew tolerance on exp and nbf (bounded at 5 minutes)
auth.oidc.scope_claimJWT claim to read scopes from (default scope)
auth.oidc.scope_mapRename IdP role names to <dataset_id>:<level> Relay scopes
auth.oidc.allowed_clientsOptional allowlist matched against azp/client_id
auth.oidc.token_typesAccepted JOSE typ header values (default JWT, at+jwt)
CodeHTTPMeaning
auth.missing_credential401No Authorization header
auth.malformed_credential401Wrong scheme, empty bearer, or unparseable JWT structure
auth.token_expired401exp claim is in the past (after leeway)
auth.token_not_yet_valid401nbf claim is in the future (after leeway)
auth.token_signature_invalid401JWKS key found but signature did not verify
auth.issuer_mismatch401iss claim does not match oidc.issuer
auth.audience_mismatch401aud claim does not intersect oidc.audience
auth.kid_unknown401Header kid is absent from the JWKS even after one refresh
auth.algorithm_not_allowed401Header alg is not in the configured allowlist
auth.client_not_allowed403azp/client_id is not in allowed_clients
auth.invalid_credential401JWT decode failure not covered by a more specific variant
auth.jwks_unavailable503JWKS fetch failed; the relay cannot verify any token

Source: docs/configuration.md granular failure codes table.

Each completed request produces one JSONL record. Records are emitted to the configured sink (stdout, file, or syslog). Audit records are separate from operational logs. Source: Relay src/audit/mod.rs AuditRecord struct plus Registry Platform audit envelopes.

FieldTypeNotes
tsstringISO-8601 UTC with millisecond precision, trailing Z
request_idstringULID (26 chars Crockford Base32); identical to X-Request-Id response header
principal_idstring or nullStable caller identifier; null only when auth failed before identification
auth_modestring or null"api_key" or "oidc"; null paired with null principal_id
remote_addrstringClient IP (post-proxy when trust policy resolves)
methodstringHTTP method
pathstringPath only; query string is in query_params
endpoint_kindstringBucketed family: health, ready, catalog, dataset, schema, rows, aggregate, aggregate_list, evidence_verification, verify, admin, openapi, other
dataset_idstring or nullResolved from path
entity_namestring or nullResolved from path
table_idstring or nullBacking table when known
relationshipstring or nullRelationship traversed by a nested entity request
aggregate_idstring or nullSet on aggregate requests
offering_idstring or nullEvidence offering ID for verification requests
verification_idstring or nullCorrelation ID for verification requests
verification_decisionstring or nullEvidence-verification outcome when an endpoint produced one
claim_hashstring or nullHMAC binding of submitted claims; never raw claims
evidence_hashstring or nullHMAC binding of evidence metadata; never raw evidence
scopes_usedarray of stringsScopes actually checked for this request
query_paramsobjectRedacted parameter inventory: names and operators, never values
purposestring or nullVerbatim Data-Purpose header value
status_codeintegerHTTP status returned
row_countinteger or nullRows on row reads; group count on aggregates
suppressed_groupsinteger or nullGroups removed or masked by disclosure control
duration_msintegerServer-side handling time in milliseconds
error_codestring or nullStable taxonomy code on 4xx/5xx; null on 2xx/3xx
provenanceobject or nullPresent when the response carried a signed VC; absent for plain JSON

Each audit record is wrapped in a Registry Platform audit envelope with additional fields:

FieldTypeNotes
prev_hashstringSHA-256 of the previous envelope’s JSON content
record_hashstringSHA-256 of this envelope’s JSON content

Source: Relay audit pipeline and Registry Platform audit envelope support.

VariablePurpose
REGISTRY_RELAY_CONFIGConfig file path (overridden by --config flag)
REGISTRY_RELAY_LOG_FORMATtext or json/jsonl for stderr operational logs
RUST_LOGTracing filter level (defaults to info)
<auth.api_keys[].hash_env>sha256:<64 hex> fingerprint of one API key
<source.connection_env>PostgreSQL connection string for a database source
<audit.hash_secret_env>Deployment-specific audit hash secret with at least 32 bytes of random material
CLAIM_VERIFICATION_BINDING_KEYHMAC key for claim hashing; format hex:<64+ hex chars>
<provenance.issuer.signer.jwk_env>JSON-encoded private JWK for VC signing (provenance feature)

Source: .research/registry-relay.md environment variables section; docs/configuration.md.

When metadata.manifest_path is set, startup validates the manifest and all runtime bindings. Failures produce stable log codes. Source: docs/metadata.md validation table; docs/api.md startup codes.

CodeMeaning
metadata.manifest.file_not_foundConfigured manifest cannot be read
metadata.manifest.parse_failedManifest YAML did not deserialize
metadata.manifest.version_unsupportedschema_version is not supported
metadata.manifest.validation_failedManifest failed semantic validation
runtime.binding.dataset_missingRuntime dataset is absent from compiled metadata
runtime.binding.entity_missingRuntime entity is absent from compiled metadata
runtime.binding.table_missingRuntime entity points at an unknown runtime table
runtime.binding.field_missingRuntime field or claim binding is absent from compiled metadata
runtime.binding.filter_missingRuntime filter binding is absent from compiled metadata
runtime.binding.relationship_missingRuntime relationship binding is absent from compiled metadata