Skip to main content

Pinned to release v0.24.1. For the current default branch, see Go-Trust Configuration Reference.

Configuration Reference

This document describes all configuration options for go-trust (gt). Configuration is loaded from a YAML file, then a handful of settings can be overridden by GT_* environment variables — most fields (all registries and policies) are YAML-only.

A few server settings can also be set via CLI flag (gt -host, -port, -external-url, -log-level, -log-format) — see gt -h.

Table of Contents​


server​

YAML KeyEnv VariableTypeDescription
server.hostGT_HOSTstring
server.portGT_PORTstring
server.external_urlGT_EXTERNAL_URLstringExternal URL for PDP discovery (e.g., https://pdp.example.com)
server.tls.enabledGT_TLS_ENABLEDbooleanEnable TLS/HTTPS
server.tls.cert_fileGT_TLS_CERT_FILEstringPath to TLS certificate file
server.tls.key_fileGT_TLS_KEY_FILEstringPath to TLS private key file

logging​

YAML KeyEnv VariableTypeDescription
logging.levelGT_LOG_LEVELstring
logging.formatGT_LOG_FORMATstring
logging.outputGT_LOG_OUTPUTstring

security​

YAML KeyEnv VariableTypeDescription
security.rate_limit_rpsGT_RATE_LIMIT_RPSinteger
security.enable_corsGT_ENABLE_CORSboolean
security.allowed_originsGT_ALLOWED_ORIGINSstring list
security.max_response_body_bytesGT_MAX_RESPONSE_BODY_BYTESintegerMax HTTP response body size in bytes (default: 10MB)
security.trusted_proxies—string listTrustedProxies lists the CIDRs whose X-Forwarded-For and X-Real-IP headers may be believed when determining a client's address. Empty (the default) trusts none of them, so the peer address is used. This matters because rate limiting keys on the client address: if a directly reachable client's forwarded headers were trusted, it could rotate X-Forwarded-For and get a fresh bucket on every request. Deployments behind a load balancer must list it here for per-client limiting to work at all.

policies​

YAML KeyEnv VariableTypeDescription
policies.default_policy—stringDefaultPolicy is the name of the policy to use when action.name is not specified
policies.fail_closed_on_unknown_action—booleanFailClosedOnUnknownAction denies requests whose action.name has no matching policy instead of judging them by default_policy. Unknown names are logged once per name either way (at most 256 distinct names are tracked; later new names are denied or defaulted without a log line). Only applies when action policies are configured or this flag is set.
policies.policies—map[string]*PolicyConfig (object)Policies is a map of policy name to policy configuration. Example for the signer of a Token Status List (action.name "status-list-signer"): status-list-signer: {constraints: {require_key_binding: true, allowed_key_types: [x5c, jwk]}, registries: [status-signer-anchors]}
policies.policies.<name>.description—stringDescription provides human-readable documentation
policies.policies.<name>.registries—string listRegistries limits evaluation to specific registry names. If empty, all registries are considered.
policies.policies.<name>.constraints.require_key_binding—booleanRequireKeyBinding requires that a key be provided and validated.
policies.policies.<name>.constraints.allowed_key_types—string listAllowedKeyTypes restricts accepted key types (e.g., ["x5c", "jwk"])
policies.policies.<name>.oidfed.required_trust_marks—string listRequiredTrustMarks specifies trust mark types that MUST be present
policies.policies.<name>.oidfed.entity_types—string listEntityTypes filters by OpenID Federation entity types
policies.policies.<name>.oidfed.max_chain_depth—integerMaxChainDepth limits trust chain resolution depth
policies.policies.<name>.oidfed.credential_type_trust_marks—map[string][]string (object)CredentialTypeTrustMarks maps credential type identifiers (VCT) to the trust marks required for that type. When a request carries credential_types, the matching trust marks are added to the required set. Example: {"eu.europa.ec.eudi.pid.1": ["https://trust.eu/wallet/pid-issuer"]}
policies.policies.<name>.etsi.service_types—string listServiceTypes filters by ETSI service type URIs
policies.policies.<name>.etsi.service_statuses—string listServiceStatuses filters by ETSI service status URIs
policies.policies.<name>.etsi.countries—string listCountries filters by country codes (e.g., ["DE", "FR"])
policies.policies.<name>.etsi.credential_types—string listCredentialTypes specifies credential type identifiers (e.g., SD-JWT VCT values) that the policy scopes the evaluation to.
policies.policies.<name>.etsi.required_cert_policy_oids—string listRequiredCertPolicyOIDs specifies certificate policy OIDs that MUST appear in the leaf certificate's Certificate Policies extension, used to distinguish access certificates (ETSI TS 119 411-8) from generic TLS certificates.
policies.policies.<name>.etsi.extract_rp_identity—booleanExtractRPIdentity controls whether RP identity information (Subject DN, SANs, serial number) is extracted from the leaf certificate and returned in the response trust metadata.
policies.policies.<name>.etsi.allowed_attributes—string listAllowedAttributes lists the attribute names the RP is entitled to request. Over-request detection per TS 119 475 does not run at all unless this is set.
policies.policies.<name>.etsi.strict_entitlement_check—booleanStrictEntitlementCheck rejects over-requesting RPs instead of returning warnings alongside an allow decision.
policies.policies.<name>.etsi.allow_intermediaries—booleanAllowIntermediaries accepts intermediary/broker presentation requests and surfaces intermediary metadata. Defaults to false.
policies.policies.<name>.did.allowed_domains—string listAllowedDomains restricts DIDs to specific domains. Supports wildcards: "*.example.com" matches "sub.example.com"
policies.policies.<name>.did.required_verification_methods—string listRequiredVerificationMethods requires specific verification method types.
policies.policies.<name>.did.required_services—string listRequiredServices requires specific service types in the DID document.
policies.policies.<name>.did.require_verifiable_history—booleanRequireVerifiableHistory (did:webvh only) requires valid verifiable history.
policies.policies.<name>.mdociaca.issuer_allowlist—string listIssuerAllowlist restricts to specific credential issuers.
policies.policies.<name>.mdociaca.require_iaca_endpoint—booleanRequireIACAEndpoint requires the issuer to publish mdoc_iacas_uri.
policies.policies.<name>.fidomds3.allowed_aaguids—string listAllowedAAGUIDs restricts trust to specific AAGUIDs, regardless of MDS3 certification status.
policies.policies.<name>.fidomds3.blocked_aaguids—string listBlockedAAGUIDs denies specific AAGUIDs even if MDS3 certifies them. Only applied when AllowedAAGUIDs is empty.
policies.policies.<name>.emrtd.path_len_mode—stringPathLenMode is "ignore" (default) or "enforce". With "enforce", pathLenConstraint is applied per RFC 5280 6.1.4 to the issuers on the path DSC -> [link certificates] -> CSCA: it limits the number of non-self-issued intermediate CAs below the issuer (self-issued link certificates do not count), a certificate without one is unlimited. Violations are denied as chain_invalid. Any other value fails config validation.
policies.policies.<name>.emrtd.path_len_override—integerPathLenOverride, when set, is used instead of a certificate's own pathLenConstraint for every CSCA and link certificate acting as an issuer in the chain (including certificates that have none), and implies "enforce". Must be >= 0; conflicts with path_len_mode "ignore".

registries.general​

YAML KeyEnv VariableTypeDescription
registries.strategy—stringStrategy selects how the registry manager combines registries: "first_match" (default), "all", "best_match" or "sequential".
registries.composite—CompositeRegistryConfig listComposite combines already-configured registries with boolean logic. A registry named as a child is evaluated only through its composite, not also on its own.
registries.composite[].name—stringName identifies the composite, and is what a policy's registries list refers to.
registries.composite[].description—stringDescription provides human-readable documentation.
registries.composite[].operator—stringOperator is how child results combine: "AND", "OR", "MAJORITY" or "QUORUM". QUORUM requires Threshold children to agree.
registries.composite[].threshold—integerThreshold is the number of children that must return decision=true. QUORUM only; ignored by the other operators.
registries.composite[].timeout—stringTimeout bounds the whole composite evaluation, as a duration string (e.g. "5s"). Empty uses the CompositeRegistry default.
registries.composite[].registries—string listRegistries names the child registries, which must already be configured elsewhere under registries.

registries.etsi​

YAML KeyEnv VariableTypeDescription
registries.etsi.enabled—boolean
registries.etsi.name—string
registries.etsi.description—string
registries.etsi.cert_bundle—string
registries.etsi.tsl_files—string list
registries.etsi.tsl_urls—string list
registries.etsi.follow_refs—boolean
registries.etsi.max_ref_depth—integer
registries.etsi.allow_network_access—boolean
registries.etsi.fetch_timeout—string
registries.etsi.user_agent—string
registries.etsi.lotl_signer_bundle—stringLOTLSignerBundle is the path to a PEM file containing trusted LOTL signer certificates. These certificates are used to validate signatures on the List of Trusted Lists (LOTL).
registries.etsi.require_signature—booleanRequireSignature controls whether TSLs must have valid signatures. When true, LOTLSignerBundle must also be configured.
registries.etsi.follow_pivots—booleanFollowPivots enables ETSI TS 119 615 pivot LOTL processing for signer certificate rollover. When true, the registry will fetch pivot LOTLs to discover new signer certificates.
registries.etsi.refresh_interval—stringRefreshInterval is how often to re-fetch TSL data in the background, as a duration string (e.g. "6h"). Empty or zero disables background refresh, leaving the registry on whatever it loaded at startup.

registries.whitelist​

YAML KeyEnv VariableTypeDescription
registries.whitelist.enabled—boolean
registries.whitelist.name—string
registries.whitelist.description—string
registries.whitelist.config_file—string
registries.whitelist.watch_file—boolean
registries.whitelist.lists—map[string][]string (object)Named lists (new format)
registries.whitelist.actions—map[string]string (object)
registries.whitelist.issuers—string listLegacy fields (backward compatible)
registries.whitelist.verifiers—string list
registries.whitelist.trusted_subjects—string list
registries.whitelist.allow_http—booleanAllowHTTP permits JWKS auto-discovery over plain HTTP instead of requiring HTTPS. Testing only - see pkg/registry/static.WhitelistConfig.
registries.whitelist.trust_x509_via_system_ca—booleanTrustX509ViaSystemCA enables the system-CA-pool fallback for whitelisted entities with no JWKS endpoint (e.g. OpenID4VP x509_san_dns or x509_hash client_id_scheme verifiers) - see pkg/registry/static.WhitelistConfig.TrustX509ViaSystemCA.
registries.whitelist.additional_trusted_roots—string listAdditionalTrustedRoots is a list of PEM-encoded CA certificates merged into TrustX509ViaSystemCA's chain-validation pool - see pkg/registry/static.WhitelistConfig.AdditionalTrustedRoots.

registries.oidfed​

OpenID Federation registry

YAML KeyEnv VariableTypeDescription
registries.oidfed.enabled—boolean
registries.oidfed.name—string
registries.oidfed.description—string
registries.oidfed.trust_anchors—OIDFedTrustAnchorConfig list
registries.oidfed.trust_anchors[].entity_id—string
registries.oidfed.trust_anchors[].jwks—stringJWKS is optional explicit JWKS for the trust anchor (JSON string) If not provided, JWKS will be fetched from the entity configuration
registries.oidfed.required_trust_marks—string list
registries.oidfed.entity_types—string list
registries.oidfed.cache_ttl—string
registries.oidfed.max_cache_size—integer
registries.oidfed.max_chain_depth—integer

registries.didlocal​

Self-contained DID methods (did:key, did:jwk), resolved locally

YAML KeyEnv VariableTypeDescription
registries.didlocal.enabled—boolean
registries.didlocal.description—string
registries.didlocal.methods—string listMethods lists the DID methods to resolve, e.g. ["key", "jwk"]. Empty enables every self-contained method. An unrecognised method is a startup error rather than a warning.

registries.didweb​

DID method registries

YAML KeyEnv VariableTypeDescription
registries.didweb.enabled—boolean
registries.didweb.name—string
registries.didweb.description—string
registries.didweb.timeout—string
registries.didweb.insecure_skip_verify—boolean
registries.didweb.allow_http—boolean

registries.didwebvh​

YAML KeyEnv VariableTypeDescription
registries.didwebvh.enabled—boolean
registries.didwebvh.name—string
registries.didwebvh.description—string
registries.didwebvh.timeout—string
registries.didwebvh.insecure_skip_verify—boolean
registries.didwebvh.allow_http—boolean

registries.didjwks​

YAML KeyEnv VariableTypeDescription
registries.didjwks.enabled—boolean
registries.didjwks.name—string
registries.didjwks.description—string
registries.didjwks.timeout—string
registries.didjwks.insecure_skip_verify—boolean
registries.didjwks.allow_http—boolean
registries.didjwks.disable_oidc_discovery—boolean

registries.lote​

ETSI TS 119 602 LoTE registry

YAML KeyEnv VariableTypeDescription
registries.lote.enabled—boolean
registries.lote.name—string
registries.lote.description—string
registries.lote.sources—string list
registries.lote.lotl_sources—string list
registries.lote.max_dereference_depth—integer
registries.lote.verify_jws—boolean
registries.lote.fetch_timeout—string
registries.lote.refresh_interval—string

registries.mdociaca​

mDOC IACA registry

YAML KeyEnv VariableTypeDescription
registries.mdociaca.enabled—boolean
registries.mdociaca.name—string
registries.mdociaca.description—string
registries.mdociaca.issuer_allowlist—string list
registries.mdociaca.cache_ttl—string
registries.mdociaca.http_timeout—string

registries.mdocrical​

mDOC RICAL registry (reader authentication trust)

YAML KeyEnv VariableTypeDescription
registries.mdocrical.enabled—boolean
registries.mdocrical.name—string
registries.mdocrical.description—string
registries.mdocrical.rical_provider_url—string
registries.mdocrical.rical_root_certificate_pem—string
registries.mdocrical.cache_ttl—string
registries.mdocrical.http_timeout—string

registries.vical​

VICAL registry (issuer authentication trust)

YAML KeyEnv VariableTypeDescription
registries.vical.enabled—boolean
registries.vical.name—string
registries.vical.description—string
registries.vical.vical_provider_url—string
registries.vical.vical_root_certificate_pem—string
registries.vical.cache_ttl—string
registries.vical.http_timeout—string

registries.fidomds3​

FIDO Alliance MDS3 registry (FIDO2/CTAP2 hardware-key attestation trust)

YAML KeyEnv VariableTypeDescription
registries.fidomds3.enabled—boolean
registries.fidomds3.name—string
registries.fidomds3.description—string
registries.fidomds3.url—string
registries.fidomds3.fetch_timeout—string
registries.fidomds3.refresh_interval—string
registries.fidomds3.root_certificate_pem—string
registries.fidomds3.cache_path—stringCachePath persists the raw MDS3 blob to disk so a restart doesn't have to block on (or fail because of) a live fetch - see fidomds3.Config.CachePath's doc for the load/refresh semantics.

registries.emrtd​

eMRTD (ICAO 9303) CSCA trust anchors for document signer certificates

YAML KeyEnv VariableTypeDescription
registries.emrtd.enabled—boolean
registries.emrtd.name—string
registries.emrtd.description—string
registries.emrtd.anchors_dir—stringAnchorsDir holds CSCA and link certificates as <ALPHA3>/*.pem, where the directory is the ISO 3166-1 alpha-3 issuing state. Point it at the anchors/ tree only, never at candidates/.
registries.emrtd.crls_dir—stringCRLsDir optionally holds <ALPHA3>/*.crl (DER or PEM) for revocation checks.
registries.emrtd.watch—booleanWatch reloads anchors and CRLs when files change.

registries.systemcertpool​

System X.509 certificate pool (the host trust store)

YAML KeyEnv VariableTypeDescription
registries.systemcertpool.enabled—boolean
registries.systemcertpool.name—string
registries.systemcertpool.description—string

registries.always_trusted​

Static test registries

YAML KeyEnv VariableTypeDescription
registries.always_trusted.enabled—boolean
registries.always_trusted.name—string
registries.always_trusted.description—string

registries.never_trusted​

YAML KeyEnv VariableTypeDescription
registries.never_trusted.enabled—boolean
registries.never_trusted.name—string
registries.never_trusted.description—string