Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Reference

All runtime configuration is via environment variables. No config files are required. See .env.example for a ready-to-copy template.


Registry

VariableRequiredDefaultDescription
REGISTRY_MODEYescatalogRegistry backend mode. Current API wiring supports catalog.
REGISTRY_CATALOG_JSONCond.Inline JSON catalog content (string).
REGISTRY_CATALOG_FILECond.Local path to catalog JSON file.
REGISTRY_CATALOG_URLCond.HTTP(S) URL to catalog JSON file.
REGISTRY_ALLOWED_HOSTSYesComma-separated allowed hostnames (e.g. codeberg.org)
REGISTRY_REQUIRE_HTTPSYestrue/false; startup fails if missing or invalid
REGISTRY_CACHE_ENABLEDNofalseEnable artifact caching
REGISTRY_CACHE_TTL_SECSNo300Cache TTL in seconds

Catalog source selection

Exactly one of the following should be set:

  • REGISTRY_CATALOG_JSON
  • REGISTRY_CATALOG_FILE
  • REGISTRY_CATALOG_URL

If none is set, startup fails.

Catalog format

Accepted JSON shapes:

[
  {
    "model": "re-indicators-specification",
    "version": "0.0.3",
    "route_url": "https://codeberg.org/CE-RISE-models/re-indicators-specification/raw/tag/pages-v0.0.3/generated/route.json",
    "schema_url": "https://codeberg.org/CE-RISE-models/re-indicators-specification/raw/tag/pages-v0.0.3/generated/schema.json",
    "shacl_url": "https://codeberg.org/CE-RISE-models/re-indicators-specification/raw/tag/pages-v0.0.3/generated/shacl.ttl"
  }
]

or

{
  "models": [
    {
      "model": "re-indicators-specification",
      "version": "0.0.3",
      "route_url": "https://codeberg.org/CE-RISE-models/re-indicators-specification/raw/tag/pages-v0.0.3/generated/route.json",
      "schema_url": "https://codeberg.org/CE-RISE-models/re-indicators-specification/raw/tag/pages-v0.0.3/generated/schema.json"
    }
  ]
}

Rules:

  • Multiple versions for the same model are allowed.
  • Duplicate (model, version) entries are rejected.
  • Catalog entries must declare explicit per-artifact URLs using route_url, schema_url, shacl_url, owl_url, and openapi_url as needed.
  • At least one artifact reference must be declared in each entry.
  • Artifact references must be directly fetchable runtime URLs to the artifact file itself, not repository HTML pages.
  • route_url is only required for routable model operations; validation-only entries may publish only schema_url, shacl_url, or owl_url.
  • If model or version is omitted, the registry attempts to infer them from declared artifact URLs when they match known CE-RISE Codeberg patterns.
  • Every artifact URL is validated against REGISTRY_ALLOWED_HOSTS.
  • Every artifact URL must satisfy REGISTRY_REQUIRE_HTTPS when enabled.

For SHACL behavior and artifact expectations (shacl.ttl), see SHACL Validation.

Refresh behavior

POST /admin/registry/refresh re-loads the catalog source each time:

  • REGISTRY_CATALOG_URL: re-downloads latest JSON from that URL.
  • REGISTRY_CATALOG_FILE: re-reads the file from disk.
  • REGISTRY_CATALOG_JSON: reuses in-memory inline catalog unless changed by process restart or runtime replacement API.

The in-memory index swap is atomic. If the catalog cannot be loaded/parsed, refresh returns an error and the previous index remains active. If individual model entries fail artifact resolution, refresh succeeds with per-entry errors and loads only successful entries.

IO Adapter

VariableRequiredDefaultDescription
IO_ADAPTER_IDYesAdapter identifier (memory or http in current API wiring)
IO_ADAPTER_VERSIONYesAdapter version (e.g. v1)
IO_ADAPTER_BASE_URLCond.Base URL for the HTTP IO Adapter Service
IO_ADAPTER_TIMEOUT_MSNo5000Request timeout in milliseconds

Notes:

  • IO_ADAPTER_ID=memory: in-process memory store (dev/test).
  • IO_ADAPTER_ID=http: enables crates/io-http; requires IO_ADAPTER_BASE_URL.

Auth

VariableRequiredDefaultDescription
AUTH_MODENojwt_jwksAuth provider mode: jwt_jwks, forward_auth, or none
AUTH_JWKS_URLCond.JWKS endpoint URL (AUTH_MODE=jwt_jwks)
AUTH_ISSUERCond.Expected JWT iss (AUTH_MODE=jwt_jwks)
AUTH_AUDIENCECond.Expected JWT aud (AUTH_MODE=jwt_jwks)
AUTH_JWKS_REFRESH_SECSNo3600JWKS key refresh interval seconds (AUTH_MODE=jwt_jwks)
AUTH_FORWARD_SUBJECT_HEADERNox-auth-subjectSubject header name (AUTH_MODE=forward_auth)
AUTH_FORWARD_ROLES_HEADERNox-auth-rolesComma-separated roles header (AUTH_MODE=forward_auth)
AUTH_FORWARD_SCOPES_HEADERNox-auth-scopesSpace-separated scopes header (AUTH_MODE=forward_auth)
AUTH_FORWARD_TENANT_HEADERNoTenant header name (AUTH_MODE=forward_auth)
AUTH_FORWARD_TOKEN_HEADERNoHeader containing raw token to propagate (AUTH_MODE=forward_auth)
AUTH_ALLOW_INSECURE_NONENofalseMust be true to allow AUTH_MODE=none (unsafe, non-production)
AUTH_NONE_SUBJECTNodev-anonymousSubject injected in AUTH_MODE=none
AUTH_NONE_ROLESNoComma-separated roles injected in AUTH_MODE=none
AUTH_NONE_SCOPESNoSpace-separated scopes injected in AUTH_MODE=none
AUTH_NONE_TENANTNoOptional tenant injected in AUTH_MODE=none

Notes:

  • jwt_jwks is for direct bearer JWT validation in this service.
  • forward_auth is for deployments where an upstream proxy/gateway already authenticated the caller and injects identity headers.
  • none is only for isolated dry runs and requires AUTH_ALLOW_INSECURE_NONE=true.
  • Detailed integration guidance: Authentication.

Server

VariableRequiredDefaultDescription
SERVER_HOSTNo0.0.0.0Bind address
SERVER_PORTNo8080Bind port
SERVER_REQUEST_MAX_BYTESNo1048576Max request body size (1 MiB)

Observability

VariableRequiredDefaultDescription
LOG_LEVELNoinfoTracing filter (e.g. debug, info,tower_http=warn)
METRICS_ENABLEDNofalseExpose /admin/metrics (Prometheus format)

OWL Validation Mode

OWL validation is enabled through the hex-validator-owl adapter in API wiring.

  • Runtime mode: embedded profile checks (no external OWL subprocess required).
  • Activation condition: validator executes when owl.ttl is present in resolved artifacts.
  • Missing owl.ttl: validator skips gracefully and returns passed=true with no violations.
  • Invalid owl.ttl: mapped to validator initialization error.
  • Runtime execution fault: mapped to validator execution error.

Operationally this keeps deployment simple (no extra binaries), but the current path is profile-oriented and not a full generic OWL reasoner.