Configuration

acdp-registry is configured by a TOML file layered with environment-variable overrides. There is no clap CLI — config loading is the config crate plus env vars (same dependency-minimization principle as acdp-rs). The schema is RegistryConfig in crates/acdp-registry-types/src/config.rs; a worked example is config/registry.example.toml.

Loading and precedence

built-in defaults  <  TOML file  <  ACDP_REGISTRY_* env vars
  • An ACDP_REGISTRY_<SECTION>__<FIELD> variable that is set but empty counts as absent (the TOML value stays) and is logged as a warning at startup, because docker compose renders an unset ${VAR:-} as empty.

  • The TOML file path comes from ACDP_REGISTRY_CONFIG; when unset the binary falls back to its defaults (dev runs use SQLite under ./data/registry.db).

  • Env overrides use ACDP_REGISTRY_<SECTION>__<FIELD> — a single underscore after the ACDP_REGISTRY prefix, then double underscores between nesting levels:

    export ACDP_REGISTRY_STORAGE__POSTGRES_URL="postgres://acdp:acdp@db:5432/acdp"
    export ACDP_REGISTRY_AUTH__JWT_SECRET="$(openssl rand -base64 32)"
    export ACDP_REGISTRY_AUTH__JWT_SIGNING_ALG="EdDSA"

List-valued fields from the environment

Exactly two fields accept a comma-separated env value, and they are named explicitly in the loader (with_list_parse_key, config.rs):

export ACDP_REGISTRY_AUTH__DID_METHODS="did:web,did:key"
export ACDP_REGISTRY_REGISTRY__PROFILES="acdp-registry-core,acdp-registry-discovery"

Every other field — including base64 secrets, which is the reason the rule is a whitelist rather than "split anything containing a comma" — deserializes from the environment as a plain scalar. A comma in one of those values is part of the value.

Settings that cannot be expressed as env vars at all — and their escape hatches

auth.tenant_agents, playground.pinned_keys and keyless.oidc_issuers are lists of structs. Comma-splitting can only ever produce a Vec<String>, so the ordinary ACDP_REGISTRY_<SECTION>__<FIELD> mechanism cannot represent them. On a platform with no config-file mechanism — Railway "deploy from image" services are the motivating case — they would otherwise be unreachable.

Three JSON escape hatches exist for exactly this. They are read directly rather than through the env layer, and are applied after every other source, so they win if both a TOML file and the variable are present:

VariableSetsValue
ACDP_REGISTRY_AUTH__TENANT_AGENTS_JSONauth.tenant_agentsJSON array of {agent_did, tenant_id}
ACDP_REGISTRY_AUTH__READ_TOKENS_JSONauth.read_tokensJSON array of {id, did, sha256, operator_administered, expires_at?, tenant?} (hashes only, never tokens)
ACDP_REGISTRY_PLAYGROUND__PINNED_KEYS_JSONplayground.pinned_keysJSON array of {agent_did, public_key_b64, algorithm?, valid_from?, valid_until?}
ACDP_REGISTRY_KEYLESS__OIDC_ISSUERS_JSONkeyless.oidc_issuersJSON array of {issuer, jwks_uri?}
export ACDP_REGISTRY_AUTH__TENANT_AGENTS_JSON='[{"agent_did":"did:web:agent.example.com","tenant_id":"acme"}]'

Invalid JSON fails startup with the variable's name in the message; it is never silently ignored. Note that these replace the whole list rather than merging into a TOML-configured one.

Environment variables outside the config tree

These are read directly by the binary and have no TOML equivalent, so they do not appear in the Reference below:

VariableEffectDefault
ACDP_REGISTRY_CONFIGPath to the TOML file. Unset means built-in defaults only.unset
ACDP_LOG_FORMATjson or pretty. pretty is for interactive runs; json is what you want behind a log collector.json
RUST_LOGStandard tracing filter. When unset the binary uses info,acdp=info,acdp_registry=info.unset

ACDP_TEST_EGRESS is not an operator setting. The variable is read only by a test build of the binary, one compiled with the acdp-registry-core test-egress feature, which only this repository's [dev-dependencies] enable. cargo build, cargo build --release and the published image ignore it entirely. The spawned-binary keyless test (tests/keyless_e2e.rs) uses it to point the binary's DID resolver and keyless issuer-key fetcher at a loopback HTTPS host.

Startup validation

The binary validates config before serving and refuses to boot on a misconfig (validate_config in crates/acdp-registry-server/src/main.rs). It enforces:

  • Lifecycle state — separately from validate_config, the binary refuses to start with [lifecycle] enabled = false over a store that already holds lifecycle state; see [lifecycle].

  • Auth — jwt_signing_alg ∈ EdDSA. EdDSA requires a non-empty jwt_private_key_pem. HS256 with an empty jwt_secret requires allow_ephemeral_secret = true, otherwise it fails. A non-empty jwt_secret is checked whether or not auth is enabled: it is rejected if it is the literal changeme (case-insensitive, after trimming), and must decode to ≥32 bytes. Under EdDSA jwt_secret is not examined at all.

    Note the asymmetry, and note that it is only partial. Inside validate_config the non-empty-jwt_secret rule is the only one in this bullet not gated on auth.enabled — but "gated here" is not the same as "not enforced", and the three gated rules do not behave alike. Measured against the binary with auth.enabled = false:

    • Algorithm check — an unrecognised jwt_signing_alg boots, falling through to the HS256 default. Genuinely not enforced.
    • Empty-secret rule — an empty secret boots. Genuinely not enforced, and deliberately: that is a supported configuration.
    • EdDSA jwt_private_key_pem — an empty PEM still refuses to boot, from the serve path, after migrations have run. Gated here, enforced anyway, late.

    So a bad jwt_secret is refused either way and refused before migrations; a missing EdDSA PEM is refused either way but only after them. Closing that second case is not done here.

  • Admin tokens — every entry in auth.admin_tokens must be non-blank and carry no leading or trailing whitespace. An empty list remains valid and still means "admin routes disabled"; it is a bad entry that is refused. One bad entry is enough: the allowlist compare folds over every entry, so a blank one is admitted alongside real tokens while the list still looks populated. A bare Authorization: Bearer matches a blank entry over HTTP/2, which preserves trailing header whitespace (HTTP/1.1 strips it before the handler sees it, so the same request is refused there).

  • Webhook — when enabled, url must be non-empty and pass the SSRF policy (HTTPS, no private/internal authorities), and secret must be non-empty.

  • Multi-tenancy — a non-empty [[auth.tenant_agents]] requires require_tenant = true (you can't half-enable tenancy). Either tenancy signal — a non-empty [[auth.tenant_agents]] or require_tenant = true — also requires a tenancy-aware storage backend (SQLite/Postgres). The memory backend records no tenant and reports the reserved default for every row, so every tenant-scoped read would return zero rows; an untenanted memory registry still starts.

  • Tenant header trust (#374) — auth.tenant_header_trust = "trusted_proxies" with an empty rate_limit.trusted_proxies is refused (no peer could ever be trusted). require_tenant = true with no [[auth.tenant_agents]] and the header distrusted ("none", the default) is refused (no request could ever resolve a tenant). A /0 entry in rate_limit.trusted_proxies (0.0.0.0/0, ::/0) is refused: it would trust every peer (#391). One warning, not a refusal: any_peer on a non-loopback bind. (0.3.x also warned when the unset key fell back to any_peer; since 0.4.0 an unset key means none in every mode, #386.)

  • Bind safety — a non-loopback bind with neither TLS nor auth requires an explicit allow_public_bind = true.

  • TLS — when tls.enabled, cert_path and key_path must exist on disk.

  • DID methods — auth.did_methods entries must be did:web or did:key, and did:web must be present (RFC-ACDP-0007 §3.1).

  • Playground — playground.enabled = true with playground.pinned_only = true and an empty [[playground.pinned_keys]] list is refused at startup, whether or not [receipt] is configured. Not because it is too strict: pinned_only has no effect while pinned_keys is empty, so the registry would fall through to the fully unverified publish path, accepting unverified publishes from every non-did:key agent (did:key identities are self-verifying and never reach this gate). Add a pinned key, or set playground.enabled = false.

  • Pinned-key entries — each [[playground.pinned_keys]] entry must be usable, not merely present. Five refusals, each naming the offending entry by index and DID:

    1. algorithm is not ed25519 or ecdsa-p256 (exact match, case-sensitive).
    2. public_key_b64 is not valid base64.
    3. an ed25519 key does not decode to 32 bytes.
    4. an ecdsa-p256 key does not decode to 65 bytes, or does not begin 0x04 (SEC1 uncompressed).
    5. valid_from >= valid_until — a window that can never be open.

    These are checked regardless of playground.enabled, so a latent typo surfaces before the flag is flipped rather than after. Startup is the only place the detail is legible: at request time such an entry fails as an internal_error, whose wire message is redacted to the static string "internal error" (RFC-ACDP-0007 §5), leaving the operator a 500 with no indication that the cause is a config typo.

    Upgrade note — a config that boots today can be refused after this change. Any entry matching one of the five above is now fatal, however harmless it looked before. Three shapes account for essentially all of it, in rising order of how quiet they were:

    • A rotated-out entry left in place with broken key material — expired and malformed. Completely inert before: pinned_for_at filters on the validity window, so nothing ever decoded it. Nothing was wrong at runtime, and now the registry will not start.
    • Any broken entry at all while playground.enabled = false. These rules do not consult enabled, so a section you consider switched off is still validated.
    • A currently-live entry with a typo'd algorithm or bad key material. This one was already failing — but only for that single agent's publishes, as an opaque 500, which is why it can sit unnoticed for a long time. It is now refused up front for everyone.

    Delete rotated-out entries rather than leaving them broken. If a registry that has been running for months suddenly will not start after an upgrade, this is the first thing to check.

    Not a refusal — a startup warning: a list where no entry is currently within its validity window (all expired, or all future-dated). This is not fatal because expiry is time-dependent — refusing would make bootability a function of the wall clock rather than of the config file — and because in lax mode the state is identical to having no pins at all, which is supported. The warning branches, because the two modes do opposite things: with pinned_only = true every did:web publish is rejected until a key is rotated in; with pinned_only = false publishes from those agents are accepted with no signature check, i.e. pinning is silently inert. The second is the one worth an alert.

    The same rules gate POST /admin/pinned-keys/reload, so a reload cannot install a config startup would refuse — see HTTP-API.md. Both doors call one function, validate_playground_config in crates/acdp-registry-core/src/playground.rs, rather than each keeping its own copy of the rules.

  • Receipts — a configured [receipt] key must parse (exactly one source, valid base64, 32 bytes), and is incompatible with playground.enabled = true unless playground.pinned_only = true with at least one [[playground.pinned_keys]] entry (RFC-ACDP-0010 §7: a receipts registry has no unverified publish path).

  • Profile allowlist (REG-5) — every entry in registry.profiles must be one of the ten registry profiles the pinned ACDP spec defines (REGISTRY_ADVERTISABLE_PROFILES in crates/acdp-registry-types/src/ config.rs: acdp-registry-core, acdp-registry-discovery, acdp-registry-federated, acdp-registry-receipts, acdp-registry-head-receipts, acdp-registry-transparency-log, acdp-registry-lifecycle, acdp-registry-changes, acdp-registry-events, acdp-registry-keyless). acdp-registry-changes, acdp-registry-events and acdp-registry-keyless are advertised automatically when [changes], [events] and [keyless] are enabled (see [changes], [events] and [keyless]); listing one without enabling it is refused. This is checked before any other registry.profiles-dependent guard below, so a typo or an out-of-scope profile is reported first. acdp-log-witness is explicitly rejected with a dedicated message: a witness is not a registry (RFC-ACDP-0015 §6.1) — a registry MAY aggregate cosignatures under acdp-registry-transparency-log without ever advertising acdp-log-witness itself. A non-Rust consumer (a fixture, a console, a validator) can read the same set as data from docs/advertisable-profiles.json — vendor it at an acdp-registry-types/vX.Y.Z release tag (e.g. https://raw.githubusercontent.com/agentcontextdistributionprotocol/acdp-registry-rs/acdp-registry-types/v0.2.0/docs/advertisable-profiles.json) and diff it on a version bump. A unit test (advertisable_profiles_json_matches_const) keeps it identical to the const, so a profile removed or renamed here turns this repo's CI red until the file is updated.

  • 0.3.0 profiles — receipt.head_receipts = true requires a configured [receipt] signing key (RFC-ACDP-0011 §9: head receipts are signed with the receipt key). log.enabled = true likewise requires a [receipt] key (RFC-ACDP-0012 §11: leaves bind receipt hashes and checkpoints sign with the receipt key), a durable storage backend (SQLite/Postgres — the memory backend cannot honor the append-only history commitment), and a well-formed log.instance ([a-z0-9-]{1,32}). Listing acdp-registry-head-receipts, acdp-registry-lifecycle, or acdp-registry-transparency-log in registry.profiles without enabling the matching feature is refused as a false capability advertisement; so is listing acdp-registry-receipts without a configured [receipt] signing key.

  • Witnesses (0.4.0) — [[witnesses]] requires log.enabled = true (RFC-ACDP-0015 §6.1: there are no checkpoints to witness without a log); each did must be a did:web DID and each url must pass the SSRF policy (HTTPS, non-private host).

  • Rate limiting (FEAT-06) — every rate_limit.trusted_proxies entry must be a valid CIDR (or bare IP), so a typo fails the boot rather than silently disabling XFF trust, and no entry may have a /0 prefix (#391: it would trust XFF, and under trusted_proxies tenant trust, from every peer). A non-empty trusted_proxies with rate_limit.enabled = false is refused (the list would be parsed for nothing) — unless read_limits.enabled = true or auth.tenant_header_trust = "trusted_proxies", the list's other consumers. rate_limit.forwarded_header_trust = "any_peer" boots with a warning that names its assumption (see [rate_limit]).

  • Read limits (RFC-ACDP-0008 §4.3) — read_limits.enabled = true with both anonymous_per_minute and authenticated_per_minute at 0 is refused (a limiter that limits nothing), and so is advertise = true without enabled (a ceiling the registry would not enforce). advertise = true logs a warning naming acdp 0.19 consumers, or a different one when no ceiling qualifies.

  • Metrics (FEAT-10) — when metrics.enabled, duration_buckets must be non-empty, positive, finite, and strictly increasing (Prometheus histogram bounds).

  • Keyless (RFC-ACDP-0021) — nothing in [keyless] is read while enabled = false. With enabled = true the binary refuses to start unless: lifecycle.enabled = true and a [receipt] signing key are set (an attestation is a receipted body signed with the receipt key, §5.3); log.enabled = true (every attestation is logged, §5.2 step 8); the binary's acdp_version claim is at least 0.5.0; at least one [[keyless.oidc_issuers]] or [[keyless.spiffe_trust_domains]] entry exists; and every key passes the bounds in [keyless]. Listing acdp-registry-keyless in registry.profiles with enabled = false is refused as a false capability advertisement.

Reference

Defaults below are the struct defaults; the example TOML may set different values for illustration. Env var = ACDP_REGISTRY_ + the bracketed path.

[registry]

KeyTypeDefaultNotes
authoritystring—Bare lowercase DNS name. Mints ctx_id and is the did:web registry id.
portu168443Listen port.
bindstring127.0.0.1Bind address. Non-loopback needs TLS/auth or allow_public_bind.
allow_public_bindboolfalseOpt-in to bind a public interface without TLS/auth.
base_urlstringhttps://{authority}Public URL advertised to consumers / federation control plane.
profilesstring[]["acdp-registry-core","acdp-registry-discovery"]Advertised in capabilities. Must be a subset of the ten acdp-registry-* profiles the pinned spec defines (acdp-registry-changes needs [changes] enabled = true, acdp-registry-events needs [events] enabled = true, acdp-registry-keyless needs [keyless] enabled = true) — any other value (including acdp-log-witness, which is not a registry profile) fails startup.
cross_registry_resolutionbooltrueForward foreign ctx_ids to their home registry; false returns 404 instead.

[registry.tls]

KeyTypeDefaultNotes
enabledboolfalseServe HTTPS directly via rustls. Usually terminate TLS upstream instead.
cert_pathpath—Required when enabled.
key_pathpath—Required when enabled.

[registry.cors]

KeyTypeDefaultNotes
allowed_originsstring[][]Empty disables CORS (no headers sent). List your UI origin(s) to opt in. A configured origin may also read the Location header of a POST /contexts reply (Access-Control-Expose-Headers: location).
public_readsboolfalseLet any origin make anonymous reads: Access-Control-Allow-Origin: * on GET/HEAD and their preflights, no credentials, no request header beyond the CORS-safelisted ones (so a browser cannot send Authorization cross-origin), and location and x-request-id exposed. Every cross-origin request is therefore an anonymous read (RFC-ACDP-0008 §6.3) and sees exactly what an anonymous curl sees. POST cannot be preflighted cross-origin (a header-less text/plain POST still gets * on its response, as CORS only filters methods at preflight, but it is anonymous and refused by the JSON extractor). For a public registry that browser-side verifiers should be able to read. Leave it off on a registry reachable only from a private network, and set metrics.bearer_token if /metrics is protected only by source IP: any page a visitor on an allowed IP opens could otherwise read it. Mutually exclusive with allowed_origins (refused at startup). Env: ACDP_REGISTRY_REGISTRY__CORS__PUBLIC_READS.

[storage]

KeyTypeDefaultNotes
backendenumsqlitepostgres | sqlite | memory. Must match the compiled storage feature.
postgres_urlstring—Required when backend = "postgres".
sqlite_pathpath./data/registry.dbSQLite file.
max_connectionsu3220sqlx pool size.

The storage backend is also chosen at compile time via the acdp-registry-server Cargo features (storage-sqlite default, storage-pg, storage-memory). The backend config key must agree with the built binary. The memory backend is demo/ephemeral only (nothing survives a restart), and its q= search is a case-insensitive substring match of the whole query, not the stemmed all-words match of SQLite/Postgres.

[auth]

KeyTypeDefaultNotes
enabledboolfalseMounts /auth/* and turns on the bearer/visibility gates.
did_methodsstring[]["did:web"]Allowed DID methods; advertised in capabilities.
jwt_signing_algstringHS256HS256 or EdDSA. See AUTHENTICATION.md.
jwt_secretstring""HS256 secret — base64, ≥32 bytes. Never published.
allow_ephemeral_secretboolfalseHS256 dev escape hatch: random process-lifetime key when jwt_secret is empty.
jwt_private_key_pemstring""EdDSA Ed25519 private key (PKCS#8 PEM). Required for EdDSA.
jwt_kidstring""Optional explicit JWKS key id; default is the public-key fingerprint.
token_ttl_secondsu643600JWT lifetime.
challenge_ttl_secondsu64300Challenge nonce validity.
token_leeway_secondsu6430Clock-skew tolerance for exp.
anonymous_public_readsboolfalseAllow unauthenticated reads of public contexts. Opt in for discovery hubs.
require_tenantboolfalseStrict multi-tenancy: requests resolving to no tenant are denied. See MULTI-TENANCY.md.
tenant_header_trust"none" | "trusted_proxies" | "any_peer"unset: "none" in every mode (0.4.0, #386; 0.3.x used "any_peer" when require_tenant = false)Who may select a tenant with X-Tenant-Id when no signed claim or agent binding applies. trusted_proxies: only when the immediate TCP peer (not X-Forwarded-For) is in rate_limit.trusted_proxies. An untrusted header that disagrees with the claim/binding, or has none to agree with, is 403 not_authorized. See MULTI-TENANCY.md.
admin_tokensstring[][]Bearer tokens for /admin/*. Entries must be non-empty and not whitespace-only (startup validation). An empty list disables every admin-bearer-gated route: /admin/status, /admin/lineages/{id}/audit, /admin/contexts/{id}/retract, /admin/contexts/{id}/republish, GET /admin/contexts, /admin/pinned-keys/reload. See HTTP-API.md#admin.
max_read_tokens_per_didusize5Most [[auth.read_tokens]] entries one DID may hold. At least 2, so a token can be rotated without a gap.

[[auth.tenant_agents]]

Repeatable. Binds a producing/consuming agent to a tenant.

KeyTypeNotes
agent_didstringFull DID of the agent.
tenant_idstringTenant the agent is scoped to (default is reserved).

[[auth.read_tokens]]

Repeatable. One RFC-ACDP-0008 §6.2 bearer_static read token, stored as a hash. Requires auth.enabled = true. Mint with acdp-registry read-token generate. See AUTHENTICATION.md.

KeyTypeNotes
idstringOperator label, unique. Appears in startup messages; the token never does.
didstringThe requester DID the token reads as. Must use a method in auth.did_methods.
sha256stringLowercase hex SHA-256 of the full token (64 characters), unique.
operator_administeredboolMust be true: config may bind only a DID this operator administers.
expires_atRFC 3339 timestampOptional. The token stops validating at this instant.
tenantstringOptional tenant binding (not default); falls back to the DID's [[auth.tenant_agents]] entry.

Startup refuses entries while auth.enabled = false, max_read_tokens_per_did below 2, an empty or duplicate id, a malformed or duplicate hash, a DID of an unaccepted method, operator_administered other than true, an empty or reserved tenant, and more than max_read_tokens_per_did entries per DID. It warns about an already-expired entry and about a DID holding a single token. Removing an entry and restarting revokes the token.

[[auth.revocation_feeds]]

Repeatable. A peer issuer (for example a control plane) whose revocations this registry mirrors. This registry only consumes feeds; it serves no /auth/revocations of its own (deferred, see STATUS.md).

KeyTypeDefaultNotes
issuerstring—Peer DID; each fetched entry's iss must match.
feed_urlstring—The peer issuer's /auth/revocations URL.
admin_tokenstring—Bearer for the peer's feed.
poll_secondsu64300Poll interval.

[webhook]

KeyTypeDefaultNotes
enabledboolfalse
urlstring""HMAC-signed POST target. SSRF-policy gated.
secretstring""HMAC-SHA256 key; must be non-empty when enabled.
timeout_secondsu645Per-delivery timeout.
max_retriesu323Exponential backoff (250 ms → cap 15 s).
queue_capacityusize1024Bounded in-memory queue; events drop (with a warn) when full.

See WEBHOOKS.md.

[limits]

KeyTypeDefaultNotes
max_payload_bytesu641048576Publish body cap (enforced by the body-limit layer on every route).
max_embedded_bytesu6465536Cap on an inline data_ref value.
idempotency_key_ttl_secondsu6486400Idempotency-Key replay window; advertised in capabilities.
publish_rate_per_minuteu3260Per-agent POST /contexts cap; 0 disables. In-memory, per-process.
challenge_rate_per_minuteu3260Per-agent POST /auth/challenge cap; 0 disables. In-memory, per-process.

These are per-process in-memory fixed-window counters — see OPERATIONS.md · Rate limiting for the multi-replica caveat.

[rate_limit] (FEAT-06)

Per-IP and process-global rate limiting on the /auth/* endpoints (token issuance / refresh / revoke), applied as middleware over the whole /auth/* subrouter — on top of the per-agent [limits] budgets. The [limits] buckets key on the caller-supplied agent_id, which an unauthenticated attacker controls and can rotate to defeat the per-key limit; these two bounds are attacker-independent.

KeyTypeDefaultNotes
enabledbooltrueMaster switch. On by default — /auth/* is the most attacker-controllable surface.
per_ip_per_minuteu3260Per-resolved-client-IP cap on /auth/*; 0 disables the per-IP bound.
global_per_minuteu326000Whole-process ceiling across all IPs; 0 disables it. Bounds a source-IP-rotating flood.
trusted_proxieslist<CIDR>[]Reverse-proxy CIDRs whose X-Forwarded-For is trusted. Empty = never trust XFF. Also the gateway list for auth.tenant_header_trust = "trusted_proxies", matched against the immediate TCP peer; allowed with enabled = false in that mode. Entries are matched as written against the IPv4-canonicalised peer: list IPv4 gateways in IPv4 form (an ::ffff:… entry never matches). A /0 entry is refused at startup.
forwarded_header_trust"trusted_proxies" | "any_peer""trusted_proxies"When X-Forwarded-For may name the client for every per-IP limiter: /auth/*, keyless minting and anonymous reads ([read_limits]). trusted_proxies: only from a TCP peer in trusted_proxies. any_peer: from every peer — for a platform edge whose addresses cannot be listed. See below.
forwarded_skip_rightmostu8 (0–4)0How many rightmost X-Forwarded-For entries the edge appends after the client, discarded before the client is read. Railway rewrites the header to <client>, <edge address>, so it needs 1. Refused at startup above 4, or while the header is never read (trusted_proxies mode with no trusted_proxies). See below.
backend"memory" | "postgres""memory"Where the two ceilings above are counted. memory: per process (each replica counts for itself). postgres: counted once across every replica sharing the database — see Shared backend below.
backend_unavailable"allow" | "deny""allow"Only with backend = "postgres". What to do when the database cannot answer a check: allow falls back to the per-process limit; deny refuses with 429 + Retry-After: 5.
backend_timeout_msu64250Only with backend = "postgres". Per-check timeout against the database; must be > 0.
backend_prune_secondsu64300Only with backend = "postgres". How often stale counter rows are deleted; must be > 0.

Shared backend (multi-replica). With backend = "postgres", the per-IP and global ceilings are counted in the registry's own Postgres database (table rate_limit_windows, an UNLOGGED table) so they hold across replicas instead of per replica. The in-memory limiter stays in front as a pre-filter, with the same limits: a request it rejects never touches the database, so database writes are bounded by the in-memory limits (at most 2 × global_per_minute statements per limiter window per replica) however large a flood is, and enabling the shared backend can only tighten enforcement relative to per-process limiting. Startup refuses the combination unless storage.backend = "postgres", enabled = true and global_per_minute > 0 (the global ceiling is what bounds database load when an attacker rotates source IPs), and refuses a zero backend_timeout_ms or backend_prune_seconds. If the database cannot answer, backend_unavailable decides: the default allow degrades to exactly today's per-process limiting rather than turning a database blip into a token-issuance outage; a stalled check adds up to backend_timeout_ms to a request (two checks per /auth/* request). The counters are ephemeral: after a database crash or standby promotion one window's budget resets once. Nothing here is needed on a single replica.

Client-IP resolution & the trusted-proxy decision (security). The client IP defaults to the TCP socket peer. X-Forwarded-For is caller-supplied and is never trusted unless the socket peer is itself in one of the trusted_proxies ranges — otherwise any client could spoof its source IP to evade the per-IP budget or frame another address. When the peer is a trusted proxy, the real client is taken from the rightmost X-Forwarded-For entry that is not itself a trusted proxy (walking a chain of trusted hops from the right). Several X-Forwarded-For header lines are read as one list in arrival order, so a proxy that adds its hop as a new line rather than appending still has the last word. List only proxies you operate; a wrong entry is a spoofing hole. CIDRs are validated at startup — a malformed entry fails the boot rather than silently disabling XFF trust.

forwarded_header_trust = "any_peer" treats every TCP peer as a trusted proxy, so the rightmost X-Forwarded-For entry not itself in trusted_proxies names the client. It exists for platforms (Railway, for example) whose edge addresses cannot be enumerated. It is safe only when every request reaches the registry through a proxy that always appends the address it received the request from: a client can then forge entries only to the left of that hop, and those are never read. If the registry is reachable directly, a client picks its own bucket. Startup logs a warning naming this assumption. A malformed or zone-scoped hop falls back to the TCP peer.

forwarded_skip_rightmost = N discards the last N entries before that walk, for an edge that appends its own address after the client's. Railway is one: whatever X-Forwarded-For the client sends, the app receives <client>, <edge address>, and the edge address changes from request to request. With the default 0 every per-IP limiter keys on the edge address, so one client rotates through several buckets and many clients share each one (#524). Railway needs any_peer with forwarded_skip_rightmost = 1. A chain too short to hold a client after the skip, or a skipped entry that is not an address, falls back to the TCP peer.

To find N, look at what your edge actually delivers. For example, deploy a throwaway echo container (such as mendhak/http-https-echo) behind the same edge and send it a request with a forged X-Forwarded-For: 203.0.113.9. N is the number of entries to the right of your real address. If the forged value survives, the edge appends rather than rewrites, and the hop just left of the skipped ones must be the one the edge wrote.

Which ceilings are per replica depends on backend. With the default backend = "memory" this is the same per-process, in-memory caveat as [limits]: behind a load balancer with trusted_proxies set, each replica limits per real client IP, and both per_ip_per_minute and global_per_minute are per replica. With backend = "postgres" both are counted once across every replica sharing the database (see Shared backend above) — except while the database cannot answer and backend_unavailable = "allow", when they fall back to per-replica counting. The [limits] per-agent budgets stay per-process under either backend. Requests are admitted or rejected before any DID resolution, so the SSRF/DNS path never runs for a throttled request.

[read_limits] (ACDP 0.5.0)

RFC-ACDP-0008 §4.3 read rate limits on every data-plane GET/HEAD route (contexts, search, lineages, /log/*, /changes, GET /subscriptions/{id}, GET /key-attestations). A refused read is 429 rate_limited with Retry-After, decided before the handler runs, so a throttled consumer never sees a 404 or 403. Capabilities, did.json, JWKS, health, /metrics, /admin/* and /auth/* are never read-limited. See HTTP-API.md · Rate limits.

KeyTypeDefaultNotes
enabledboolfalseMaster switch.
anonymous_per_minuteu32600Per client address (an IPv6 client by its /64), resolved by the [rate_limit] forwarded-header policy. 0: anonymous reads unlimited.
authenticated_per_minuteu321200Per requester DID, for a request carrying a valid bearer token. 0: authenticated reads unlimited.
advertiseboolfalseAdvertise the budgets as limits.max_reads_per_minute (only with auth.enabled) and limits.max_anonymous_reads_per_minute (only with auth.anonymous_public_reads), RFC-ACDP-0007 §3.2. A 0 budget is never advertised. Needs enabled. Leave off while any consumer is on acdp 0.19 or older (Seam included): their limits is closed and they reject the whole capabilities document.

Each budget is a fixed 60-second window, in memory and per replica: with N replicas behind a balancer a client can get up to N × the budget. Behind a proxy, set rate_limit.trusted_proxies (or forwarded_header_trust = "any_peer") before enabling this; otherwise every client shares the proxy's address and therefore one bucket. A request with a present but invalid bearer token is charged to its client address, then refused 403.

Enforcing and advertising are separate on purpose (RFC-ACDP-0007 §3.2 rollout note): RFC-ACDP-0008 §4.3 says a registry SHOULD NOT advertise the read ceilings until the consumers it serves track the 0.5.0 schema. An advertised ceiling is per replica, so it is a floor a client can rely on.

Env: ACDP_REGISTRY_READ_LIMITS__ENABLED, ACDP_REGISTRY_READ_LIMITS__ANONYMOUS_PER_MINUTE, ACDP_REGISTRY_READ_LIMITS__AUTHENTICATED_PER_MINUTE, ACDP_REGISTRY_READ_LIMITS__ADVERTISE.

[metrics] (FEAT-10)

Prometheus /metrics endpoint (text exposition, version=0.0.4). Off by default. When enabled, GET /metrics is mounted outside the ACDP auth pipeline and the rate limiter so a scraper reaches it unimpeded, and a process-global recorder captures HTTP request metrics plus domain counters.

KeyTypeDefaultNotes
enabledboolfalseMount /metrics and start recording.
bearer_tokenstring""When set, /metrics requires Authorization: Bearer <token> and answers 401 otherwise. Empty = open, the default. A whitespace-only value is refused at startup when enabled = true (#162): it would trim to empty and silently leave the endpoint open. Surrounding whitespace on an otherwise real token is accepted — both the configured and the presented token are trimmed before comparison.
duration_bucketslist<f64>web-latency ladderBuckets (seconds) for the request-latency histogram; must be positive and strictly increasing.

See HTTP-API.md · GET /metrics for the exposed metric names.

[playground]

Never enable in production — setting enabled = true skips DID-signature verification on publishes from non-did:key agents, regardless of which Cargo features the binary was built with. (did:key publishes are verified before the playground branch runs and are unaffected — see below — and a pinned agent under [[playground.pinned_keys]] is still cryptographically verified even with enabled = true; the bypass applies to unpinned, non-did:key publishes.)

Only the two admin routes this feature unlocks (GET /admin/contexts, POST /admin/pinned-keys/reload) are compiled in with the playground Cargo feature — see OPERATIONS.md and HTTP-API.md. [playground] enabled = true itself is not feature-gated: the publish handler's DID-signature bypass (crates/acdp-registry-core/src/handlers/context.rs, the playground_snapshot.enabled branch) is a plain runtime if, compiled into every build including a stock release binary with default features. did:key producers are checked before this branch, unconditionally, through acdp's offline verifier (the starts_with("did:key:") branch of publish_inner in context.rs; rationale in the comment that opens that branch) — a did:key identity is self-verifying by construction, so [playground] never affects how a did:key publish is authorized. Pinned agents ([[playground.pinned_keys]]) are cryptographically verified inside the playground branch itself (crate::playground::enforce_pinned_signature, called at the top of that branch); the skip applies only to publishes from non-did:key agents that aren't pinned.

KeyTypeDefaultNotes
enabledboolfalseSkip DID-signature verification for hands-on demos.
pinned_onlyboolfalseReject publishes from agents without a pinned key. No effect while pinned_keys is empty. Also the only playground mode compatible with a configured [receipt] key — and it then requires at least one pinned key.

[[playground.pinned_keys]]

Repeatable.

KeyTypeDefaultNotes
agent_didstring—Full DID.
public_key_b64string—Standard base64 of the raw 32-byte key.
algorithmstringed25519ed25519 or ecdsa-p256.
valid_fromi64—Unix seconds, inclusive; open-ended if omitted.
valid_untili64—Unix seconds, exclusive; open-ended if omitted.

Hot-reload the [playground] section with POST /admin/pinned-keys/reload (playground feature) — see HTTP-API.md.

[receipt] (ACDP 0.2.0)

Registry-receipt signing identity (RFC-ACDP-0010). Configuring a key enables receipt minting, the acdp-registry-receipts profile, and GET /.well-known/did.json. Leave unset to stay a receipt-less registry. (acdp_version itself is unconditionally "0.5.0" as of REG-3 — RFC-ACDP-0016 §10's anchors claim always wins the version max() — so it no longer moves with [receipt]; the acdp-registry-receipts profile is what actually signals receipt minting is active.) See RECEIPTS.md for the operator runbook (rotation, retention, backfill policy).

KeyTypeDefaultNotes
signing_key_seed_b64string""Standard base64 of the raw 32-byte Ed25519 seed. Exactly one of the two key sources may be set.
signing_key_pathpath—File (e.g. mounted secret) whose contents are that base64 string.
key_id_fragmentstringreceipt-key-1Fragment under the registry DID; signature.key_id = did:web:<authority>#<fragment>. Pick a fresh fragment per rotation.
head_receiptsboolfalse(ACDP 0.3.0) Mint a lineage-head receipt on every GET /lineages/{id}/current response (RFC-ACDP-0011). Requires a configured signing key (the same receipt key signs — no new key role); advertises acdp-registry-head-receipts (acdp_version itself is unconditionally "0.5.0" as of REG-3 and no longer moves with this flag).

With [lifecycle] enabled = true as well, the same key also signs an RFC-ACDP-0017 §10 event receipt for every accepted lifecycle event, served in registry_state.event_receipts. There is no separate flag; see RECEIPTS.md.

[[receipt.retired_keys]]

Repeatable. Rotated-out receipt keys, published in the DID document's verificationMethod only (never assertionMethod). Removing an entry bricks every receipt that key signed — RFC-ACDP-0010 §9 retains retired keys indefinitely; remove only on confirmed compromise.

KeyTypeDefaultNotes
public_key_b64string—Standard base64 of the raw 32-byte Ed25519 public key.
key_id_fragmentstring—The fragment the key was published under while active.

[lifecycle] (ACDP 0.3.0)

Lifecycle events & retraction (RFC-ACDP-0013). When enabled the registry serves POST /contexts/{ctx_id}/retract / /republish, derives status with the retracted > superseded > expired > active precedence, excludes retracted contexts from default search and from /current, serves registry_state.lifecycle_events, and advertises acdp-registry-lifecycle (acdp_version itself is unconditionally "0.5.0" as of REG-3 — RFC-ACDP-0016 §10's anchors claim always wins the version max() — and no longer moves with this flag). When disabled (the default) both endpoints answer 501 not_implemented and the registry emits neither lifecycle_events nor the retracted status — guaranteed by the startup refusal below, not by the read paths.

With a [receipt] key configured as well, every accepted lifecycle event also gets an RFC-ACDP-0017 §10 event receipt (registry_state.event_receipts), committed atomically with the event.

Turning the flag off over existing lifecycle state refuses to start. RFC-ACDP-0013 §6 (pinned spec): a registry that does not advertise acdp-registry-lifecycle MUST NOT emit lifecycle_events or the retracted status, with no carve-out for state recorded while the profile was advertised. The stores project stored lifecycle state on every read path regardless of the flag, so at startup — after migrations, before binding — the binary asks the store whether it holds any lifecycle state (ExtendedRegistryStore::has_lifecycle_state: at least one lifecycle_events row, or at least one context with the retracted flag set). With enabled = false and state present it logs at ERROR and exits non-zero naming both ways out:

  1. Re-enable — set [lifecycle] enabled = true (ACDP_REGISTRY_LIFECYCLE__ENABLED=true). The state is served exactly as before. This is the recommended exit.

  2. Purge — back up the database first. Deleting the state is irreversible: every retracted context becomes active again and reappears in default search and as its lineage's /current head, reversing withdrawals the producers (or you) made. With the registry stopped:

    -- SQLite
    BEGIN;
    DELETE FROM lifecycle_events;
    UPDATE contexts SET retracted = 0 WHERE retracted <> 0;
    COMMIT;
    
    -- Postgres
    BEGIN;
    DELETE FROM lifecycle_events;
    UPDATE contexts SET retracted = FALSE WHERE retracted;
    COMMIT;

A republished context counts as state: it is no longer retracted but keeps both events, which §6 equally forbids emitting. The check runs once at startup; on a multi-replica Postgres deployment every replica must agree on [lifecycle] (a flag-off replica already running keeps serving whatever a flag-on replica records until its next restart, which then refuses). The in-memory backend never trips it — nothing survives its restart. See UPGRADING.md for the pre-upgrade check.

KeyTypeDefaultNotes
enabledboolfalseOpt into the RFC-ACDP-0013 endpoint surface and status semantics.

enabled also unlocks the registry-attested takedown path (POST /admin/contexts/{ctx_id}/{retract,republish}, RFC-ACDP-0013 §6 registry-initiated events — see HTTP-API.md). That path adds no new knob: it is gated by the existing auth.admin_tokens bearer, and its signing is driven by whether a [receipt] key is configured — with a receipt key the registry MUST sign the event under it; without one the event is recorded unsigned but still attributed to the registry DID.

[log] (ACDP 0.3.0)

Registry transparency log (RFC-ACDP-0012): the leaf encoding, Merkle tree construction and checkpoint format are normative in §4–§6 and not restated here. When enabled this registry appends one leaf per accepted publish in the same storage transaction as the context row and its receipt (a publish that cannot durably append its leaf fails), serves GET /log/checkpoint, GET /log/proof, and GET /log/entries, signs checkpoints with the [receipt] key (no new key to operate), and advertises acdp-registry-transparency-log (acdp_version itself is unconditionally "0.5.0" as of REG-3 and no longer moves with this flag). When disabled (the default) the three /log/* endpoints answer 501 not_implemented. There is no degraded mode and no log_unavailable error.

Prerequisites (enforced at startup): a configured [receipt] signing key and a durable storage backend (sqlite or postgres).

Storage: leaves live in the log_leaves table — dense 0-based leaf_index in acceptance order, one leaf per ctx_id, and the exact JCS-canonical leaf bytes plus their sha256: leaf hash, so every leaf is byte-exactly reproducible forever. Roots and proofs are recomputed per request from the ordered leaf hashes (O(n); the head root is cached). Contexts published before enablement are not backfilled: no leaf is ever appended for them, and there is no backfill command.

Deviation from a SHOULD in RFC-ACDP-0012 §7.3 (pinned spec): a registry enabling the profile SHOULD backfill leaves for contexts published before enablement (after backfilling their receipts, which RFC-ACDP-0010 §7 likewise says SHOULD happen and this registry also does not do — see RECEIPTS.md). Backfilled leaves would be time-unanchored under §7.3 anyway, so what is missing is their inclusion in the log, not a timing guarantee.

KeyTypeDefaultNotes
enabledboolfalseOpt into the RFC-ACDP-0012 log: atomic leaf appends + the three /log/* endpoints.
instancestring"1"The <instance> component of log_id = did:web:<authority>/log/<instance> (matches [a-z0-9-]{1,32}). Change only on catastrophic tree loss (§7.4) — a new instance is an explicit, loudly detectable history reset.

[changes] (ACDP 0.5.0)

Registry change feed (RFC-ACDP-0018 §5): GET /changes and the acdp-registry-changes profile. Feed entries are appended whenever a [receipt] key is configured, in the same storage transaction as the lifecycle event, superseding publish or key-revocation context they record; this section governs whether they are served, and how long they are kept. Retention applies whether or not the feed is served: the prune task runs on every registry, and retention_seconds and prune_interval_seconds are validated even with enabled = false. When disabled (the default) GET /changes answers 501 not_implemented. See HTTP-API.md for the wire behaviour.

Prerequisites (enforced at startup): [lifecycle] enabled = true, a configured [receipt] key, a durable storage backend (sqlite or postgres), exactly one master-key source, retention_seconds >= 2592000 (30 days, §5.4), and 100 <= max_change_filters, max_changes_page <= 1000 (§9 floor; the ceiling bounds per-request work). max_change_bucket_length, when set, must be from 4 to 16 and is refused with enabled = false; that refusal runs whether or not the feed is enabled.

The master key is 32 random bytes, base64. HKDF-SHA-256 derives the cursor key from it, so cursors are opaque and tamper-evident (AES-256-GCM). It is a secret: supply it through ACDP_REGISTRY_CHANGES__KEY_B64 or key_path, never in a committed file, and keep it distinct from the receipt seed. Every replica serving the same store needs the same key and key_id. Rotating (key_id changed, new key) invalidates every outstanding cursor: consumers get cursor_expired and resync from since absent or head, which the protocol allows; nothing is misread. After restoring the store from a backup, raise cursor_epoch instead (OPERATIONS.md, Restore). Every older cursor expires the same way, and subscription secrets stay readable.

KeyTypeDefaultNotes
enabledboolfalseServe GET /changes and advertise acdp-registry-changes plus the three limits below.
key_b64string""Base64 of the 32-byte master key. Env ACDP_REGISTRY_CHANGES__KEY_B64. Mutually exclusive with key_path.
key_pathpathunsetFile holding the base64 master key.
key_idu81Stamped into every cursor; a cursor under an id this registry does not hold is cursor_expired. Change it when rotating the key.
cursor_epochu320Sealed into every cursor; a cursor from another epoch is cursor_expired. Env ACDP_REGISTRY_CHANGES__CURSOR_EPOCH. Raise it by one on every restore from backup (RFC-ACDP-0018 §5.3); never lower it. Same value on every replica.
retention_secondsu642592000Minimum entry lifetime; advertised as limits.change_retention_seconds.
max_change_filtersu64100Total ctx_id/lineage_id/agent_id/kind/lineage_bucket/agent_bucket values per request, duplicates included; advertised.
max_changes_pageu64100Largest limit; advertised as limits.max_changes_page.
max_change_bucket_lengthu16unsetTurns on the §6.1 bucket filters (lineage_bucket / agent_bucket on GET /changes) and is advertised as limits.max_change_bucket_length. 4 to 16; only with enabled = true. Unset (the default), nothing is advertised and either parameter is 400 schema_violation. Env ACDP_REGISTRY_CHANGES__MAX_CHANGE_BUCKET_LENGTH. Rollout: consumers on acdp 0.19 or older reject a capabilities document carrying this key (their limits is closed), and startup logs a warning saying so; set it only once every consumer is on acdp 0.20 or newer. A binary that predates the key refuses to start with it set, so remove it before rolling back (UPGRADING.md).
prune_interval_secondsu643600How often the background task deletes entries older than retention_seconds plus a one-hour clock-skew margin (in batches of 1000). Runs whether or not enabled is set.

[events] (ACDP 0.5.0)

Change-hint subscriptions (RFC-ACDP-0018 §8): /subscriptions and the acdp-registry-events profile. When disabled (the default) every /subscriptions request answers 501 not_implemented. See HTTP-API.md for the wire behaviour.

Prerequisites (enforced at startup): [changes] enabled = true (a hint points at the feed, and subscription secrets are sealed under a key derived from the [changes] master key), auth.enabled = true (every subscription has an authenticated owner), and max_subscriptions_per_requester >= 1. Rotating the [changes] key (new key and new key_id) makes existing subscription secrets unreadable: the worker retries each such subscription and disables it after 72 hours, so restoring the old key within that window loses nothing; otherwise owners re-create them. A new key under the same key_id disables them at once (see OPERATIONS.md).

With [events] enabled every replica runs the hint worker (see HTTP-API.md and OPERATIONS.md). Its delivery policy is fixed, not configured: retries from one minute doubling to hourly, disable after 72 hours of failure, 10 s per request, 16 deliveries in flight per replica.

KeyTypeDefaultNotes
enabledboolfalseServe /subscriptions and advertise acdp-registry-events plus limits.max_subscriptions_per_requester.
max_subscriptions_per_requesteru6410Most subscriptions one requester DID may hold, active or disabled; advertised.

[keyless] (ACDP 0.5.0)

Keyless signing (RFC-ACDP-0021, Draft): POST/GET /key-attestations, the keyless publish path and the acdp-registry-keyless profile. A CI job or workload presents its OIDC ID token or SPIFFE JWT-SVID and a proof of possession of an ephemeral key; the registry checks the token against the issuer's published keys and the controller DID document's AcdpKeylessSigning service, then mints a short-lived attestation (a public acdp:key-attestation body under the registry DID, signed with the receipt key, receipted and logged). Bodies signed with that key then publish under the controller's DID.

Off by default. With enabled = false (the default) nothing here is read, /key-attestations answers 501 not_implemented, the capabilities document carries neither the profile nor the keyless member, and an acdp-kl- key id is an ordinary unresolvable key. With enabled = true the profile and the keyless member are advertised together. See HTTP-API.md for the wire behaviour and OPERATIONS.md for running it.

Prerequisites (enforced at startup): [lifecycle] enabled = true, a configured [receipt] key, [log] enabled = true, and at least one issuer or trust domain (see Startup validation).

The scalars take the usual ACDP_REGISTRY_KEYLESS__<KEY> env overrides (e.g. ACDP_REGISTRY_KEYLESS__ENABLED=true). The two lists are arrays of tables, which the env source cannot express: set them in the TOML file, or set oidc_issuers with the JSON escape hatch ACDP_REGISTRY_KEYLESS__OIDC_ISSUERS_JSON (see the escape hatches). SPIFFE trust domains are file only.

KeyTypeDefaultNotes
enabledboolfalseServe /key-attestations and keyless publish; advertise acdp-registry-keyless and the keyless member. Env ACDP_REGISTRY_KEYLESS__ENABLED.
max_attestation_ttl_secondsu32600Longest attestation window minted; advertised as keyless.max_attestation_ttl_seconds. 60 to 3600. Env ACDP_REGISTRY_KEYLESS__MAX_ATTESTATION_TTL_SECONDS.
jwks_cache_ttl_secondsu64300How long a fetched issuer key set counts as fresh before it is refetched. 60 to 3600. A response's Cache-Control: max-age can shorten it, never below 60 s. When a refetch fails, the copy past its TTL keeps answering (stale-if-error) for up to jwks_max_stale_seconds more. Env ACDP_REGISTRY_KEYLESS__JWKS_CACHE_TTL_SECONDS.
jwks_max_stale_secondsu643600How long past its TTL a key set is still used while its issuer cannot be reached. At most 604800 (7 days): a stale set may hold keys the issuer withdrew. Env ACDP_REGISTRY_KEYLESS__JWKS_MAX_STALE_SECONDS.
fetch_timeout_msu645000Bound on one JWKS, bundle or discovery fetch. At least 100. Env ACDP_REGISTRY_KEYLESS__FETCH_TIMEOUT_MS.
max_fetch_bytesu6465536Largest fetched response body read. At least 1024. Env ACDP_REGISTRY_KEYLESS__MAX_FETCH_BYTES.
rate_per_identity_per_minuteu3210POST /key-attestations budget per workload identity, charged only once its token verifies; 0 disables it. Env ACDP_REGISTRY_KEYLESS__RATE_PER_IDENTITY_PER_MINUTE.
rate_per_ip_per_minuteu3230POST /key-attestations budget per resolved client IP, charged on arrival; 0 disables it. Env ACDP_REGISTRY_KEYLESS__RATE_PER_IP_PER_MINUTE.
[[keyless.oidc_issuers]]table[]noneAccepted OIDC issuers, advertised as keyless.accepted_oidc_issuers. Env ACDP_REGISTRY_KEYLESS__OIDC_ISSUERS_JSON (a JSON array).
[[keyless.spiffe_trust_domains]]table[]noneAccepted SPIFFE trust domains, advertised as keyless.accepted_spiffe_trust_domains. File only.

[[keyless.oidc_issuers]] entries:

KeyTypeDefaultNotes
issuerstringrequiredCompared byte for byte with the token's iss, never normalised (https://x and https://x/ are two issuers). Must match ^https://[^\s#?]+$, at most 512 characters, no duplicates.
jwks_uristringunsethttps URL of the issuer's JWKS. Unset: discovered from <issuer>/.well-known/openid-configuration, whose issuer must equal the configured one.

[[keyless.spiffe_trust_domains]] entries:

KeyTypeDefaultNotes
trust_domainstringrequiredMust match ^[a-z0-9._-]+$, at most 255 characters, no duplicates.
bundle_endpointstringrequiredhttps URL of the SPIFFE bundle endpoint serving the domain's JWT authorities.
jwt_issuerstringunsetThe iss the domain's JWT-SVIDs carry, when they carry one.
[keyless]
enabled = true
max_attestation_ttl_seconds = 600

[[keyless.oidc_issuers]]
issuer = "https://token.actions.githubusercontent.com"

[[keyless.spiffe_trust_domains]]
trust_domain = "prod.example.org"
bundle_endpoint = "https://spire.prod.example.org/bundle"

[[witnesses]] (ACDP 0.4.0)

Transparency-log witness cosignature aggregation (RFC-ACDP-0015 §6.1). An array of independent witnesses this registry polls and whose verified cosignatures it attaches to its checkpoint responses (the reserved top-level witness_signatures member — see HTTP-API.md). A consumer then gets a checkpoint and its witness quorum in one fetch and verifies N-witnessed locally.

For each configured witness a background poller GETs <url>?log_id=<this registry's log_id> over the SSRF-guarded outbound client (HTTPS-only, DNS-rebinding-guarded, no redirects — RFC-ACDP-0008 §4.8) and runs the RFC-ACDP-0015 §8 verification procedure on every returned cosignature against this registry's own checkpoint at that tree_size, resolving the witness key through the did:web resolver. A witness cosigning a different root (a fork, or a lie) is logged and dropped — it is never stored and never served. Only verified cosignatures are persisted (table log_witness_cosignatures, keyed by (log_id, tree_size, root_hash, witness_did); a fresh re-observation upserts, newest wins), so serving is a single indexed read with no blocking network call in the request path.

Aggregation is a pure convenience: the registry never holds a witness key, so it can neither forge a cosignature nor make itself a trust dependency — a consumer MAY always fetch direct from a witness (§6.2). There is no new capability flag or profile: a registry that aggregates does so under its existing acdp-registry-transparency-log profile (§10). acdp_version served at .well-known/acdp.json is unconditionally "0.5.0" as of REG-3 (RFC-ACDP-0016 §10's anchors claim always wins the version max()), so configuring [[witnesses]] no longer moves it; whether aggregation is active is visible in the response body (whether witness_signatures accompanies a checkpoint) — see HTTP-API.md.

Prerequisites (enforced at startup): log.enabled = true (there are no checkpoints to witness without a log), each did a did:web DID, and each url accepted by the SSRF policy (HTTPS, non-private host). Empty (the default) disables aggregation entirely.

[[witnesses]]
did          = "did:web:witness.example.org"
url          = "https://witness.example.org/log/witness"
poll_seconds = 60                              # default 300

[[witnesses]]
did = "did:web:witness-2.example.org"
url = "https://witness-2.example.org/log/witness"
KeyTypeDefaultNotes
didstring(required)The witness's did:web DID. Cosignatures whose witness_id ≠ this value are ignored (a witness endpoint only speaks for its own DID).
urlstring(required)HTTPS URL of the witness's GET /log/witness endpoint (RFC-ACDP-0015 §6.2). SSRF-checked at startup and at DNS time on every poll.
poll_secondsinteger300Poll interval.