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

Audience: operators. This page is the reference of every key the server reads; Reloading and replacing content covers the reload, the index roots and the refused artifact.

The server reads one configuration tree at start, in four layers, each over the one before it:

  1. the defaults in the table below;
  2. a TOML file, named by --config <path> or by FERROTERM_CONFIG;
  3. environment variables, one per key: FERROTERM__<SECTION>__<KEY> sets [section] key (FERROTERM__SERVER__LISTEN sets [server] listen), and RUST_LOG sets telemetry.filter;
  4. --set key=value arguments (--set server.listen=0.0.0.0:8080).

A container sets the variables or mounts the file; a host does either in the service unit. The load is strict: an unknown key in the file, a FERROTERM__ variable that names no key, and a value of the wrong type each refuse the start, naming the key or the variable and the closest known name, never the value. Any other variable that starts with FERROTERM_ is left alone, so the console’s FERROTERM_CONSOLE__ and the synchronisation service’s FERROTERM_SYNC__ variables can share the server’s environment. A list key reads a TOML array from the file and a comma-separated list from a variable (FERROTERM__TERMINOLOGY__INDEX=/srv/a,/srv/b).

ferroterm config check reads the configuration the way the server would and prints every key with its value and where it came from (the default, the file, the variable that set it, or --set), with every secret shown as ***. ValueSet/$expand returns at most 1,000 members without count and asks for paging beyond that (too-costly); the limit is not configurable.

[server]
listen = "0.0.0.0:8080"

[admin]
listen = "127.0.0.1:8081"

[terminology]
index = ["/srv/ferroterm/snomed-nl", "/srv/ferroterm/loinc"]
code_systems = ["/srv/ferroterm/codesystems"]
resources = "/srv/ferroterm/resources.redb"

[fhir]
base_url = "https://tx.example.org"

[telemetry]
format = "json"

[usage_report]
state_dir = "/data/state"
deployment = "binary"

[auth.issuer.tx]
issuer = "https://auth.example.org/realms/tx"
audience = ["https://tx.example.org"]

The keys

Key (variable)MeaningDefault
terminology.index (FERROTERM__TERMINOLOGY__INDEX)The artifact directories to serve, one per code system version (a SNOMED CT edition, a LOINC release, an ICD-10 classification, an RxNorm release, or one of the three ICD-11 code systems; the manifest says which). Each holds the store.redb with its store.*.col column files, hierarchy.bin, text.bin, and manifest.json that ferroterm-build wrote. The server opens them read-only and refuses to start when one is missing, damaged, or duplicates another’s system version. A path that holds no manifest.json of its own is an index root: every child directory that holds one is an artifact, and the server lists the root again on every reload (see Index roots).none (the server starts with no code systems)
terminology.code_systems (FERROTERM__TERMINOLOGY__CODE_SYSTEMS)Directories of FHIR CodeSystem resources to serve: a FHIR package’s package/ directory (HL7 Terminology, for example) or a directory of CodeSystem JSON files. Files are read in the FHIR version the directory’s package.json declares, or as R4B when there is none. A resource with content = supplement is applied to the system it supplements and is read and searched as a CodeSystem of its own; the server refuses to start when that system is not loaded. ValueSet resources in the same directories are served by url and version for ValueSet/$expand and ValueSet/$validate-code (without a version, the greatest version answers).none
terminology.resources (FERROTERM__TERMINOLOGY__RESOURCES)The database file holding the CodeSystem, ValueSet, ConceptMap, NamingSystem and Provenance resources clients write through the REST API, and the closure tables $closure maintains. The server creates the file when it does not exist, serves every resource in it exactly as it serves one from terminology.code_systems, and loads them again after a restart. A deployment that names no file refuses every write with a 422 and declares no write interaction in its capability statement. With a file named, the server refuses to start until [auth] names an issuer or turns authentication off (see Authentication).none (the server persists nothing)
terminology.default_language (FERROTERM__TERMINOLOGY__DEFAULT_LANGUAGE)The BCP 47 language used for display when a request names none. A SNOMED CT dialect such as en-US or en-GB selects the language reference set ECL Appendix C names for it; a bare en takes the edition’s English reference sets in ascending SCTID order.en
terminology.ecl_scheme_aliasesThe ECL alternate identifier scheme aliases every SNOMED CT edition answers, each alias (LOINC in LOINC#14394-1) to the SCTID of its identifier scheme concept, compared without case: ecl_scheme_aliases = { LOINC = 30051010000102 }. An alias with no entry is refused as an unknown scheme. A table you set replaces the default. ECL 2.3 defines no alias table and names LOINC#54486-6 only as an example, so this table is FerroTERM’s own design; its one default entry is the LOINC Extension’s scheme 30051010000102 |LOINC code identifier|.{ LOINC = 30051010000102 }
server.listen (FERROTERM__SERVER__LISTEN)The socket address to bind, an IP address and a port; a host name is refused.127.0.0.1:8080 (the container image sets 0.0.0.0:8080)
[server] (FERROTERM__SERVER__<KEY>)The request timeout, the body limit, the drain, the overload bound, the trusted proxies, compression and TLS of both listeners (see The HTTP server).see The HTTP server
admin.listen (FERROTERM__ADMIN__LISTEN)The socket address of the admin listener, which serves POST /reload and nothing else (see Reloading the served set). Every route on it requires the admin scope (see Authentication), and the server refuses to start with it until [auth] names an issuer or turns authentication off. Unset or empty, the server binds no second listener and SIGHUP is the only reload trigger.none (no admin listener)
fhir.base_url (FERROTERM__FHIR__BASE_URL)The URL clients reach this server at, without a version prefix (https://tx.example.org); a trailing slash is dropped. Each version states it as implementation.url in its capability statements, so a client behind a reverse proxy learns the address it should use rather than the socket the process bound. Setting it also adds every served version’s base under this URL to the audiences the write routes accept, beside each issuer’s audience (see Behind a reverse proxy). A deployment that names none states no URL.none
fhir.security_services (FERROTERM__FHIR__SECURITY_SERVICES)The authentication in front of the server, as codes of the FHIR restful-security-service value set (OAuth, SMART-on-FHIR, Basic, Certificates, Kerberos, NTLM). The codes declare what a proxy enforces, in CapabilityStatement.rest.security.service; with an [auth] issuer, SMART-on-FHIR is added to whatever you declare here. Any other code refuses the start.none
[auth] (FERROTERM__AUTH__<KEY>)Who may write and reach the admin listener (see Authentication). Every issuer is an [auth.issuer.<name>] table, beside [[auth.basic.users]] and the [basic_grants] they are granted; a key of [auth] itself can be a variable, such as FERROTERM__AUTH__ENABLED or FERROTERM__AUTH__PRODUCT_SCOPE, and so can a key of a named issuer, such as FERROTERM__AUTH__ISSUER__TX__AUDIENCE.see Authentication
[basic_grants]The scopes and roles each Basic user of [[auth.basic.users]] is granted, one [basic_grants.<user>] table per user-id (see Authentication). A grant naming a user [[auth.basic.users]] does not list refuses the start.none (no Basic user reaches anything)
usage_report.enabled (FERROTERM__USAGE_REPORT__ENABLED)Whether the server sends the usage report to FerroPULSE, true or false. true cannot override CI detection: with GITHUB_ACTIONS or CI set to true or 1, the report is off.true
usage_report.endpoint (FERROTERM__USAGE_REPORT__ENDPOINT)The collector the usage report is posted to: an https URL without credentials, or plain http to a loopback host. The server refuses to start on anything else.https://report.ferropulse.eu/v1/report
usage_report.state_dir (FERROTERM__USAGE_REPORT__STATE_DIR)A writable directory where the server keeps its own state: the usage report’s instance id and the time of its last start report. Without one, or with one the server cannot write, the usage report is off.none (the compose file sets /data/state, on a named volume; the container image sets none)
usage_report.deployment (FERROTERM__USAGE_REPORT__DEPLOYMENT)How the server was deployed, as the usage report states it: helm, compose, binary, or unknown. The compose file sets compose.unknown
telemetry.format (FERROTERM__TELEMETRY__FORMAT)auto, json, or pretty. json writes one object per line (timestamp, level, message, and the fields) for a log pipeline; pretty writes aligned human lines with colour; auto picks pretty when stdout is a terminal and json otherwise. The startup banner prints only with pretty.auto
telemetry.filter (FERROTERM__TELEMETRY__FILTER, or RUST_LOG)The tracing filter. RUST_LOG wins over the file and over FERROTERM__TELEMETRY__FILTER.info,hyper=warn,tower=warn,h2=warn
telemetry.logged_query_parameters (FERROTERM__TELEMETRY__LOGGED_QUERY_PARAMETERS)Further query parameters whose values the request line carries in its query field, beside the system and code fields the server always logs (see Request identifiers). Name only parameters that hold no free text.none
telemetry.environment (FERROTERM__TELEMETRY__ENVIRONMENT)The deployment environment the exported spans and metrics name, such as production (deployment.environment.name).none
[telemetry.otlp] (FERROTERM__TELEMETRY__OTLP__<KEY>)The OpenTelemetry collector the spans and metrics are pushed to (see Telemetry).none (nothing is exported)

The HTTP server

The FHIR listener and the admin listener run the HTTP stack every FerroHEALTH server runs. Each request gets the server’s request id and one line of the request log, and the stack answers these refusals itself, under a FHIR base as an OperationOutcome:

  • a request still running after request_timeout is answered 408 (timeout);
  • a body larger than body_limit is answered 413 (too-long);
  • past max_concurrent_requests, a request waits up to admission_wait for a slot in a queue of at most max_waiting_requests places, and a full queue or an expired wait is answered 503 (throttled) with Retry-After; the health routes are never refused or queued;
  • a handler that fails unexpectedly is answered 500 (exception) with the request id, and the log line names the id and nothing of the failure.

On SIGTERM or SIGINT, readiness turns 503 at once, both listeners keep accepting for drain_delay so a load balancer stops sending requests, then close, and the requests in flight get shutdown_timeout to finish. A connection still open then is dropped, and the server exits.

[server]
listen = "0.0.0.0:8080"
request_timeout = "30s"
body_limit = "1MiB"
drain_delay = "5s"
shutdown_timeout = "10s"
max_concurrent_requests = 512
trusted_proxies = ["10.0.0.0/8"]

[server.tls]
certificate_file = "/etc/ferroterm/tls/server.pem"
key_file = "/etc/ferroterm/tls/server.key"
KeyMeaningDefault
listenThe socket address of the FHIR listener.127.0.0.1:8080
base_pathA path every route of both listeners is served under, such as /terminology: empty, or / followed by segments with no trailing /. The FHIR bases become /terminology/r4 and the others, and the health probe follows.empty
request_timeoutHow long one request may take before it is answered 408."30s"
header_read_timeoutHow long a client may take to send a request head, counted from the head’s first byte; a client that has not sent the whole head by then is disconnected."30s"
idle_timeoutHow long a kept-alive HTTP/1.1 connection may wait for its next request, counted from accept or from its last response; past it the server closes the connection cleanly."2min"
body_limitThe largest request body read before the request is answered 413."1MiB"
drain_delayHow long readiness stays withdrawn on SIGTERM before the listeners close."0s"
shutdown_timeoutHow long the requests in flight may take once the listeners closed. Keep drain_delay plus this below the grace period of the container runtime, so the server exits before it is killed."10s"
max_concurrent_requestsHow many requests are served at once, at least 1; past it a request waits for a slot and is answered 503 once the queue is full or its wait expires. The bound is always on: set the ceiling your deployment holds.256
admission_waitHow long a request past the bound waits for a slot, counted in its latency; "0s" refuses it at once."100ms"
max_waiting_requestsHow many requests past the bound wait at once, first come first served; 0 keeps no queue.256
request_decompressionWhether a request body sent with Content-Encoding: gzip or br is decoded before a route reads it. On, body_limit holds the decoded bytes too, any other coding is answered 415, and a body that does not decode 400.false
retry_afterHow long a 503 past the bound tells the client to wait (Retry-After), in whole seconds."1s"
trusted_proxiesThe reverse proxies, each an address or a CIDR block, whose forwarded client address the request log believes. Empty, every request is named by the connection’s peer.none
forwarded_headerThe header a trusted proxy names the client in: forwarded (RFC 7239) or x-forwarded-for.forwarded
compressionWhether a response is compressed with gzip or Brotli when the client accepts one.true
compression_min_sizeThe smallest response body that is compressed."1KiB"
[server.tls]TLS on both listeners (see below). Unset, they speak plain HTTP behind a proxy that terminates TLS.none

A span of time is a whole number and a UCUM unit with no space: ms, s, min, h or d, as in "30s" or "10min". An amount of data is a whole number and an IEC binary unit: B, KiB, MiB or GiB. A bare number is refused, and so are m (the metre in UCUM, so write min) and a decimal unit such as MB.

[server.caller_rate] is refused: FerroTERM applies no per-caller rate limit. Bound the server with max_concurrent_requests, or limit callers at the reverse proxy.

The [server.tls] table:

KeyMeaningDefault
certificate_fileThe certificate chain in PEM, the leaf first.required
key_fileThe private key of the leaf in PEM.required
min_versionThe oldest TLS version spoken, "1.3" or "1.2"."1.3"
client_authWhether a client certificate is asked: none, optional or required.none
client_ca_fileThe CA bundle a client certificate must chain to; required unless client_auth is none, and refused when client_auth is none, the default, so a deployment that sets a CA asks for client certificates.none
reload_intervalHow often the files are read again, a span of time. SIGHUP always reads them again.none
healthcheck_identity_fileThe client certificate chain and key, in one PEM, that ferroterm healthcheck presents to a listener that asks one.none

ferroterm healthcheck asks GET /health/readiness over the same TLS and accepts only the certificate certificate_file holds.

Both listeners, and every outbound client FerroTERM builds, offer the hybrid key exchange X25519MLKEM768 (RFC 10024) first in TLS 1.3, then X25519, P-256 and P-384 for a peer that lacks it, so a session recorded today stays closed to a quantum computer later. Nothing is configured for it. The post-quantum inventory lists every cryptographic use and which ones are post-quantum safe.

Telemetry

The console log, the request log and the /metrics scrape need no configuration. A [telemetry.otlp] table also exports the server’s spans and metrics to an OpenTelemetry collector over OTLP/gRPC:

[telemetry]
environment = "production"

[telemetry.otlp]
endpoint = "https://collector.example.org:4317"
traces = true
metrics = true
sample_ratio = 0.1

[telemetry.otlp.tls]
trust_roots_file = "/etc/ferroterm/collector-ca.pem"
KeyMeaningDefault
endpointThe collector’s OTLP/gRPC endpoint; https:// speaks TLS. It may carry a credential, so config check shows it masked.none
tracesWhether the spans are exported.true
metricsWhether the metrics are pushed.true
sample_ratioThe share of the traces that are sampled, from 0 to 1.1
[telemetry.otlp.tls]The TLS to an https:// collector, the outbound TLS table below. TLS material beside an endpoint that is not https:// refuses the start.none

telemetry.otlp.trust_roots_file and telemetry.otlp.client_identity_file are refused, naming telemetry.otlp.tls.trust_roots_file and telemetry.otlp.tls.client_identity_file.

Every outbound TLS table ([telemetry.otlp.tls], [auth.tls], the tls table of a client credentials grant, and the console’s [oidc.tls]) takes the same keys:

KeyMeaningDefault
trust_roots_fileA PEM file of trust roots the peer’s certificate may chain to, beside the platform’s. A chain to one of them connects only once a revocation check (CRL or OCSP) has cleared it, and the check fails closed when no source answers. FerroTERM keeps the endpoints of the table cleared from the start, and again every 4 minutes, for as long as the client lives.none
trust_roots_without_revocation_fileA PEM file of trust roots for a private PKI that publishes no revocation service. A chain to one of them is trusted with no revocation check, and the start and each connection log that.none
client_identity_fileA PEM file holding a client certificate chain and its key, for mutual TLS.none
client_identityThe same PEM inline, held as a secret; one of the two at most.none
min_versionThe oldest TLS version spoken, "1.3" or "1.2"."1.3"

A chain to a root neither file names goes to the platform’s verifier.

The synchronisation service and the console read the same [telemetry] section from their own files.

Authentication

The server is a SMART App Launch resource server (https://hl7.org/fhir/smart-app-launch/conformance.html) over the FerroHEALTH crate ferrohealth-smart: it checks credentials and never issues one. The read surface stays open. The write routes (POST, PUT and DELETE on CodeSystem, ValueSet, ConceptMap, NamingSystem and Provenance, and POST [base]/$closure) and every route of the admin listener require a credential.

Authentication is on by default and fails closed: a server that names terminology.resources or admin.listen refuses to start until [auth] names an issuer in an [auth.issuer.<name>] table, or says enabled = false. A read-only server with neither starts without [auth].

Each issuer is a table of its own, named by the operator, with its issuer identifier and its audience. An issuer is a SMART App Launch 2.2 authorization server, FerroSMART among them, whose access tokens the server reads from their standard claims; kind = "federation" marks another party’s issuer instead (see Running behind FerroSMART). The name is a lower-case letter followed by lower-case letters, digits and _, at most 64 characters, and every other key that names an issuer, such as described_issuer, uses it. A key of a named issuer can also be a variable, FERROTERM__AUTH__ISSUER__<NAME>__<KEY>; on a network only trusted callers reach, FERROTERM__AUTH__ENABLED=false turns authentication off instead.

[auth.issuer.tx]
issuer = "https://auth.example.org/realms/tx"
audience = ["https://tx.example.org"]

The keys of each [auth.issuer.<name>] table:

KeyMeaningDefault
issuerThe issuer identifier of the authorization server whose access tokens are accepted, an https URL (plain http on a loopback host only). The server reads its metadata (RFC 8414, with OpenID Connect Discovery as the fallback) and its key set before it binds, and refuses to start when either does not answer.none (required)
kindfederation for another party’s issuer, whose tokens name its professionals or its organisation and need an [auth.issuer.<name>.federation] table. Unset for a SMART authorization server, whose tokens are read from their standard claims: a token whose sub is its client_id is a backend service, and any other names a user by its fhirUser. Any other value refuses the start as an unknown variant.none (a SMART authorization server)
[auth.issuer.<name>.profile]Keys over the token checks: token_types (the typ values admitted, at+jwt and application/at+jwt by default, RFC 9068 §2.1), required_claims (the claims every token carries, the RFC 9068 §2.2 set and scope by default) and max_actor_chain (the RFC 8693 §4.1 act nesting admitted, 1). The authorization server’s registry decides which clients reach the server, through the audience it writes, so the table lists no client.none
audienceThe aud values a token may carry; one of them is required (RFC 9068 §4). The write routes also accept every served version’s base under fhir.base_url; the admin listener accepts this list alone, so an issuer that names none opens only the write routes.the served version bases under fhir.base_url; required without it
algorithmsThe signature algorithms accepted: RS256 to PS512, ES256, ES384, EdDSA, and ML-DSA-44, ML-DSA-65 and ML-DSA-87 (RFC 9964); an HMAC algorithm or none refuses the start. post_quantum_only holds the list to ML-DSA.RS256, RS384, PS256, PS384, ES256, ES384 (the three ML-DSA parameter sets under post_quantum_only)
clock_skewThe skew allowed on exp, nbf and iat, at most "5min"."60s"
jwks_max_ageHow long a key set is used before it is read again."10min"
jwks_refresh_intervalThe shortest time between two reads of the key set, so an unknown kid reads it at most once per interval."60s"
jwks_fileA key set file handed over out of band, read in place of the issuer’s jwks_uri.none
timeoutHow long one call to the authorization server may take."10s"
modeHow a bearer token is checked: jwt, as an RFC 9068 JWT against the issuer’s key set, or introspection, by posting it to the issuer’s introspection endpoint (RFC 7662), for an authorization server that issues tokens the server cannot read.jwt
[auth.issuer.<name>.introspection]The introspection check under mode = "introspection": endpoint (the issuer metadata’s introspection_endpoint when empty), cache_max_age (how long an active response is used, at most until its exp; "60s"), cache_capacity (10000), and exactly one of client (the client authentication of the call, with the keys of a client credentials grant: client_id, client_auth, client_secret or client_secret_file, private_key_file) and bearer (a client credentials grant whose token authorizes the call).none
role_claimsThe claims the issuer’s tokens carry roles in, each a dotted path. The server grants nothing by role, so the roles a token carries change no answer.roles, groups, entitlements

The keys of [auth] itself, in the configuration file or as FERROTERM__AUTH__<KEY>:

KeyMeaningDefault
enabledWhether the write routes and the admin listener authenticate their callers.true
product_scopeThe scope the admin listener requires, a string starting with __ or a full URI (SMART App Launch 2.2.0, Scopes and Launch Context, §Extensibility). Anything else refuses the start.__ferroterm.admin
[auth.tls]The outbound TLS table of every issuer’s discovery document and key set, for an issuer behind a private certificate authority: trust_roots_file adds roots to the platform’s, checked for revocation, and trust_roots_without_revocation_file adds roots of a PKI without a revocation service. A file that cannot be read or holds no certificate refuses the start. An introspecting issuer’s calls use the tls table of its own client or bearer grant.none (the platform’s roots)
realmThe realm every challenge names.fhir.base_url, else FerroTERM
scopes_supportedThe scopes the discovery document lists. List only scopes the server honours: “the server SHALL support all scopes listed here”.none (the member is omitted)
capabilitiesSMART capabilities the discovery document adds to the ones it derives.none
described_issuerThe name of the [auth.issuer.<name>] table the discovery document and the capability statement describe, when the server trusts several. Unset, the server describes the one SMART issuer whose metadata it holds, and never a federation issuer. The described issuer gives the rule.none
[[auth.basic.users]]HTTP Basic users (RFC 7617), each a person: user and password_hash or password_hash_file (an Argon2id PHC string). The credential alone: what the user reaches is its [basic_grants] entry, and a scopes or roles key here refuses the start as an unknown key.none (no Basic)
post_quantum_onlyVerify access tokens and DPoP proofs with ML-DSA-44, ML-DSA-65 or ML-DSA-87 (RFC 9964) alone. Every JWT issuer’s algorithms and [auth.dpop] algorithms left at the default become those three, an explicit list of ML-DSA parameter sets is kept, and a list naming any other algorithm refuses the start. An issuer under mode = "introspection" keeps its list, because its authorization server checks the token. Set it once every issuer signs with ML-DSA.false
[auth.basic] cache_ttlHow long a Basic credential that verified is kept, so a repeat request skips the Argon2id key derivation. "0s" verifies every request."5min"

A Basic user’s scopes are granted in the top-level [basic_grants] table, one [basic_grants.<user>] table per user-id with scopes and roles. The scopes decide what the user reaches as a token’s scopes would. A grant naming a user [[auth.basic.users]] does not list refuses the start, and so does a grant of a system/ scope, naming the user: a Basic credential is a person’s.

The described issuer

The SMART discovery document and the capability statement describe one authorization server: a user launch starts at its authorization endpoint, and a backend client takes its tokens from its token endpoint (SMART App Launch 2.2.0, Conformance, Metadata, and Backend Services, Retrieve .well-known/smart-configuration). SMART does not say which of several trusted issuers that is, so ferrohealth-smart fixes one rule for the FerroHEALTH servers, and the order of the [auth.issuer.<name>] tables never decides:

  • With described_issuer, the server describes the issuer of that name once it holds its metadata; a name no table carries refuses the start.
  • Otherwise it describes the one SMART issuer whose metadata it holds. A federation issuer is another party’s and is never chosen unnamed. Several SMART issuers refuse the start, naming them and the key, and so does none: an issuer read from a jwks_file names no endpoints.

The document carries what the issuer’s metadata supports: the authorization endpoint and the launch capabilities when it runs one, and the token endpoint, private_key_jwt and the client credentials grant a backend client needs.

A machine caller, such as the synchronisation service, authenticates with an access token it obtained with the OAuth 2.0 client credentials grant (RFC 6749 §4.4), whose sub is its client_id (RFC 9068 §2.2); the server accepts no static token, and a Basic user is always a person. A configuration file with an issuer and a person on Basic:

[auth.issuer.tx]
issuer = "https://auth.example.org/realms/tx"
audience = ["https://tx.example.org"]

[[auth.basic.users]]
user = "terminologist"
password_hash_file = "/run/secrets/terminologist-password-hash"

[basic_grants.terminologist]
scopes = ["user/CodeSystem.cud", "__ferroterm.admin"]

An authorization server whose access tokens are opaque is read through its introspection endpoint instead. The server reads the issuer’s metadata at the start, takes the endpoint from it (or from endpoint), and refuses to start when the issuer names none. An active response must carry scope, client_id and exp (SMART App Launch 2.2.0, Token Introspection) and is held until its exp and at most cache_max_age; an inactive one answers 401, and an endpoint that cannot answer 503:

[auth.issuer.tx]
issuer = "https://auth.example.org/realms/tx"
audience = ["https://tx.example.org"]
mode = "introspection"

[auth.issuer.tx.introspection.client]
client_id = "ferroterm"
client_secret_file = "/run/secrets/introspection-secret"

A refused credential answers 401 with an OperationOutcome and a WWW-Authenticate challenge that names no claim and no scope, only the stable reason code of the refusal as error_description; a credential that grants no permission for the route answers 403 (RFC 6750 §3.1). The scopes each route requires are in Behind a reverse proxy.

What the server logs

At start: the banner (pretty only), one ferroterm starting line with the version, the served FHIR versions (fhir_versions), and the count of code systems, one serving code system line per loaded version (id, system, version, concepts, languages, path), one listening line with the address and the base path of every served version (bases), and one usage report ON or usage report OFF line (see Usage report). Per request: one request line with method, route, status, latency_ms, the server’s request_id, client_named, and the system, url, version, code, codeA and codeB query parameters the request named, as the fields system, url, version, code, code_a and code_b; bodies and free-text parameters are never logged. A client error logs at warn, a server error at error. On SIGTERM or SIGINT: the signal, then ferroterm stopped. A refused start is one cannot start line with the reason. A configuration the server refuses ends ferroterm serve and ferroterm config check with exit code 78 (EX_CONFIG, sysexits(3)), so an orchestrator tells a bad configuration from a failure to serve; ferroterm healthcheck writes not up with the reason and exits 1. On a reload: the served set was reloaded with the count of code systems, or the served set was not reloaded at error level with the reason.

The registry systems

Four systems ship with the server and are served without configuration: BCP 47 language tags (urn:ietf:bcp:47), BCP 13 media types (urn:ietf:bcp:13), UCUM units (http://unitsofmeasure.org), and ISO 3166-1 country codes (urn:iso:std:iso:3166). The first three are grammars over their registries and cannot be expanded; the fourth is a table from Unicode CLDR. Their data is vendored in the binary.

What a code system version is served as

Each loaded code system version becomes one CodeSystem instance. A resource that carries an id keeps it: the id is the logical id the resource is read by, so a client that knows it reads the resource there (id). The server mints an id only for a version that arrives without a resource, an index built from an RF2 release or a LOINC delivery, for example: the version URI when that URI carries the system (a SNOMED CT edition is snomed.info-sct-<module>-version-<YYYYMMDD>), otherwise the system URL and the version (terminology.hl7.org-CodeSystem-v2-0001-2.0.0), reduced to the FHIR id alphabet. The instance reads at [base]/r4b/CodeSystem/<id>, is found by [base]/r4b/CodeSystem?url=…&version=…, and takes an instance-level operation at [base]/r4b/CodeSystem/<id>/$validate-code. The id is stable for a given version and is listed at startup and in GET /r4b/metadata?mode=terminology.

A ValueSet or ConceptMap in a terminology.code_systems directory becomes an instance the same way: its own id when it has one, else one minted from its url and version. It reads at [base]/r4b/ValueSet/<id> or [base]/r4b/ConceptMap/<id>, is found by [base]/r4b/ValueSet?url=…&version=… or the matching ConceptMap search, and carries that id as its Resource.id in both answers, so a client can read what a search returned. Every served version answers both.

Two ids never compete. An id outside the FHIR id alphabet (at most 64 of A-Z, a-z, 0-9, -, and ., id) refuses the load, and so does a second loaded resource of the same type carrying an id the first one holds, or a loaded id a resource written through the REST API already answers on. The diagnostic names the canonicals involved; the server never renames a resource to make room. From the other side, a PUT or POST onto an id a loaded resource is read at is refused with 409 Conflict, so a client cannot shadow what the deployment serves.

What you do not configure

You do not configure a database connection, a search cluster, or a JVM heap. FerroTERM has none of these: it needs no PostgreSQL or other database server. What it keeps on disk is the built indexes, read at start, and, when you name terminology.resources, one embedded redb file for the resources clients write and the $closure tables. The inputs the server needs are the built indexes and any FHIR resource directories, and you build the indexes offline with ferroterm-build as described in Loading code systems.