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

Every configuration key

This page shows the shipped ferroehr.toml template, ferroehr.default.toml. It holds every key FerroEHR reads, each under its description and set to its default. tools/config-reference generates it from the configuration types, so it matches the server you run.

  • A live line is a key at its default. Change the value to set it.
  • A #? line is a key with no default, a secret, or a key of a table the defaults leave out. Remove the #? marker and the space after it, then fill in the value, to set it.
  • A # [table.<name>] header shows a table you name yourself, with its keys commented out.

Every key can also be set as an environment variable: FERROEHR, then the TOML path with __ between the segments, such as FERROEHR__DATABASE__MAX_CONNECTIONS. The guides under Configuration reference explain the sections.

# @generated by tools/config-reference from the configuration types. DO NOT EDIT.
# SPDX-FileCopyrightText: Cadasto B.V.
# SPDX-License-Identifier: BUSL-1.1
#
# ferroehr.toml: every key FerroEHR reads, each under its description and set to
# its default. Copy this file to ferroehr.toml and edit what you change. A line
# marked `#?` is a key with no default, a secret, or a table the defaults leave
# out: remove `#? ` and fill the placeholder to set it. A line marked `#` under a
# `# [table.<name>]` header shows a table you name yourself.
#
# A duration is a string with its unit ("500ms", "30s", "10min", "12h",
# "7d"), a size a string with an IEC binary unit ("64MiB"). Each key can
# also be set as FERROEHR__<TABLE>__<KEY>, such as
# FERROEHR__DATABASE__MAX_CONNECTIONS; `--set key=value` wins over it.

# The declared posture, the openEHR specification set and the licence token.
[deployment]
# The declared posture (`sandbox` | `production`; default `sandbox`).
# `production` refuses to start while a separation it asserts is missing and
# not accepted by name (#3226).
profile = "sandbox"
# The `DeploymentGap`s a `production` deployment runs without, each stated on
# every boot and on `/management/status`. Ignored under `sandbox`, which
# accepts everything.
accepts = []
# The openEHR specification generation set the server runs (`development` |
# `stable`; default `development`).
spec_profile = "development"
# The commercial licence token file the licensor issued. Optional in every
# respect: an unset, missing, malformed or expired token is logged once at boot
# and the server runs unlicensed, identically in every other way.
#? licence_file = ""

# The HTTP listener: the family's section (the listen address, the timeouts,
# the body limit, the overload bound, the drain, TLS, the trusted proxies, the
# caller rate and compression).
[server]
# The socket address the listener binds.
listen = "0.0.0.0:8080"
# The path every route is served under: empty, or starting with `/` and not
# ending with one.
base_path = ""
# How long one request may take before the server answers `408`.
request_timeout = "30s"
# How long a client may take to send its first byte once it connected, and each
# HTTP/1.1 request head from that head's first byte; a client still sending its
# head then is disconnected, which bounds a connection that never finishes one.
# Never zero.
header_read_timeout = "30s"
# How long a kept-alive HTTP/1.1 connection may wait for its next request
# before the server closes it. Keep it longer than the idle timeout of the
# clients and proxies in front, so they close an idle connection first. Never
# zero.
idle_timeout = "2min"
# The largest request body the server reads before answering `413`.
body_limit = "64MiB"
# How long readiness stays withdrawn before the listener closes, so an
# orchestrator stops sending requests first.
drain_delay = "0s"
# How long the requests in flight may take once the listener closed.
shutdown_timeout = "10s"
# How many requests the server serves at once; past it a request is answered
# `503`. Unset, there is no bound.
#? max_concurrent_requests = 0
# How long a refused request is told to wait (`Retry-After`), a whole number of
# seconds, since the header carries delay-seconds (RFC 9110 §10.2.3).
retry_after = "1s"
# The reverse proxies whose forwarded client address is believed, each an
# address or a CIDR block; empty, every request is named by its peer.
trusted_proxies = []
# The header a trusted proxy names the client in.
forwarded_header = "forwarded"
# Whether a response is compressed with gzip or Brotli when the client accepts
# one.
compression = true
# The smallest response body that is compressed.
compression_min_size = "1KiB"

# The listener's TLS; unset, the listener speaks plain HTTP behind a proxy that
# terminates TLS.
#? [server.tls]
# The certificate chain, the leaf first.
#? certificate_file = ""
# The private key of the leaf.
#? key_file = ""
# Whether the listener asks a client certificate.
#? client_auth = "none"
# The CA bundle a client certificate must chain to; required unless
# `client_auth` is `none`, and refused when it is.
#? client_ca_file = ""
# How often the files are read again, never zero; unset, only `SIGHUP` reads
# them again.
#? reload_interval = "500ms"
# The client certificate chain and key, in one PEM, the healthcheck presents to
# a listener that asks one.
#? healthcheck_identity_file = ""
# The oldest TLS version the listener speaks: `"1.3"` unless lowered to
# `"1.2"`.
#? min_version = "1.3"

# The requests one caller may send; unset, a caller is not limited.
#? [server.caller_rate]
# The requests per second a caller may send once its burst is spent.
#? requests_per_second = 0
# The requests a caller may send at once.
#? burst = 0

# The console, the request log and the OpenTelemetry export, the family's
# shared section.
[telemetry]
# The console rendering.
format = "auto"
# The `tracing` filter directive of the console.
filter = "info,hyper=warn,tower=warn,h2=warn"
# The query parameters whose values the request log may carry; empty, it
# carries none.
logged_query_parameters = []
# The deployment environment, `deployment.environment.name` on the resource,
# such as `production`.
#? environment = ""

# The OTLP collector, when spans and metrics are exported.
#? [telemetry.otlp]
# The collector's OTLP/gRPC endpoint; `https://` speaks TLS. It may carry a
# credential, so it renders masked.
#? endpoint = ""
# Whether the product's spans are exported.
#? traces = true
# Whether the metrics are pushed.
#? metrics = true
# The share of the server's traces that are sampled.
#? sample_ratio = 1.0

# The TLS to the collector: trust roots beside the platform's, the client
# identity for mutual TLS and the minimum version. The crate reads none of it:
# the product reads the table with `ferrohealth-server`'s `TlsClient` and hands
# the built configuration to `Telemetry::with_tls`. TLS material is refused
# beside an endpoint that is not `https://`.
#? [telemetry.otlp.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The installation report to `FerroPULSE` (on by default).
[usage_report]
# The off switch: `false` sends nothing.
enabled = true
# The collector.
endpoint = "https://report.ferropulse.eu/v1/report"
# The directory the instance id lives in; without one nothing is sent, since
# every restart would count as a new installation.
#? state_dir = ""
# How the product is deployed.
deployment = "unknown"

# Authentication: the `ferrohealth-smart` section, whose serialization writes
# every secret as `***`, `[auth.idp]`, `[auth.smart]` and `[auth.scim]`.
[auth]
# Whether inbound authentication is on; a product may refuse `false`.
enabled = true
# The realm the challenges name; empty for none, which a product replaces with
# its own default.
realm = ""
# The SMART capabilities the discovery document adds, each a capability SMART
# App Launch 2.2.0 or the SMART on openEHR draft defines, or a full URI.
capabilities = []
# The scopes the discovery document lists as `scopes_supported`: only scopes
# the product honours, because "the server SHALL support all scopes listed
# here".
scopes_supported = []
# The product's own scope, a full URI or a string starting with `__`; empty for
# none.
product_scope = ""

# The `[auth.issuer]` tables, each issuer with its own settings.
#? [[auth.issuer]]
# The issuer identifier. It renders with any userinfo masked, as `SecretUrl`
# renders itself.
#? issuer = ""
# Whose tokens the issuer signs; required, with no default.
#? kind = "persons"
# The preset the profile starts from.
#? profile = "rfc9068"
# The audiences, of which a token's `aud` must contain one.
#? audience = []
# The signature algorithms admitted.
#? algorithms = ["RS256", "RS384", "PS256", "PS384", "ES256", "ES384"]
# The clock skew, at most `300s`.
#? clock_skew = "1min"
# How long a held key set is used.
#? jwks_max_age = "10min"
# The shortest time between two reads of the key set.
#? jwks_refresh_interval = "1min"
# A key set file handed over out of band, in place of the issuer's `jwks_uri`;
# empty for none.
#? jwks_file = ""
# How long one call to the authorization server may take.
#? timeout = "10s"
# How the issuer's tokens are checked.
#? mode = "jwt"
# Whether the issuer's tokens must be bound to a `DPoP` key or a client
# certificate: `none` (the default) or `required` (`crate::sender`).
#? sender_constraint = "none"
# The claims the issuer's roles are read from, each a dotted path; by default
# `roles`, `groups` and `entitlements` (RFC 9068 §2.2.3.1), and none, never
# settable, on a `federation` issuer.
#? role_claims = []
# `ProfileKeys::person_key`.
#? person_key = ""
# `ProfileKeys::tenant_claim`.
#? tenant_claim = ""
# `ProfileKeys::client_claims`.
#? client_claims = []
# `ProfileKeys::impersonation_marker`.
#? impersonation_marker = ""
# `ProfileKeys::expect`.
#? expect = {}
# `ProfileKeys::user_claims`.
#? user_claims = []
# `ProfileKeys::person_equality`.
#? person_equality = []
# `ProfileKeys::unstable_claims`.
#? unstable_claims = []
# `ProfileKeys::first_party_clients`.
#? first_party_clients = []
# `ProfileKeys::max_actor_chain`.
#? max_actor_chain = 0
# `ProfileKeys::act_represents_patient`.
#? act_represents_patient = false
# `ProfileKeys::token_types`.
#? token_types = []
# `ProfileKeys::required_claims`.
#? required_claims = []
# `ProfileKeys::adapter`.
#? adapter = ""
# `ProfileKeys::max_onward_lifetime`.
#? max_onward_lifetime = "500ms"
# `ProfileKeys::onward_grant`.
#? onward_grant = "token_exchange"
# `ProfileKeys::onward_indicator`.
#? onward_indicator = "resource"
# `ProfileKeys::onward_parameters`.
#? onward_parameters = {}
# `ProfileKeys::onward_client_id`.
#? onward_client_id = false
# `ProfileKeys::onward_subject_audience`.
#? onward_subject_audience = false
# `ProfileKeys::onward_preview`.
#? onward_preview = []

# The introspection check, under `mode = "introspection"`.
#? [auth.issuer.introspection]
# The introspection endpoint; empty for the one the issuer's metadata names. It
# renders with its userinfo and its query masked.
#? endpoint = ""
# The longest an active response is used; `0s` caches nothing.
#? cache_max_age = "1min"
# The most responses held at once.
#? cache_capacity = 10000

# The client authentication of the introspection call.
#? [auth.issuer.introspection.client]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [auth.issuer.introspection.client.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The client credentials grant whose token authorizes the call.
#? [auth.issuer.introspection.bearer]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [auth.issuer.introspection.bearer.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The assurance level the issuer's tokens carry.
#? [auth.issuer.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
#? claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
#? levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"

# `ProfileKeys::app_only`.
#? [[auth.issuer.app_only]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `ProfileKeys::guest`.
#? [[auth.issuer.guest]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `ProfileKeys::delegates`.
#? [[auth.issuer.delegates]]
# The actor's issuer.
#? issuer = ""
# The actor's `sub`.
#? sub = ""
# The client.
#? client = ""

# `ProfileKeys::representation`.
#? [auth.issuer.representation]
# The claim naming the subject the person represents.
#? claim = ""
# The claim carrying the ground of the representation, as asserted.
#? ground_claim = ""

# `ProfileKeys::scope_claim`.
#? [auth.issuer.scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# `ProfileKeys::app_only_scope_claim`.
#? [auth.issuer.app_only_scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# The subjects granted system-wide access without a scope, each `{ issuer, sub
# }`; only a `CallerKind::System` caller of a `persons` or `machines` issuer is
# ever admitted by an entry.
#? [[auth.scopeless_subjects]]
# The issuer.
#? issuer = ""
# The `sub`.
#? sub = ""

# The Basic users of the surface; absent for no Basic.
#? [auth.basic]
# How long a credential that verified is kept, so a repeat request skips the
# key derivation; `5min` by default, `0s` keeps none.
#? cache_ttl = "5min"

# The users.
#? [[auth.basic.users]]
# The user-id.
#? user = ""
# The Argon2id PHC string of the password, rendered redacted.
#? password_hash = ""
# The file holding that PHC string.
#? password_hash_file = ""
# The scopes the user is granted.
#? scopes = []
# The roles the user is granted (`crate::roles`).
#? roles = []

# The `DPoP` proof check of the surface; absent for none, so a `DPoP` request
# is refused as carrying no admitted credential.
#? [auth.dpop]
# The surface's base URL as its clients address it, which a proof's `htu` is
# compared with, the request path appended; required.
#? external_url = ""
# How long after its `iat` a proof is accepted, at most `300s`.
#? max_age = "1min"
# How far a proof's `iat` may lie ahead, at most `300s`.
#? clock_skew = "10s"
# The signature algorithms a proof may use; asymmetric only.
#? algorithms = ["RS256", "RS384", "PS256", "PS384", "ES256", "ES384"]

# The TLS of the discovery document, the key set and the introspection calls of
# every issuer: trust roots beside the platform's, for an issuer behind a
# private certificate authority, a client identity and the minimum version. The
# crate reads none of it: the product's `TlsBuilder` builds it once at start.
[auth.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
min_version = "1.3"

# The `[auth.federation]` tables, one per `federation` issuer.
#? [[auth.federation]]
# The `[auth.issuer]` this table describes, of kind `federation`.
#? issuer = ""
# Whether the issuer is a MyHealth@EU contact point; required, with no default.
#? contact_point = false
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# The country codes a professional may carry.
#? countries = []
# The issuing authorities a professional or provider may name.
#? issuing_authorities = []
# The prefixes a healthcare provider identifier must start with.
#? provider_identifier_prefixes = []
# Whether the issuer attests the `authorization_details` it puts in a token,
# which RFC 9396 §12 has "sent through the user agent".
#? attests_authorization_details = false
# The `authorization_details` type the attributes are read from.
#? authorization_details_type = ""
# The `authorization_details` types that state an organisation's access.
#? organisation_types = []
# The claim holding the Verifiable Presentations of a Nuts RFC021 §6
# introspection response, `vps`.
#? presentations_claim = ""
# The credential types the deployment declares user-authenticated.
#? user_credential_types = []
# The fields every token of the issuer must carry, each with a source.
#? required_fields = []
# Whether the issuer's tokens must be sender-constrained, so the issuer fails
# to load without `sender_constraint = "required"`.
#? requires_sender_constraint = false
# The subject-token issuers whose persons this issuer is trusted to map to its
# own, when it issues onward tokens (`client::onward`).
#? exchanges_from = []
# The subject-token claim, a dotted path, whose value an onward token of this
# issuer must carry as `professional.hp_identifier`.
#? person_mapping = ""

# The `[auth.attributes]` tables, at most one per `persons` issuer: where it
# states its professionals' attributes.
#? [[auth.attributes]]
# The `[auth.issuer]` this table describes, of kind `persons`, `patients` or
# `machines`.
#? issuer = ""
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# Whether the `purpose_of_use` of each RFC 9396 `authorization_details` entry,
# written `system|code`, is read as a purpose of use.
#? authorization_details_purposes = false

# The `[auth.party]` tables, one per `persons` issuer whose logins are bound to
# a party.
#? [[auth.party]]
# The `persons` issuer whose logins the table binds.
#? issuer = ""
# The issuer of the identifiers the key is matched against; no two tables share
# one.
#? identifier_issuer = ""
# The type of those identifiers, which declares the key's canonical form:
# `guid` or `uuid` is compared in lower case, any other type exactly.
#? identifier_type = ""
# The claim naming the groups the token asserts, an array of strings; empty to
# read no group.
#? group_claim = ""
# The issuer of the group identifiers the group claim names; set with
# `group_claim`.
#? group_identifier_issuer = ""
# Whether a guest of the issuer is looked up; a guest is not by default.
#? guests = false

# The `[auth.idp]` table: the vendor adapters a profile may name, each read in
# a build that compiles it in.
[auth.idp]

# The Microsoft Graph access of the `idp-entra` adapter (`[auth.idp.entra]`),
# which resolves an Entra ID groups overage.
#? [auth.idp.entra]
# The Microsoft Graph root every URL is built from, `https` without a query or
# a fragment.
#? base_url = "https://graph.microsoft.com/v1.0"
# The adapter's budget for one call, the token fetch and the Graph round trip
# together; never zero.
#? timeout = "2s"
# The largest Graph answer read; never zero.
#? max_response_size = "1MiB"
# The `securityEnabledOnly` parameter of `getMemberObjects`: `false` reads
# every group, administrative unit and directory role, `true` only the security
# groups.
#? security_enabled_only = false

# The client credentials grant the Graph token is obtained with, under the
# Graph permission the deployment grants.
#? [auth.idp.entra.credentials]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [auth.idp.entra.credentials.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The SMART App Launch resource-server posture.
[auth.smart]
# Serve the `/.well-known/smart-configuration` discovery document (SMART App
# Launch 2.x §Conformance; default `false`). The document is built from one
# `[auth]` issuer's metadata: the issuer `Self::issuer_metadata_file` names,
# else the first whose metadata is read from it, else the first.
discovery = false
# The RFC 8414 §2 authorization-server metadata of the `[auth]` issuer it
# names, whose key set is a `jwks_file` and carries none: a JSON document read
# at boot. SMART App Launch 2.2.0, Conformance, §Metadata requires the
# `token_endpoint` it names.
#? issuer_metadata_file = ""
# The SMART platform base URL the discovery document hangs off (master04
# §Service Discovery: the document is served relative to the platform or
# gateway base, not the FHIR base). Unset, the REST root (`/ferroehr/rest`). A
# leading path segment is honoured, e.g. `/gateway/v1` →
# `/gateway/v1/.well-known/smart-configuration`.
#? platform_base_url = ""
# The server's externally reachable origin (scheme + host [+ port]), e.g.
# `https://cdr.example.com`. master04 §Services makes every `services.*`
# entry's `baseUrl` an "Absolute URL to the root of the API (required)", so the
# document prefixes this origin onto the served base paths. Required when
# `Self::discovery` is set.
#? public_base_url = ""
# Episode context (master09 §Experimental: Episode Context), advertised only:
# `episode_launch = true` adds `context-openehr-episode` to the document's
# capabilities and applies no episode filtering (openEHR has no first-class
# Episode resource; master09 calls the semantics "currently
# implementation-defined").
episode_launch = false
# The `client_id`s of the backend clients a `system/aql-*` grant counts for:
# master08 §Resource Scopes says such a grant "would grant access to all
# registered and ad-hoc AQL queries system-wide". Empty, no client.
backend_clients = []
# The issuers whose `patient/` grants count, each confined to the `ehrId` of
# the token's launch context (master07 §Context Selection: the `ehrId` names
# an EHR of the platform that issued it). Empty, a `patient/` grant grants
# nothing.
patient_issuers = []
# The `client_id`s that reach the DEMOGRAPHIC API. master08 §Resource Scopes
# defines no resource family for demographic data, so no SMART scope covers it:
# a listed client, or a caller holding the `[auth] product_scope`, reaches it
# (no openEHR spec governs this: our own design).
demographic_clients = []

# The SCIM 2.0 service provider and its provisioning clients; absent,
# `/scim/v2/` is not served.
#? [auth.scim]
# The externally reachable origin the SCIM base URL hangs off, such as
# `https://cdr.example.com`; every `meta.location` and discovery document names
# `<public_base_url>/scim/v2` (RFC 7643 §3.1: `location` is "The URI of the
# resource being returned"). Required.
#? public_base_url = ""
# The most resources one list response returns (RFC 7643 §5, the
# `ServiceProviderConfig` `filter.maxResults`).
#? filter_max_results = 100
# The most Users one client deactivates or deletes in one window; past it, a
# deactivation or a deletion is refused with `429`.
#? max_deactivations = 100
# The length of that window.
#? deactivation_window = "1h"
# How long after a User's deletion the contacts of every version of its
# `PERSON` are erased (GDPR Art. 17), at most 30 days; `"0s"` erases them in
# the deletion itself. The name, the binding key and the identifiers stay.
#? contact_erasure_delay = "0s"
# The most members one Group holds; an add past it is refused with `400`. Each
# membership change stores every membership of the Group again (RM demographic
# master02 §Versioning Semantics), so the cap bounds a Group's version
# storage.
#? max_group_members = 5000

# The provisioning clients.
#? [[auth.scim.client]]
# The issuer of the client's access tokens: the deployment's own authorization
# server, an `[auth.issuer]` of kind `machines`.
#? issuer = ""
# The client the token names (`client_id`, failing that `azp`).
#? client_id = ""
# The scope a token of the client must hold.
#? scope = ""
# The identifier issuer of the binding keys the client provisions, the
# `identifier_issuer` of an `[auth.party]` table; no two clients share one.
#? binding_issuer = ""

# RBAC, ABAC, assurance, the party binding, the system clients, the federation
# agreements and the registered origins.
[authz]

# Role-based access control.
[authz.rbac]
# Master switch of the coarse role gate, active only when auth is enabled
# (`FERROEHR__AUTHZ__RBAC__ENABLED`, default `true`).
enabled = true
# The role required for Admin-class operations (default `ADMIN`).
admin_role = "ADMIN"
# The role marking a principal as read-only (default `READONLY`): a caller
# carrying it is refused on every write operation even when it also holds
# granting roles (a restriction overrides a grant). Supports the conformance
# catalogue's authorization-separation cases.
readonly_role = "READONLY"
# The role that may read the access log for ONE subject at a time
# (`FERROEHR__AUTHZ__RBAC__SUBJECT_AUDIT_ROLE`, default unset).
#? subject_audit_role = ""
# The role that may reach data under an EHDS Art. 8 access restriction in an
# emergency (`FERROEHR__AUTHZ__RBAC__EMERGENCY_ACCESS_ROLE`, default unset).
#? emergency_access_role = ""
# The roles of an EHDS Art. 10 access-service caller, held to an opt-out
# (`FERROEHR__AUTHZ__RBAC__ACCESS_SERVICE_ROLES`; empty, the default, holds
# nobody).
access_service_roles = []
# The role that may read a party's protected national identifiers
# (`FERROEHR__AUTHZ__RBAC__IDENTIFIER_READER_ROLE`, default unset).
#? identifier_reader_role = ""
# The role that may import an EHR or an EHR extract (`message_import_ehr`,
# `message_import_ehr_extract`; default unset).
#? import_role = ""
# The issuers whose role claims may grant `admin_role`,
# `emergency_access_role`, `import_role` and `identifier_reader_role`, each a
# `persons` issuer; empty, the default, lets no token grant them.
role_issuers = []
# What an EHR carrying no `ACCESS_CONTROL_SETTINGS` admits (default `open`).
ehr_access_default = "open"

# Attribute-based access control (opt-in).
[authz.abac]
# Master ABAC switch (default `false`).
enabled = false
# Which PDP engine to use (default `cedar`).
engine = "cedar"
# The JWT claim carrying the caller's organization (default `organization_id`);
# resolved opportunistically (absent → no attribute).
organization_claim = "organization_id"
# The JWT claim carrying the patient id (default `patient_id`); its presence
# enables the local subject gate. Set to empty to disable the gate.
patient_claim = "patient_id"
# The subject namespace patient-claim ids are issued in
# (`EHR_STATUS.subject.external_ref.namespace`, RM ehr master04 §EHR Status),
# default unset.
#? patient_namespace = ""
# Whether DIRECTORY (FOLDER) operations are submitted to the PDP (default
# `false`).
check_directory = false

# Embedded-Cedar settings.
[authz.abac.cedar]
# Directory of `*.cedar` policy files (required when `engine = cedar`).
#? policy_dir = ""
# Optional periodic hot-reload interval; off when unset.
#? reload_interval = "500ms"

# Remote-PDP settings.
[authz.abac.remote]

# `[authz.abac.remote.endpoint]`, the family's outbound endpoint: the PDP base
# URL (`url`; the policy name is appended, so it must end with `/`; required
# when `engine = remote`), the timeouts (a connect timeout keeps a PDP that
# blackholes packets from parking the request until the OS TCP timeout), the
# `retry` of a call that got no answer or a `5xx`, the TLS and the credential,
# such as the OAuth 2.0 client credentials grant. Any `userinfo` in the URL is
# masked in every rendering.
[authz.abac.remote.endpoint]
# The service's URL (RFC 3986); required. It renders with its userinfo and its
# query masked, in `Debug` and when serialized.
url = ""
# How long one whole call may take; never zero.
timeout = "5s"
# How long opening the connection may take; unset, only `timeout` bounds it.
connect_timeout = "2s"

# How a failed call is tried again.
[authz.abac.remote.endpoint.retry]
# How many times one call is tried in all; 1 tries once.
max_attempts = 3
# The wait before the second try.
initial_backoff = "200ms"
# The longest wait between two tries.
max_backoff = "5s"

# The TLS of the connection, built by the product's reader of TLS material.
[authz.abac.remote.endpoint.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
min_version = "1.3"

# The credential the calls carry: HTTP Basic or the client credentials grant.
[authz.abac.remote.endpoint.credentials]
# The Basic user-id.
user = ""
# The Basic password, rendered redacted.
#? password = ""
# The file holding the Basic password.
#? password_file = ""

# The client credentials grant.
#? [authz.abac.remote.endpoint.credentials.oauth]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [authz.abac.remote.endpoint.credentials.oauth.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The onward target the lane reaches on a caller's behalf, authenticating with
# `oauth`.
#? [authz.abac.remote.endpoint.credentials.onward]
# The identifier of the issuer of the onward tokens, whose metadata names its
# token endpoint unless `token_endpoint` is set. It renders with any userinfo
# masked, as `SecretUrl` renders itself.
#? issuer = ""
# Whose tokens the issuer signs: `persons` (a delegated exchange), `patients`
# (a patient's own token) or `federation`; required, with no default.
#? kind = "persons"
# The preset the issuer's profile starts from.
#? profile = "rfc9068"
# The token endpoint itself; empty to discover it from `issuer`. It renders
# with its userinfo and its query masked.
#? token_endpoint = ""
# The client id at this issuer; empty for the lane's own.
#? client_id = ""
# The audiences an onward token may name, at least one.
#? audiences = []
# The `resource` or `audience` values the request names, as the profile's
# `onward_indicator` says.
#? indicators = []
# The `scope` the request names; empty for none.
#? scope = ""
# The claim a chained federation route carries from the subject token to the
# onward token; empty for none.
#? correlation_claim = ""
# Whether the lane holds the tokens it obtains until they near their `exp`.
# `false` exchanges a token at the issuer on every call, a setting for a
# performance measurement's self-test, never for production. `true` by default.
#? cache = true
# Whether every token exchange sent without an actor token names the lane's
# client as its actor with an assertion signed by the current key of its
# `oauth` table's key ring (RFC 8693 §2.1; `Onward::with_actor_assertion`).
# `false` by default.
#? actor_assertion = false

# The profile keys set over the preset; `max_onward_lifetime` is required, here
# or in the preset.
#? [authz.abac.remote.endpoint.credentials.onward.keys]
# `Profile::person_key`.
#? person_key = ""
# `Profile::tenant_claim`.
#? tenant_claim = ""
# `Profile::client_claims`.
#? client_claims = []
# `Profile::impersonation_marker`.
#? impersonation_marker = ""
# `Profile::expect`.
#? expect = {}
# `Profile::user_claims`.
#? user_claims = []
# `Profile::person_equality`.
#? person_equality = []
# `Profile::unstable_claims`.
#? unstable_claims = []
# `Profile::first_party_clients`.
#? first_party_clients = []
# `Profile::max_actor_chain`.
#? max_actor_chain = 0
# `Profile::act_represents_patient`.
#? act_represents_patient = false
# `Profile::token_types`.
#? token_types = []
# `Profile::required_claims`.
#? required_claims = []
# `Profile::adapter`.
#? adapter = ""
# `Profile::max_onward_lifetime`, a duration such as `"10min"`.
#? max_onward_lifetime = "500ms"
# `Profile::onward_grant`.
#? onward_grant = "token_exchange"
# `Profile::onward_indicator`.
#? onward_indicator = "resource"
# `Profile::onward_parameters`.
#? onward_parameters = {}
# `Profile::onward_client_id`.
#? onward_client_id = false
# `Profile::onward_subject_audience`.
#? onward_subject_audience = false
# `Profile::onward_preview`.
#? onward_preview = []

# `Profile::app_only`.
#? [[authz.abac.remote.endpoint.credentials.onward.keys.app_only]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::guest`.
#? [[authz.abac.remote.endpoint.credentials.onward.keys.guest]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::delegates`.
#? [[authz.abac.remote.endpoint.credentials.onward.keys.delegates]]
# The actor's issuer.
#? issuer = ""
# The actor's `sub`.
#? sub = ""
# The client.
#? client = ""

# `Profile::representation`.
#? [authz.abac.remote.endpoint.credentials.onward.keys.representation]
# The claim naming the subject the person represents.
#? claim = ""
# The claim carrying the ground of the representation, as asserted.
#? ground_claim = ""

# `Profile::scope_claim`.
#? [authz.abac.remote.endpoint.credentials.onward.keys.scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# `Profile::app_only_scope_claim`.
#? [authz.abac.remote.endpoint.credentials.onward.keys.app_only_scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# What a `federation` issuer asserts, over its preset's defaults;
# `exchanges_from` and `person_mapping` are required.
#? [authz.abac.remote.endpoint.credentials.onward.federation]
# The `[auth.issuer]` this table describes, of kind `federation`.
#? issuer = ""
# Whether the issuer is a MyHealth@EU contact point; required, with no default.
#? contact_point = false
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# The country codes a professional may carry.
#? countries = []
# The issuing authorities a professional or provider may name.
#? issuing_authorities = []
# The prefixes a healthcare provider identifier must start with.
#? provider_identifier_prefixes = []
# Whether the issuer attests the `authorization_details` it puts in a token,
# which RFC 9396 §12 has "sent through the user agent".
#? attests_authorization_details = false
# The `authorization_details` type the attributes are read from.
#? authorization_details_type = ""
# The `authorization_details` types that state an organisation's access.
#? organisation_types = []
# The claim holding the Verifiable Presentations of a Nuts RFC021 §6
# introspection response, `vps`.
#? presentations_claim = ""
# The credential types the deployment declares user-authenticated.
#? user_credential_types = []
# The fields every token of the issuer must carry, each with a source.
#? required_fields = []
# Whether the issuer's tokens must be sender-constrained, so the issuer fails
# to load without `sender_constraint = "required"`.
#? requires_sender_constraint = false
# The subject-token issuers whose persons this issuer is trusted to map to its
# own, when it issues onward tokens (`client::onward`).
#? exchanges_from = []
# The subject-token claim, a dotted path, whose value an onward token of this
# issuer must carry as `professional.hp_identifier`.
#? person_mapping = ""

# The assurance level the issuer's tokens carry.
#? [authz.abac.remote.endpoint.credentials.onward.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
#? claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
#? levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"

# Per-resource-kind policy bindings, keyed by the canonical kind name (`ehr`,
# `ehr_status`, `composition`, `contribution`, `query`, `directory`).
# [authz.abac.policy.<name>]
# The policy name (the path segment appended to `abac.remote.url`).
# name = ""
# The parameters the PDP body carries; empty = an unparameterized policy.
# parameters = []

# The authentication assurance a patient-data request must carry
# (`[authz.assurance]`, off by default).
[authz.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"

# The party binding: the provider, the namespace and the Basic users' keys
# (`[authz.party_binding]`).
[authz.party_binding]
# The `PARTY_REF.namespace` a bound party is written under, held to the
# `OBJECT_REF.namespace` pattern.
namespace = "demographic"
# The age past which `ferroehr party-binding check` reports a provisional
# `PERSON`.
provisional_report_after = "30d"

# The healthcare provider this deployment acts for, which every access record
# of a bound person and every version a person commits name (EHDS Art. 13(4),
# Annex II 3.2(a)): one provider, or one table per tenant.
#? [authz.party_binding.provider]
# The issuer of the identifier.
#? issuer = ""
# The identifier.
#? id = ""

# The key each Basic user is bound by (`[authz.party_binding.basic_user]`).
#? [[authz.party_binding.basic_user]]
# The `[auth.basic.users]` user-id.
#? user = ""
# The `identifier_issuer` of the `[auth.party]` table the key belongs to.
#? key_issuer = ""
# The binding key the user's `PERSON` carries.
#? key = ""

# The person templates and attributes of the shared party mapping.
[authz.party_binding.person]

# `[authz.party_binding.person.template]`, one per template a professional's
# `PERSON` may use.
#? [[authz.party_binding.person.template]]
# An operational template in the definition store rooted at `PERSON`.
#? template_id = ""
# Whether SCIM and just-in-time creation create new persons with this template;
# exactly one table sets it.
#? default = false

# The binding key.
#? [authz.party_binding.person.template.key]
# The openEHR path.
#? path = ""
# The `DV_IDENTIFIER.type`.
#? type = ""

# The SCIM `userName`.
#? [authz.party_binding.person.template.user_name]
# The openEHR path.
#? path = ""
# The `DV_IDENTIFIER.type`.
#? type = ""

# The SCIM `externalId`.
#? [authz.party_binding.person.template.external_id]
# The openEHR path.
#? path = ""
# The `DV_IDENTIFIER.type`.
#? type = ""

# `[authz.party_binding.person.attribute]`, one per mapped value.
#? [[authz.party_binding.person.attribute]]
# A SCIM attribute path, with the RFC 7644 §3.4.2.2 `valuePath` filter form
# (`emails[type eq "work"].value`).
#? scim = ""
# An OpenID Connect Core 1.0 §5.1 claim.
#? oidc = ""
# Whether just-in-time creation writes the value.
#? jit = false
# Whether this is the name the committer reads; at most one table sets it.
#? name = false
# The path the value goes to, per template id.
#? path = {}

# The professional `ROLE` template.
#? [authz.party_binding.professional_role]
# An operational template rooted at `ROLE`.
#? template_id = ""

# The provisioned `GROUP` template.
#? [authz.party_binding.group]
# An operational template rooted at `GROUP`.
#? template_id = ""
# The path of the group's `displayName`, a `DV_TEXT` in `identities`.
#? display_name = ""

# The group's `externalId`.
#? [authz.party_binding.group.external_id]
# The openEHR path.
#? path = ""
# The `DV_IDENTIFIER.type`.
#? type = ""

# The membership `PARTY_RELATIONSHIP` archetype.
#? [authz.party_binding.membership]
# A `PARTY_RELATIONSHIP` archetype.
#? archetype_id = ""

# The representation `PARTY_RELATIONSHIP` archetype.
#? [authz.party_binding.representation]
# A `PARTY_RELATIONSHIP` archetype whose `source` is the representative and
# whose `target` is the subject.
#? archetype_id = ""
# Each relationship type code of the archetype, mapped to a code of the openEHR
# `subject_relationship` group.
#? relationship_codes = {}

# What FerroEHR does for each `persons` issuer beyond the lookup
# (`[authz.party_binding.issuer]`): just-in-time creation.
#? [[authz.party_binding.issuer]]
# The `persons` issuer the table holds for.
#? issuer = ""
# Whether a first login with no party creates a provisional `PERSON`.
#? jit = false
# Whether a guest the issuer's `[auth.party]` table admits is created too.
#? guests_jit = false
# The claim the `userName` is read from; the issuer profile's `person_key` when
# unset.
#? user_name_claim = ""
# The dotted claim path the identity provider is read from.
#? idp_claim = "idp"
# The identity providers whose logins are created.
#? admit_idp = []
# The groups, read from the `[auth.party]` table's `group_claim`, one of which
# a created login holds.
#? admit_groups = []
# The roles, read from `[auth] role_claims`, one of which a created login
# holds.
#? admit_roles = []
# The lowest `[authz.assurance]` level a created login carries.
#? admit_assurance = "low"

# The systems whose imported committers are trusted (`[authz.import]`).
[authz.import]
# The `creating_system_id` values whose wrapped committers may name a local
# party; never this node's own system id.
trusted_systems = []

# The system clients that commit (`[authz.system_client]`).
#? [[authz.system_client]]
# The `machines` or `persons` issuer of the client's tokens.
#? issuer = ""
# The client the token names.
#? client_id = ""
# The template ids the client may commit; none by default.
#? writes = []
# What the client commits: a relayed record of a human act, a device's
# registration, or both.
#? origins = []
# The issuers of the device identifiers a `device` client names.
#? device_identifier_issuers = []

# The healthcare provider the client acts for, recorded on every system access.
#? [authz.system_client.provider]
# The issuer of the identifier.
#? issuer = ""
# The identifier.
#? id = ""

# The facilities the client may commit for.
#? [[authz.system_client.facilities]]
# The issuer of the facility identifier.
#? issuer = ""
# The facility identifier; exclusive with `id_prefix`.
#? id = ""
# The prefix every admitted facility identifier starts with; exclusive with
# `id`.
#? id_prefix = ""

# The federation agreements (`[authz.federation]`).
[authz.federation]

# The agreements, one per issuer and accessor.
#? [[authz.federation.agreement]]
# The `federation` issuer of the external callers.
#? issuer = ""
# Who the agreement admits: named persons, or the organisation.
#? accessor = "person"
# The agreement's name.
#? name = ""
# The agreement's version.
#? version = ""
# The ISO 3166-1 alpha-2 jurisdiction; a `profile = "nl"` issuer implies `NL`.
#? jurisdiction = ""
# The kind of exchange the agreement covers.
#? exchange = ""
# What the exchange is for; required of an NL agreement, which may not serve a
# keuring (Wabvpz Art. 15f(2)).
#? purpose = "care"
# The source of the consent the exchange is conditioned on, never its legal
# ground.
#? consent = "mitz"
# The most an external caller may read: `patient/` scopes only.
#? reads = []
# The template ids an external person may commit; none by default.
#? writes = []
# Whether an external person may discard a dispensation of the same point of
# care within `discard_window`.
#? discard = false
# The window of a discard, a whole number of hours (MyHealth@EU Requirements
# Catalogue 10.0.0, requirement 07.04, sets `"24h"`).
#? discard_window = "1d"
# The MyHealth@EU service a contact point's person agreement serves, which
# names the `*_NOT_FOUND` code of a request outside the TRC patient; required
# on a `contact_point` issuer and refused elsewhere.
#? ehdsi_service = "patient_summary"
# Whether a professional of the agreement may read an opted-out EHR where
# national law provides the EHDS Art. 10(2) vital-interest access.
#? opt_out_override = false
# For an organisation: whether no natural person views the data, or the
# requester logs the person.
#? access_class = "automated"
# For a `chained` access: how long the requester keeps its log, a calendar
# period (`"P5Y"`).
#? chained_log_retention = "P5Y"

# The legal ground of the processing.
#? [authz.federation.agreement.legal_ground]
# The point of GDPR Art. 6(1), `a` to `f`.
#? gdpr_6_1 = ""
# The point of GDPR Art. 9(2), `a` to `j`.
#? gdpr_9_2 = ""
# The national provision, such as `UAVG Art. 30(3)(a)`.
#? national = ""

# The admission rate per caller, above which a request is refused before any
# patient lookup; required.
#? [authz.federation.agreement.caller_rate]
# The requests per second a caller may send once its burst is spent.
#? requests_per_second = 0
# The requests a caller may send at once.
#? burst = 0

# The origins of data this deployment recognises, which a retention period and
# an access rule may name (`[authz.origin]`, EHDS Annex II 3.4).
#? [[authz.origin]]
# The id the origin's data carry: the
# `FEEDER_AUDIT.originating_system_audit.system_id` its feeds commit under, and
# the origin a direct commit by one of `Self::clients` is stamped with.
# Compared exactly.
#? id = ""
# The authenticated clients whose direct commits come from this origin: a Basic
# user name, or the `client_id` (failing that the `azp`) of an OAuth 2.0 access
# token (RFC 9068 §2.2). Each client belongs to one origin at most.
#? clients = []

# The openEHR REST API: the base path, the system identifier, the `OPTIONS`
# identity, the `OpenAPI` UI, CORS, the clinical body tier and the ADMIN and
# terminology groups.
[api]
# The ITS-REST base path all API routes hang off, from the root of the
# listener. `management.base_path` is set the same way; the two never overlap.
base_path = "/ferroehr/rest/openehr/v1"
# Who may read the Swagger UI and the `OpenAPI` documents at the REST root:
# `off` (not mounted), `admin_only`, `private` (any authenticated principal;
# the default) or `public`. The documents list the whole enabled operation
# surface, admin and message groups included, so `public` discloses it to
# anyone who can reach the port. The same vocabulary the management endpoints
# use; the name is the `OpenAPI` Specification's, the document the UI renders.
openapi_ui = "private"
# This CDR's own openEHR **system identifier** — the identity the deployment
# stamps into the data it authors (`FERROEHR__API__SYSTEM_ID`).
system_id = "ferroehr.local"
# The largest body the ordinary clinical surface accepts, below the listener's
# `server.body_limit`.
#? body_limit = "512KiB"
# Whether the ADMIN API group is served.
admin = false
# Whether the terminology extension API is mounted. Off by default — the
# routes answer `404` unless enabled. The terminology server the CDR asks is
# `[terminology]`.
terminology = false

# The CORS protocol answers of the API (Fetch Standard §3.2). Absent, no CORS
# header is sent, so a browser on another origin cannot read a response.
#? [api.cors]
# `Access-Control-Allow-Origin`: the origins a browser may read responses for,
# each a serialized origin such as `https://app.example`, or `["*"]` for any
# origin (dev only).
#? allow_origins = []
# `Access-Control-Allow-Methods`: the methods a preflight admits; empty admits
# the method the preflight asks for.
#? allow_methods = []
# `Access-Control-Allow-Headers`: the request headers a preflight admits; empty
# admits the headers the preflight asks for.
#? allow_headers = []
# `Access-Control-Expose-Headers`: the response headers a script may read
# beyond the CORS-safelisted ones.
#? expose_headers = []
# `Access-Control-Allow-Credentials`: whether a credentialed request's response
# may be read. Refused beside `allow_origins = ["*"]`, which the Fetch Standard
# forbids together.
#? allow_credentials = false
# `Access-Control-Max-Age`: how long a preflight answer may be cached; unset
# sends no header.
#? max_age = "500ms"

# The `OPTIONS /` System-Options manifest identity (`[api.options]`). Sourced
# from config so the public identity is not a string literal in the handler;
# the live endpoint list is supplied separately by `ferroehr_rest::router`.
# This is the *display* identity of the manifest — the data-authoring
# identity is `Self::system_id`.
[api.options]
# `Options.solution` — the product name.
solution = "FerroEHR"
# `Options.vendor` — the organisation providing the solution (ITS-REST
# `specifications/schemas/others/Options.yaml`, a plain string); defaults to
# the manufacturer's name (`crate::manufacturer::MANUFACTURER`).
vendor = "Cadasto B.V."

# The shared `PostgreSQL` DSN, pool tuning, migrations and one table per
# storage domain.
[database]
# `PostgreSQL` connection DSN (`postgres://user:pass@host:port/db`).
# Credentials are redacted from every rendering (`SecretUrl`).
#? url = ""
# Path to a file holding the DSN, read at boot in place of `Self::url`.
#? url_file = ""
# DSN that schema preparation (`prepare`) authenticates as; unset (the default)
# reuses `Self::url`.
#? migrate_url = ""
# Path to a file holding `Self::migrate_url`, read at boot in place of it —
# the mounted-secret route, as `Self::url_file` is for the clinical DSN.
# Setting both is a boot error.
#? migrate_url_file = ""
# Upper bound of the connection pool.
max_connections = 20
# Connections the pool keeps open when idle (avoids cold reopen + `SET
# search_path` churn under variable load).
min_connections = 2
# How long to wait for a free connection before failing.
acquire_timeout = "30s"
# `statement_timeout` applied to every pooled connection; `"0s"` leaves the
# server default (usually unlimited).
statement_timeout = "1min"
# Whether the server applies its embedded migrations at boot (`MigrationMode`).
migrations = "apply"

# The clinical record's own DSN and the credential that prepares its database.
[database.clinical]
# This domain's `PostgreSQL` DSN. Unset reuses `[database] url`.
#? url = ""
# Path to a file holding `Self::url`, read at boot in place of it — the route
# for a deployment that mounts its database credential as a file rather than
# passing it as an environment value, which is readable through
# `/proc/<pid>/environ` and inherited by every child process. Setting both is a
# boot error.
#? url_file = ""
# The credential that prepares the database this domain lives in when that is
# not the database `[database] migrate_url` reaches.
#? migrate_url = ""
# Path to a file holding `Self::migrate_url`, read at boot in place of it.
# Setting both is a boot error.
#? migrate_url_file = ""

# The identities' own DSN and the credential that prepares their database.
[database.party]
# This domain's `PostgreSQL` DSN. Unset reuses `[database] url`.
#? url = ""
# Path to a file holding `Self::url`, read at boot in place of it — the route
# for a deployment that mounts its database credential as a file rather than
# passing it as an environment value, which is readable through
# `/proc/<pid>/environ` and inherited by every child process. Setting both is a
# boot error.
#? url_file = ""
# The credential that prepares the database this domain lives in when that is
# not the database `[database] migrate_url` reaches.
#? migrate_url = ""
# Path to a file holding `Self::migrate_url`, read at boot in place of it.
# Setting both is a boot error.
#? migrate_url_file = ""

# The audit repository's own DSN and the credential that prepares its database.
[database.audit]
# This domain's `PostgreSQL` DSN. Unset reuses `[database] url`.
#? url = ""
# Path to a file holding `Self::url`, read at boot in place of it — the route
# for a deployment that mounts its database credential as a file rather than
# passing it as an environment value, which is readable through
# `/proc/<pid>/environ` and inherited by every child process. Setting both is a
# boot error.
#? url_file = ""
# The credential that prepares the database this domain lives in when that is
# not the database `[database] migrate_url` reaches.
#? migrate_url = ""
# Path to a file holding `Self::migrate_url`, read at boot in place of it.
# Setting both is a boot error.
#? migrate_url_file = ""

# The management/observability surface.
[management]
# Master switch. When `false`, no management routes are mounted at all.
enabled = false
# The base path the management endpoints hang off.
base_path = "/management"
# When set, the management surface is served from its **own** listener on this
# socket address (a separate axum server task in the binary) instead of the
# main API listener — so production can keep it off the public listener
# entirely. The same form as `server.listen`.
#? listen = ""
# Span-timing capture: every span's folded stacks are written to this file, for
# `inferno-flamegraph` to render offline. Unset, nothing is captured.
#? flame_file = ""

# Per-endpoint access levels — the SINGLE authority for this surface.
[management.endpoints]
# `/management/info`.
info = "off"
# `/management/metrics` (+ `/{name}`) — the JSON registry view.
metrics = "off"
# `/management/prometheus` — the text exposition scraped by Prometheus.
prometheus = "off"
# `/management/env` — the redacted effective configuration.
env = "off"
# `/management/loggers` — the runtime `EnvFilter` control.
loggers = "off"
# `/management/flamegraph` — the on-demand CPU flamegraph (pprof sampling).
flamegraph = "off"
# `/management/health` — every readiness indicator with its detail.
health = "off"
# `/management/status` — the status document with the licence, the deployment
# posture and the support period.
status = "off"

# Limits for the on-demand CPU profiler (`endpoints.flamegraph`).
[management.profiling]
# The longest sample window a single request may ask for, in whole seconds.
max_duration = "30s"
# The highest sampling frequency a request may ask for, in Hz.
max_frequency = 999

# The IHE ATNA audit trail / System Log (local Audit Record Repository + the
# syslog and FHIR-feed forwarding sinks).
[audit]
# Master switch (`FERROEHR__AUDIT__ENABLED`). **On by default** — every
# deployment gets a queryable audit trail with zero external dependencies (the
# sinks decide where records go).
enabled = true
# Enterprise/site id → `AuditEnterpriseSiteID`
# (`FERROEHR__AUDIT__ENTERPRISE_SITE_ID`).
#? enterprise_site_id = ""
# Audit source id → `AuditSourceID` and the destination participant
# (`FERROEHR__AUDIT__SOURCE_ID`).
source_id = "ferroehr"
# Fill value for empty mandatory fields (`FERROEHR__AUDIT__VALUE_IF_MISSING`).
value_if_missing = "UNKNOWN"
# Skip successful-login records (`FERROEHR__AUDIT__SUPPRESS_LOGIN_EVENTS`).
# Rejected accesses (401/403) are always recorded.
suppress_login_events = true
# Failure mode (`FERROEHR__AUDIT__FAIL_MODE`): `open` | `closed`.
fail_mode = "open"
# Enrich the patient participant via a background indexed lookup of
# `ehr.subject_id` (`FERROEHR__AUDIT__RESOLVE_SUBJECT`). On by default — the
# IHE BALP `Patient*` patterns and the patient-centric audit search need the
# subject; the lookup runs only on the background drain.
resolve_subject = true
# Bounded audit queue capacity (`FERROEHR__AUDIT__QUEUE_CAPACITY`). Sized for
# write-path bursts: the drain persists in multi-row batches, so the queue only
# needs to ride out sink latency spikes, but a loaded write path can enqueue
# thousands per second.
queue_capacity = 8192
# This node's advertised network address → the destination
# network-access-point (`FERROEHR__AUDIT__SERVER_HOST`); the `value_if_missing`
# fill when unset.
#? server_host = ""
# The request header carrying the caller's declared purpose of use
# (`FERROEHR__AUDIT__PURPOSE_HEADER`), recorded on every access record.
purpose_header = "x-purpose-of-use"
# The request header carrying the data permit the caller acts under
# (`FERROEHR__AUDIT__PERMIT_HEADER`), recorded on every access record.
permit_header = "x-data-permit"
# The purpose codes this deployment accepts (`FERROEHR__AUDIT__PURPOSE_CODES`).
purpose_codes = []
# The declared purpose codes that mark an access as an emergency access
# (`FERROEHR__AUDIT__EMERGENCY_PURPOSE_CODES`). Empty (the default) marks
# nothing.
emergency_purpose_codes = []
# The legal basis this deployment processes under
# (`FERROEHR__AUDIT__LEGAL_BASIS`), recorded on every access record.
#? legal_basis = ""

# The template and archetype map every access is classified through by EHDS
# priority category (Annex II 3.2(c)). Empty by default, so the map FerroEHR
# ships applies; an unmapped access is recorded `unclassified`.
[audit.categories]
# Whether the map FerroEHR ships applies while this section declares no
# template and no archetype (`shipped_map`, on by default). Off with nothing
# declared, no map applies and every access is recorded `unclassified`, which
# `deployment.profile = "production"` refuses as the `no_category_map` gap.
shipped_map = true
# The national categories (Art. 14(1) third subparagraph), each
# `<system>|<code>`.
national = []
# Template id → categories (`[audit.categories.templates]`), consulted first.
templates = {}
# Archetype id → categories (`[audit.categories.archetypes]`), consulted for
# an object whose template the map does not name.
archetypes = {}

# The local Audit Record Repository.
[audit.store]
# Persist every record locally (`FERROEHR__AUDIT__STORE__ENABLED`). **On by
# default** (owner posture: compliance out of the box).
enabled = true
# How long records are kept, a calendar period (`"P5Y"`, `"P1830D"`); unset
# keeps them forever (`FERROEHR__AUDIT__STORE__RETENTION`). Applied hourly by
# the retention reaper.
#? retention = "P5Y"
# Whether this deployment is one of the controllers SGB V § 307 names for a
# German telematics-infrastructure application
# (`FERROEHR__AUDIT__STORE__SGB_V_309_CONTROLLER`). **Off by default.**
sgb_v_309_controller = false
# The time between two scheduled verifications of the store's hash chain
# (`FERROEHR__AUDIT__STORE__VERIFY_INTERVAL`); `"0s"` turns the schedule off.
# Default one hour.
verify_interval = "1h"
# The time between two scheduled full passes over the hash chain
# (`FERROEHR__AUDIT__STORE__FULL_VERIFY_INTERVAL`), which also recompute the
# records before the checkpoint; `"0s"` leaves the full pass to `SELECT * FROM
# audit.verify_audit_chain()` on demand. Default one week. A run that found
# damage is always followed by a full pass.
full_verify_interval = "7d"

# The classic DICOM-over-syslog feed; absent, off.
#? [audit.syslog]
# The Audit Record Repository, `tls://host:port`
# (`FERROEHR__AUDIT__SYSLOG__URL`): RFC 5425 TLS, on the §4.1 port 6514 by
# default.
#? url = "tls://localhost:6514"
# The directory of the `ihe-atna` spool every record is stored in before it is
# sent (`FERROEHR__AUDIT__SYSLOG__SPOOL_DIR`), owner-only; unset, the spool is
# held in memory and a restart loses what it holds.
#? spool_dir = ""
# The most records the spool holds
# (`FERROEHR__AUDIT__SYSLOG__SPOOL_MAX_EVENTS`).
#? spool_max_events = 100000
# The most the spool holds in size (`FERROEHR__AUDIT__SYSLOG__SPOOL_MAX_SIZE`).
#? spool_max_size = "256MiB"

# The TLS material of the connection to the ARR (`[audit.syslog.tls]`): the
# family's outbound TLS keys, the client identity for mutual TLS and the trust
# roots beside the platform's.
#? [audit.syslog.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The wait between two delivery attempts.
#? [audit.syslog.retry]
# The longest wait between two delivery attempts after a failure.
#? max_backoff = "1min"

# The RESTful-ATNA FHIR `AuditEvent` feed; absent, off.
#? [audit.fhir_feed]
# How long the forwarder waits for a new record before it reads the store again
# (`FERROEHR__AUDIT__FHIR_FEED__POLL_INTERVAL`); at least 100 ms is waited.
#? poll_interval = "2s"

# `[audit.fhir_feed.endpoint]`, the family's outbound endpoint: the ARR's FHIR
# base URL (`url`; the `AuditEvent` endpoint is `{url}/AuditEvent`), the
# timeout of one `POST`, the `retry` of a delivery, the TLS and the credential,
# such as the OAuth 2.0 client credentials grant of the IHE IUA authorized
# client. Credentials in the URL are masked in every rendering.
#? [audit.fhir_feed.endpoint]
# The service's URL (RFC 3986); required. It renders with its userinfo and its
# query masked, in `Debug` and when serialized.
#? url = ""
# How long one whole call may take; never zero.
#? timeout = "10s"
# How long opening the connection may take; unset, only `timeout` bounds it.
#? connect_timeout = "500ms"

# How a failed call is tried again.
#? [audit.fhir_feed.endpoint.retry]
# How many times one call is tried in all; 1 tries once.
#? max_attempts = 3
# The wait before the second try.
#? initial_backoff = "200ms"
# The longest wait between two tries.
#? max_backoff = "1min"

# The TLS of the connection, built by the product's reader of TLS material.
#? [audit.fhir_feed.endpoint.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The credential the calls carry: HTTP Basic or the client credentials grant.
#? [audit.fhir_feed.endpoint.credentials]
# The Basic user-id.
#? user = ""
# The Basic password, rendered redacted.
#? password = ""
# The file holding the Basic password.
#? password_file = ""

# The client credentials grant.
#? [audit.fhir_feed.endpoint.credentials.oauth]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [audit.fhir_feed.endpoint.credentials.oauth.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The onward target the lane reaches on a caller's behalf, authenticating with
# `oauth`.
#? [audit.fhir_feed.endpoint.credentials.onward]
# The identifier of the issuer of the onward tokens, whose metadata names its
# token endpoint unless `token_endpoint` is set. It renders with any userinfo
# masked, as `SecretUrl` renders itself.
#? issuer = ""
# Whose tokens the issuer signs: `persons` (a delegated exchange), `patients`
# (a patient's own token) or `federation`; required, with no default.
#? kind = "persons"
# The preset the issuer's profile starts from.
#? profile = "rfc9068"
# The token endpoint itself; empty to discover it from `issuer`. It renders
# with its userinfo and its query masked.
#? token_endpoint = ""
# The client id at this issuer; empty for the lane's own.
#? client_id = ""
# The audiences an onward token may name, at least one.
#? audiences = []
# The `resource` or `audience` values the request names, as the profile's
# `onward_indicator` says.
#? indicators = []
# The `scope` the request names; empty for none.
#? scope = ""
# The claim a chained federation route carries from the subject token to the
# onward token; empty for none.
#? correlation_claim = ""
# Whether the lane holds the tokens it obtains until they near their `exp`.
# `false` exchanges a token at the issuer on every call, a setting for a
# performance measurement's self-test, never for production. `true` by default.
#? cache = true
# Whether every token exchange sent without an actor token names the lane's
# client as its actor with an assertion signed by the current key of its
# `oauth` table's key ring (RFC 8693 §2.1; `Onward::with_actor_assertion`).
# `false` by default.
#? actor_assertion = false

# The profile keys set over the preset; `max_onward_lifetime` is required, here
# or in the preset.
#? [audit.fhir_feed.endpoint.credentials.onward.keys]
# `Profile::person_key`.
#? person_key = ""
# `Profile::tenant_claim`.
#? tenant_claim = ""
# `Profile::client_claims`.
#? client_claims = []
# `Profile::impersonation_marker`.
#? impersonation_marker = ""
# `Profile::expect`.
#? expect = {}
# `Profile::user_claims`.
#? user_claims = []
# `Profile::person_equality`.
#? person_equality = []
# `Profile::unstable_claims`.
#? unstable_claims = []
# `Profile::first_party_clients`.
#? first_party_clients = []
# `Profile::max_actor_chain`.
#? max_actor_chain = 0
# `Profile::act_represents_patient`.
#? act_represents_patient = false
# `Profile::token_types`.
#? token_types = []
# `Profile::required_claims`.
#? required_claims = []
# `Profile::adapter`.
#? adapter = ""
# `Profile::max_onward_lifetime`, a duration such as `"10min"`.
#? max_onward_lifetime = "500ms"
# `Profile::onward_grant`.
#? onward_grant = "token_exchange"
# `Profile::onward_indicator`.
#? onward_indicator = "resource"
# `Profile::onward_parameters`.
#? onward_parameters = {}
# `Profile::onward_client_id`.
#? onward_client_id = false
# `Profile::onward_subject_audience`.
#? onward_subject_audience = false
# `Profile::onward_preview`.
#? onward_preview = []

# `Profile::app_only`.
#? [[audit.fhir_feed.endpoint.credentials.onward.keys.app_only]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::guest`.
#? [[audit.fhir_feed.endpoint.credentials.onward.keys.guest]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::delegates`.
#? [[audit.fhir_feed.endpoint.credentials.onward.keys.delegates]]
# The actor's issuer.
#? issuer = ""
# The actor's `sub`.
#? sub = ""
# The client.
#? client = ""

# `Profile::representation`.
#? [audit.fhir_feed.endpoint.credentials.onward.keys.representation]
# The claim naming the subject the person represents.
#? claim = ""
# The claim carrying the ground of the representation, as asserted.
#? ground_claim = ""

# `Profile::scope_claim`.
#? [audit.fhir_feed.endpoint.credentials.onward.keys.scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# `Profile::app_only_scope_claim`.
#? [audit.fhir_feed.endpoint.credentials.onward.keys.app_only_scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# What a `federation` issuer asserts, over its preset's defaults;
# `exchanges_from` and `person_mapping` are required.
#? [audit.fhir_feed.endpoint.credentials.onward.federation]
# The `[auth.issuer]` this table describes, of kind `federation`.
#? issuer = ""
# Whether the issuer is a MyHealth@EU contact point; required, with no default.
#? contact_point = false
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# The country codes a professional may carry.
#? countries = []
# The issuing authorities a professional or provider may name.
#? issuing_authorities = []
# The prefixes a healthcare provider identifier must start with.
#? provider_identifier_prefixes = []
# Whether the issuer attests the `authorization_details` it puts in a token,
# which RFC 9396 §12 has "sent through the user agent".
#? attests_authorization_details = false
# The `authorization_details` type the attributes are read from.
#? authorization_details_type = ""
# The `authorization_details` types that state an organisation's access.
#? organisation_types = []
# The claim holding the Verifiable Presentations of a Nuts RFC021 §6
# introspection response, `vps`.
#? presentations_claim = ""
# The credential types the deployment declares user-authenticated.
#? user_credential_types = []
# The fields every token of the issuer must carry, each with a source.
#? required_fields = []
# Whether the issuer's tokens must be sender-constrained, so the issuer fails
# to load without `sender_constraint = "required"`.
#? requires_sender_constraint = false
# The subject-token issuers whose persons this issuer is trusted to map to its
# own, when it issues onward tokens (`client::onward`).
#? exchanges_from = []
# The subject-token claim, a dotted path, whose value an onward token of this
# issuer must carry as `professional.hp_identifier`.
#? person_mapping = ""

# The assurance level the issuer's tokens carry.
#? [audit.fhir_feed.endpoint.credentials.onward.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
#? claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
#? levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"

# The data-minimisation policy: the subject namespaces, the identifier scan and
# protection, the cohort query and the access delay.
[privacy]
# The namespaces an `EHR_STATUS.subject.external_ref` may name
# (`FERROEHR__PRIVACY__SUBJECT_NAMESPACES`, comma-separated in the environment)
# — the pseudonymisation domains this deployment issues subject pseudonyms
# in.
subject_namespaces = []
# Accept `PARTY_IDENTIFIED` / `PARTY_RELATED` carrying `name` or `identifiers`
# in clinical content (`FERROEHR__PRIVACY__ALLOW_IDENTIFIED_PARTIES_IN_EHR`).
allow_identified_parties_in_ehr = false

# The identifier scanner.
[privacy.identifier_scan]
# `strict` (refuse) or `warn` (accept and record)
# (`FERROEHR__PRIVACY__IDENTIFIER_SCAN__MODE`).
mode = "strict"
# The national personal-identifier rules this deployment scans for, by rule key
# (`FERROEHR__PRIVACY__IDENTIFIER_SCAN__RULES`, comma-separated in the
# environment). An unknown key is a boot error naming it.
rules = ["ch-ahvn13", "ch-epd-pid", "de-kvnr", "fi-hetu", "gb-nhs-number", "nl-bsn", "no-fodselsnummer", "se-personnummer"]
# Extra identifier patterns this deployment refuses, as Rust regular
# expressions (`FERROEHR__PRIVACY__IDENTIFIER_SCAN__PATTERNS`, comma-separated
# in the environment).
patterns = []

# The national-identifier protection of the demographic domain; absent, off.
#? [privacy.identifier_protection]
# The scheme codes to protect
# (`FERROEHR__PRIVACY__IDENTIFIER_PROTECTION__SCHEMES`).
#? schemes = ["nl-bsn"]
# The root key, 64 hex characters
# (`FERROEHR__PRIVACY__IDENTIFIER_PROTECTION__KEY`), or its `key_file` sibling.
#? key = ""
# A file holding the root key, read at boot
# (`FERROEHR__PRIVACY__IDENTIFIER_PROTECTION__KEY_FILE`).
#? key_file = ""

# The cross-domain cohort-query allow-list and limits.
[privacy.cohort]
# The distinct-EHR floor a result set must reach to be served
# (`FERROEHR__PRIVACY__COHORT__SMALL_CELL_THRESHOLD`); `0` disables
# suppression.
small_cell_threshold = 5
# The largest cohort a predicate may select
# (`FERROEHR__PRIVACY__COHORT__MAX_COHORT_SIZE`).
max_cohort_size = 100000
# Whether a cohort may name its subjects by identifier
# (`FERROEHR__PRIVACY__COHORT__SUBJECTS`), each resolved through the installed
# EHR index provider. The one cohort form an IHE patient identity source
# serves, so it turns the surface on without a bound predicate.
subjects = false

# The bound predicates, keyed by the name a caller uses
# (`[privacy.cohort.predicates]`). Empty — the default — leaves the
# predicate half of the surface off.
# [privacy.cohort.predicates.<name>]
# The archetype HRID of the nearest archetyped ancestor of the ELEMENT
# (`openEHR-DEMOGRAPHIC-ADDRESS.address.v1`), matched case-insensitively
# against the stored, case-folded column (BASE `base_types`
# `master05-identification_package.adoc` §"Composite Identifiers and Case").
# archetype = ""
# The ELEMENT's `archetype_node_id` at-code (`at0012`).
# node = ""
# How the caller's value is matched against the leaf.
# kind = "text"

# The EHDS Art. 3(3) delay of the person's own access; absent, off.
#? [privacy.access_delay]
# The categories whose new compositions are held at creation, named as
# `[audit.categories]` names one: a priority category of Art. 14(1) by its code
# (`Laboratory-Reports`, `Medical-Imaging`, …) or as `<system>|<code>`, or a
# national category the map declares
# (`FERROEHR__PRIVACY__ACCESS_DELAY__CATEGORIES`, comma-separated). Empty holds
# nothing at creation, and a professional still holds an object by hand.
#? categories = []
# How long a hold lasts at most, a whole number of hours from `"1h"` to
# `MAX_HOURS` hours (`FERROEHR__PRIVACY__ACCESS_DELAY__MAX_DELAY`): the length
# of a hold placed at creation and the latest end a professional may give one.
# Required.
#? max_delay = "500ms"

# The record itself: the subject index, versioning, signing, the query engine,
# the change feed and multimedia.
[record]
# Who holds the subject-to-EHR cross-reference, the IHE patient identity source
# of `[pixm]` (`pixm`) or the in-instance map (`local`). No default: an unset
# index refuses the start.
#? subject_index = "pixm"

# The answer to an identical re-send.
[record.versioning]
# `idempotent_resend` (default `false`): when `true`, an update whose content
# equals the current version's commits nothing and answers with the existing
# version's `ETag` and `Location`, leaving one `resend` record on the access
# log. No `commit_audit` and no CONTRIBUTION then record the act (RM common
# master06 §Committal and Audits), which is why the default records every
# commit. The name is RFC 9110 §9.2.2's: a re-send then has the effect of one
# request.
idempotent_resend = false

# VERSION signing.
[record.signing]
# Server-side signing of committed versions. Defaults **on** so the STANDARD
# "Signing" capability is demonstrably met.
enabled = true
# Signing mode: `digest` | `pgp`.
mode = "digest"
# Armored RFC 4880 secret key; **required for `pgp` mode** (validated at boot,
# fail-closed).
#? key_file = ""
# Key passphrase, kept in `ferrohealth_secret::secret::Secret` and redacted
# from any config snapshot.
#? key_passphrase = ""
# File-based indirection for `Self::key_passphrase` (K8s/Docker secrets).
# Exactly one of the pair may be set; the loader reads and trims the file.
#? key_passphrase_file = ""
# Armored RFC 4880 **public** keys retired from signing but retained for
# verification, so versions signed before a key rotation keep verifying.
retired_key_files = []
# Read-time verification policy: `off` | `warn` | `strict`. **Unset** (the
# default) resolves via `Self::effective_verify_on_read` to `strict` when
# signing is enabled — the explicit "sign but never check" state is reachable
# only by deliberately setting `off`.
#? verify_on_read = "off"

# AQL execution knobs.
[record.query]
# Max distinct cached query plans; `0` disables the plan cache (every lookup
# misses and the full parse→lower path runs).
plan_cache_capacity = 256
# Per-query DB execution budget; `"0s"` disables it. Overrun reports `408`
# (ITS-REST `Requests_and_responses` §HTTP status codes).
timeout = "30s"
# The largest page of rows one query execution serves; `0` means unbounded.
max_result_rows = 10000

# The commit-event outbox readers and their retention.
[record.change_feed]
# The readers of the outbox feed, each a name matching `^[a-z][a-z0-9-]{0,62}$`
# (`ferrobridge`, for one). Boot registers each one and marks every reader the
# list no longer names inactive. Empty by default: no commit writes an outbox
# row.
readers = []
# How long a row is kept once every active reader has acknowledged it, counted
# from its commit instant.
retention = "7d"
# How often the retention prune runs.
prune_interval = "1h"

# `DV_MULTIMEDIA` externalization to object storage. It keeps `enabled`,
# because its store applies while it is off: blobs already offloaded are read
# back from `url`.
[record.multimedia]
# Master switch. `false` (default) = today's inline behaviour, byte for byte;
# no object store is built or contacted.
enabled = false
# A decoded `DV_MULTIMEDIA.data` strictly larger than this is offloaded to the
# object store; at or below it stays inline. Default `"256KiB"`.
threshold = "256KiB"
# S3-compatible endpoint URL (e.g. a SeaweedFS S3 gateway in dev/test, or an
# AWS/MinIO endpoint in prod). `None` uses the object_store default AWS
# endpoint resolution. Any `userinfo` in it is masked in every rendering. An
# `http://` URL is plain HTTP, which a dev SeaweedFS speaks; a `production`
# deployment names it as a gap.
#? url = ""
# Target bucket for content-addressed blobs.
bucket = "openehr-multimedia"
# AWS region (S3 requires one even for non-AWS endpoints).
region = "us-east-1"
# Access key id. `None` (with `secret_access_key` also `None`) runs the client
# unsigned/anonymous — the mode a keyless dev SeaweedFS accepts.
#? access_key_id = ""
# Secret access key (paired with `access_key_id`); never rendered.
#? secret_access_key = ""
# File-based indirection for `Self::secret_access_key` (K8s/Docker secrets).
# Exactly one of the pair may be set; the loader reads and trims the file.
#? secret_access_key_file = ""

# The outbound FHIR terminology server; absent, none is asked.
#? [terminology]
# On a binding the server cannot resolve: `accept` (the default) or `refuse`. A
# resolved non-member is refused under either setting.
#? on_error = "accept"

# `[terminology.endpoint]`, the family's outbound endpoint: the FHIR R4B base
# URL (`url`, such as `http://ferroterm:8080/r4b`, required), the timeouts, the
# `retry` of a call, the TLS and the credential. Any `userinfo` in the URL is
# masked in every rendering.
#? [terminology.endpoint]
# The service's URL (RFC 3986); required. It renders with its userinfo and its
# query masked, in `Debug` and when serialized.
#? url = ""
# How long one whole call may take; never zero.
#? timeout = "10s"
# How long opening the connection may take; unset, only `timeout` bounds it.
#? connect_timeout = "500ms"

# How a failed call is tried again.
#? [terminology.endpoint.retry]
# How many times one call is tried in all; 1 tries once.
#? max_attempts = 3
# The wait before the second try.
#? initial_backoff = "200ms"
# The longest wait between two tries.
#? max_backoff = "5s"

# The TLS of the connection, built by the product's reader of TLS material.
#? [terminology.endpoint.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The credential the calls carry: HTTP Basic or the client credentials grant.
#? [terminology.endpoint.credentials]
# The Basic user-id.
#? user = ""
# The Basic password, rendered redacted.
#? password = ""
# The file holding the Basic password.
#? password_file = ""

# The client credentials grant.
#? [terminology.endpoint.credentials.oauth]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [terminology.endpoint.credentials.oauth.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The onward target the lane reaches on a caller's behalf, authenticating with
# `oauth`.
#? [terminology.endpoint.credentials.onward]
# The identifier of the issuer of the onward tokens, whose metadata names its
# token endpoint unless `token_endpoint` is set. It renders with any userinfo
# masked, as `SecretUrl` renders itself.
#? issuer = ""
# Whose tokens the issuer signs: `persons` (a delegated exchange), `patients`
# (a patient's own token) or `federation`; required, with no default.
#? kind = "persons"
# The preset the issuer's profile starts from.
#? profile = "rfc9068"
# The token endpoint itself; empty to discover it from `issuer`. It renders
# with its userinfo and its query masked.
#? token_endpoint = ""
# The client id at this issuer; empty for the lane's own.
#? client_id = ""
# The audiences an onward token may name, at least one.
#? audiences = []
# The `resource` or `audience` values the request names, as the profile's
# `onward_indicator` says.
#? indicators = []
# The `scope` the request names; empty for none.
#? scope = ""
# The claim a chained federation route carries from the subject token to the
# onward token; empty for none.
#? correlation_claim = ""
# Whether the lane holds the tokens it obtains until they near their `exp`.
# `false` exchanges a token at the issuer on every call, a setting for a
# performance measurement's self-test, never for production. `true` by default.
#? cache = true
# Whether every token exchange sent without an actor token names the lane's
# client as its actor with an assertion signed by the current key of its
# `oauth` table's key ring (RFC 8693 §2.1; `Onward::with_actor_assertion`).
# `false` by default.
#? actor_assertion = false

# The profile keys set over the preset; `max_onward_lifetime` is required, here
# or in the preset.
#? [terminology.endpoint.credentials.onward.keys]
# `Profile::person_key`.
#? person_key = ""
# `Profile::tenant_claim`.
#? tenant_claim = ""
# `Profile::client_claims`.
#? client_claims = []
# `Profile::impersonation_marker`.
#? impersonation_marker = ""
# `Profile::expect`.
#? expect = {}
# `Profile::user_claims`.
#? user_claims = []
# `Profile::person_equality`.
#? person_equality = []
# `Profile::unstable_claims`.
#? unstable_claims = []
# `Profile::first_party_clients`.
#? first_party_clients = []
# `Profile::max_actor_chain`.
#? max_actor_chain = 0
# `Profile::act_represents_patient`.
#? act_represents_patient = false
# `Profile::token_types`.
#? token_types = []
# `Profile::required_claims`.
#? required_claims = []
# `Profile::adapter`.
#? adapter = ""
# `Profile::max_onward_lifetime`, a duration such as `"10min"`.
#? max_onward_lifetime = "500ms"
# `Profile::onward_grant`.
#? onward_grant = "token_exchange"
# `Profile::onward_indicator`.
#? onward_indicator = "resource"
# `Profile::onward_parameters`.
#? onward_parameters = {}
# `Profile::onward_client_id`.
#? onward_client_id = false
# `Profile::onward_subject_audience`.
#? onward_subject_audience = false
# `Profile::onward_preview`.
#? onward_preview = []

# `Profile::app_only`.
#? [[terminology.endpoint.credentials.onward.keys.app_only]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::guest`.
#? [[terminology.endpoint.credentials.onward.keys.guest]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::delegates`.
#? [[terminology.endpoint.credentials.onward.keys.delegates]]
# The actor's issuer.
#? issuer = ""
# The actor's `sub`.
#? sub = ""
# The client.
#? client = ""

# `Profile::representation`.
#? [terminology.endpoint.credentials.onward.keys.representation]
# The claim naming the subject the person represents.
#? claim = ""
# The claim carrying the ground of the representation, as asserted.
#? ground_claim = ""

# `Profile::scope_claim`.
#? [terminology.endpoint.credentials.onward.keys.scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# `Profile::app_only_scope_claim`.
#? [terminology.endpoint.credentials.onward.keys.app_only_scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# What a `federation` issuer asserts, over its preset's defaults;
# `exchanges_from` and `person_mapping` are required.
#? [terminology.endpoint.credentials.onward.federation]
# The `[auth.issuer]` this table describes, of kind `federation`.
#? issuer = ""
# Whether the issuer is a MyHealth@EU contact point; required, with no default.
#? contact_point = false
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# The country codes a professional may carry.
#? countries = []
# The issuing authorities a professional or provider may name.
#? issuing_authorities = []
# The prefixes a healthcare provider identifier must start with.
#? provider_identifier_prefixes = []
# Whether the issuer attests the `authorization_details` it puts in a token,
# which RFC 9396 §12 has "sent through the user agent".
#? attests_authorization_details = false
# The `authorization_details` type the attributes are read from.
#? authorization_details_type = ""
# The `authorization_details` types that state an organisation's access.
#? organisation_types = []
# The claim holding the Verifiable Presentations of a Nuts RFC021 §6
# introspection response, `vps`.
#? presentations_claim = ""
# The credential types the deployment declares user-authenticated.
#? user_credential_types = []
# The fields every token of the issuer must carry, each with a source.
#? required_fields = []
# Whether the issuer's tokens must be sender-constrained, so the issuer fails
# to load without `sender_constraint = "required"`.
#? requires_sender_constraint = false
# The subject-token issuers whose persons this issuer is trusted to map to its
# own, when it issues onward tokens (`client::onward`).
#? exchanges_from = []
# The subject-token claim, a dotted path, whose value an onward token of this
# issuer must carry as `professional.hp_identifier`.
#? person_mapping = ""

# The assurance level the issuer's tokens carry.
#? [terminology.endpoint.credentials.onward.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
#? claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
#? levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"

# The IHE PIXm patient identity source the subject index asks (ITI-83) under
# `record.subject_index = "pixm"`.
#? [pixm]
# The assigning authority of the clinical domain, an absolute URI such as
# `urn:oid:2.999.1`: the `targetSystem` of every ITI-83 query and the
# `EHR_STATUS.subject.external_ref.namespace` the answered identifier is stored
# under. It must be one of `privacy.subject_namespaces`.
#? assigning_authority = ""
# How the PIX Manager is asked: `post` (the default) or `get`.
#? method = "post"

# `[pixm.endpoint]`, the family's outbound endpoint: the FHIR base URL of the
# PIX Manager (`url`, the `[base]` of `[base]/Patient/$ihe-pix`, PIXm
# §2:3.83.4.1.2), the timeout of one ITI-83 exchange, its `retry`, the TLS
# (trust roots for a PIX Manager behind a private PKI, a client identity for
# mutual TLS) and the credential, such as the OAuth 2.0 client credentials
# grant whose access token every request carries (IUA ITI-72 §3.72.4.2). Any
# `userinfo` in the URL is masked in every rendering.
#? [pixm.endpoint]
# The service's URL (RFC 3986); required. It renders with its userinfo and its
# query masked, in `Debug` and when serialized.
#? url = ""
# How long one whole call may take; never zero.
#? timeout = "10s"
# How long opening the connection may take; unset, only `timeout` bounds it.
#? connect_timeout = "500ms"

# How a failed call is tried again.
#? [pixm.endpoint.retry]
# How many times one call is tried in all; 1 tries once.
#? max_attempts = 3
# The wait before the second try.
#? initial_backoff = "200ms"
# The longest wait between two tries.
#? max_backoff = "5s"

# The TLS of the connection, built by the product's reader of TLS material.
#? [pixm.endpoint.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The credential the calls carry: HTTP Basic or the client credentials grant.
#? [pixm.endpoint.credentials]
# The Basic user-id.
#? user = ""
# The Basic password, rendered redacted.
#? password = ""
# The file holding the Basic password.
#? password_file = ""

# The client credentials grant.
#? [pixm.endpoint.credentials.oauth]
# The issuer whose metadata names the token endpoint; exclusive with
# `token_endpoint`. It renders with any userinfo masked, as `SecretUrl` renders
# itself.
#? issuer = ""
# The token endpoint itself; exclusive with `issuer`. It renders with its
# userinfo and its query masked.
#? token_endpoint = ""
# The client identifier.
#? client_id = ""
# How the client authenticates.
#? client_auth = "client_secret_basic"
# The client secret, rendered redacted.
#? client_secret = ""
# The file holding the client secret.
#? client_secret_file = ""
# The PEM file holding the private key of the client assertion under
# `private_key_jwt`, and of the actor assertion of an onward exchange
# (`credentials.onward.actor_assertion`) whatever the client authentication.
#? private_key_file = ""
# The `kid` the assertion names; the RFC 7638 thumbprint when empty.
#? kid = ""
# The algorithm the assertion is signed with; when unset, by key type, an EC
# key by its curve (P-256 ES256, P-384 ES384).
#? assertion_alg = ""
# The `scope` request parameter; empty for none.
#? scope = ""
# The RFC 8707 resource indicator; empty for none.
#? resource = ""
# The `audience` request parameter; empty for none.
#? audience = ""
# How long before the token expires a new one is fetched.
#? refresh_margin = "30s"
# How long one call to the authorization server may take.
#? timeout = "10s"
# The `aud` of a `private_key_jwt` assertion: `token_endpoint` (the default) or
# `issuer`, which needs `issuer` set.
#? assertion_audience = "token_endpoint"
# The PEM file of the `DPoP` key the tokens are bound to (RFC 9449).
#? dpop_key_file = ""
# Whether the tokens are bound to the client certificate (RFC 8705 §3).
#? certificate_bound = false
# The security profile: `oauth2` (the default) or `fapi2`.
#? security_profile = "oauth2"
# The hosts a FAPI 2.0 mutual-TLS alias may be on (RFC 8705 §5).
#? mtls_alias_hosts = []
# The PEM file of the previous assertion key, published, never signing.
#? previous_private_key_file = ""
# How long the previous key stays published; `0s` for as long as it is set.
#? previous_key_overlap = "0s"
# The PEM file of the next assertion key, published and never signing.
#? next_private_key_file = ""
# The RFC 9396 `authorization_details` JSON text; empty for none.
#? authorization_details = ""

# The TLS of the token endpoint connection: trust roots beside the platform's,
# the client identity presented over mutual TLS (RFC 8705 §2) and the minimum
# version. The crate reads none of it: a table that names material resolves
# through the product's `TlsBuilder`.
#? [pixm.endpoint.credentials.oauth.tls]
# The client certificate chain and its private key, in one PEM.
#? client_identity = ""
# A file holding `client_identity`.
#? client_identity_file = ""
# A PEM bundle of trust roots beside the platform's.
#? trust_roots_file = ""
# The oldest TLS version the client speaks: `"1.3"` unless lowered to `"1.2"`,
# as for the listener.
#? min_version = "1.3"

# The onward target the lane reaches on a caller's behalf, authenticating with
# `oauth`.
#? [pixm.endpoint.credentials.onward]
# The identifier of the issuer of the onward tokens, whose metadata names its
# token endpoint unless `token_endpoint` is set. It renders with any userinfo
# masked, as `SecretUrl` renders itself.
#? issuer = ""
# Whose tokens the issuer signs: `persons` (a delegated exchange), `patients`
# (a patient's own token) or `federation`; required, with no default.
#? kind = "persons"
# The preset the issuer's profile starts from.
#? profile = "rfc9068"
# The token endpoint itself; empty to discover it from `issuer`. It renders
# with its userinfo and its query masked.
#? token_endpoint = ""
# The client id at this issuer; empty for the lane's own.
#? client_id = ""
# The audiences an onward token may name, at least one.
#? audiences = []
# The `resource` or `audience` values the request names, as the profile's
# `onward_indicator` says.
#? indicators = []
# The `scope` the request names; empty for none.
#? scope = ""
# The claim a chained federation route carries from the subject token to the
# onward token; empty for none.
#? correlation_claim = ""
# Whether the lane holds the tokens it obtains until they near their `exp`.
# `false` exchanges a token at the issuer on every call, a setting for a
# performance measurement's self-test, never for production. `true` by default.
#? cache = true
# Whether every token exchange sent without an actor token names the lane's
# client as its actor with an assertion signed by the current key of its
# `oauth` table's key ring (RFC 8693 §2.1; `Onward::with_actor_assertion`).
# `false` by default.
#? actor_assertion = false

# The profile keys set over the preset; `max_onward_lifetime` is required, here
# or in the preset.
#? [pixm.endpoint.credentials.onward.keys]
# `Profile::person_key`.
#? person_key = ""
# `Profile::tenant_claim`.
#? tenant_claim = ""
# `Profile::client_claims`.
#? client_claims = []
# `Profile::impersonation_marker`.
#? impersonation_marker = ""
# `Profile::expect`.
#? expect = {}
# `Profile::user_claims`.
#? user_claims = []
# `Profile::person_equality`.
#? person_equality = []
# `Profile::unstable_claims`.
#? unstable_claims = []
# `Profile::first_party_clients`.
#? first_party_clients = []
# `Profile::max_actor_chain`.
#? max_actor_chain = 0
# `Profile::act_represents_patient`.
#? act_represents_patient = false
# `Profile::token_types`.
#? token_types = []
# `Profile::required_claims`.
#? required_claims = []
# `Profile::adapter`.
#? adapter = ""
# `Profile::max_onward_lifetime`, a duration such as `"10min"`.
#? max_onward_lifetime = "500ms"
# `Profile::onward_grant`.
#? onward_grant = "token_exchange"
# `Profile::onward_indicator`.
#? onward_indicator = "resource"
# `Profile::onward_parameters`.
#? onward_parameters = {}
# `Profile::onward_client_id`.
#? onward_client_id = false
# `Profile::onward_subject_audience`.
#? onward_subject_audience = false
# `Profile::onward_preview`.
#? onward_preview = []

# `Profile::app_only`.
#? [[pixm.endpoint.credentials.onward.keys.app_only]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::guest`.
#? [[pixm.endpoint.credentials.onward.keys.guest]]
# The claim of `{ claim, value }`.
#? claim = ""
# The value of `{ claim, value }`.
#? value = ""
# The claim of `{ absent_claim }`.
#? absent_claim = ""
# The subjects of `{ subjects }`.
#? subjects = []
# The `{ sub_is_client = true }` form.
#? sub_is_client = false
# The claim of `{ differs_from_iss }`.
#? differs_from_iss = ""

# `Profile::delegates`.
#? [[pixm.endpoint.credentials.onward.keys.delegates]]
# The actor's issuer.
#? issuer = ""
# The actor's `sub`.
#? sub = ""
# The client.
#? client = ""

# `Profile::representation`.
#? [pixm.endpoint.credentials.onward.keys.representation]
# The claim naming the subject the person represents.
#? claim = ""
# The claim carrying the ground of the representation, as asserted.
#? ground_claim = ""

# `Profile::scope_claim`.
#? [pixm.endpoint.credentials.onward.keys.scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# `Profile::app_only_scope_claim`.
#? [pixm.endpoint.credentials.onward.keys.app_only_scope_claim]
# The claim.
#? claim = ""
# Its JSON form.
#? form = "string"

# What a `federation` issuer asserts, over its preset's defaults;
# `exchanges_from` and `person_mapping` are required.
#? [pixm.endpoint.credentials.onward.federation]
# The `[auth.issuer]` this table describes, of kind `federation`.
#? issuer = ""
# Whether the issuer is a MyHealth@EU contact point; required, with no default.
#? contact_point = false
# The default sources the table starts from.
#? mapping = "iua"
# The sources of each field, over the mapping's.
#? fields = {}
# The country codes a professional may carry.
#? countries = []
# The issuing authorities a professional or provider may name.
#? issuing_authorities = []
# The prefixes a healthcare provider identifier must start with.
#? provider_identifier_prefixes = []
# Whether the issuer attests the `authorization_details` it puts in a token,
# which RFC 9396 §12 has "sent through the user agent".
#? attests_authorization_details = false
# The `authorization_details` type the attributes are read from.
#? authorization_details_type = ""
# The `authorization_details` types that state an organisation's access.
#? organisation_types = []
# The claim holding the Verifiable Presentations of a Nuts RFC021 §6
# introspection response, `vps`.
#? presentations_claim = ""
# The credential types the deployment declares user-authenticated.
#? user_credential_types = []
# The fields every token of the issuer must carry, each with a source.
#? required_fields = []
# Whether the issuer's tokens must be sender-constrained, so the issuer fails
# to load without `sender_constraint = "required"`.
#? requires_sender_constraint = false
# The subject-token issuers whose persons this issuer is trusted to map to its
# own, when it issues onward tokens (`client::onward`).
#? exchanges_from = []
# The subject-token claim, a dotted path, whose value an onward token of this
# issuer must carry as `professional.hp_identifier`.
#? person_mapping = ""

# The assurance level the issuer's tokens carry.
#? [pixm.endpoint.credentials.onward.assurance]
# The claim carrying the authentication context class, a dotted path; `acr` by
# default (OpenID Connect Core 1.0 §2).
#? claim = "acr"
# The level each claim value the issuer emits stands for; a value the map does
# not name carries none.
#? levels = {}
# The level a request held to the section must carry; none refuses nothing.
#? minimum = "low"