Skip to main content

settings.yaml Reference

Use this page as the single source of truth for BFF settings. Headings act as deep-link anchors you can reference from tutorials and website pages.

Contents

Core runtime

YAML pathEnv var(s)Notes
app_name, app_description, versionAPP_NAME, APP_DESCRIPTION, APP_VERSIONDisplay/metadata only
environmentENVIRONMENTAffects env‑specific behavior/config
api_prefixAPI_PREFIXGlobal API prefix
host, portHOST, PORTBind address/port
enable_docsENABLE_DOCSExpose interactive docs if enabled
debugDEBUGEnables debug behaviors/logging

Authentication and OAuth/IdP

YAML pathEnv var(s)Notes
auth.issuerAUTH_ISSUEROIDC issuer URL
auth.audienceAUTH_AUDIENCEExpected audience for tokens
auth.jwks_urlAUTH_JWKS_URLOptional override for JWKS
auth.client_idAUTH_CLIENT_IDOAuth client id
auth.client_secretAUTH_CLIENT_SECRETOAuth client secret
auth.oauth_scopesOIDC_SCOPESSpace‑ or comma‑separated scopes
auth.dev_mode_enabledAUTH_DEV_MODELooser checks for local/dev only

PDP integration

YAML pathEnv var(s)Notes
pdp.base_urlPDP_BASE_URLPDP endpoint base
pdp.token_urlPDP_TOKEN_URLOAuth token endpoint if needed
pdp.client_idPDP_CLIENT_IDClient credentials for PDP
pdp.client_secretPDP_CLIENT_SECRETClient secret for PDP
pdp.cache.enablePDP_CACHE_DECISIONSEnable decision cache
pdp.cache.ttl_msPDP_CACHE_TTLTTL for decision cache
pdp.enabledPDP_ENABLEDToggle PDP usage

Authorization mapping flags

YAML pathEnv var(s)Notes
authz.validation.strictAUTHZ_VALIDATION_STRICTFail‑closed on mapping/shape errors
authz.default_mapping.enabledAUTHZ_DEFAULT_MAPPING_ENABLEDEnables default/fallback mappings

Membership PIP

YAML pathEnv var(s)Notes
membership.*MEMBERSHIP_*Membership service/PIP configuration

CORS

YAML pathEnv var(s)Notes
cors.allow_originsCORS__ALLOW_ORIGINSJSON/CSV of origins
cors.dev_originsCORS__DEV_ORIGINSDev‑only origins for local tools
cors.allow_credentialsCORS__ALLOW_CREDENTIALSBoolean
cors.allow_methodsCORS__ALLOW_METHODSMethods list
cors.allow_headersCORS__ALLOW_HEADERSHeaders list

Session and cookies

YAML pathEnv var(s)Notes
cookie.domainBFF_COOKIE_DOMAINCookie domain (e.g., .example.com)
session.lifetime_secondsSESSION_LIFETIMESession TTL in seconds

Callback URL model

YAML pathEnv var(s)Notes
auth.callback.dynamicBFF_DYNAMIC_CALLBACKToggle dynamic callback model
auth.callback.default_hostBFF_DEFAULT_HOSTUsed when dynamic enabled
auth.callback.default_schemeBFF_DEFAULT_SCHEMEhttp/https
auth.callback.static_urlBFF_CALLBACK_URLUsed when dynamic disabled

Logging and observability

YAML pathEnv var(s)Notes
log.levelLOG_LEVELinfo, debug, warn, error
log.formatLOG_FORMATtext/json
log.json_formatLOG_JSON_FORMATForce JSON log output
log.enable_tracingLOG_ENABLE_TRACINGEnable tracing emitters
observability.*See observability.md for details

Kafka

YAML pathEnv var(s)Notes
kafka.enabledKAFKA_ENABLEDToggle producer
kafka.bootstrap_serversKAFKA_BOOTSTRAP_SERVERSHost:port list
kafka.topic_prefixKAFKA_TOPIC_PREFIXPrefix for topics
kafka.client_idKAFKA_CLIENT_IDProducer client id
kafka.acksKAFKA_ACKS0/1/all
kafka.compression_typeKAFKA_COMPRESSION_TYPEgzip, snappy, lz4, zstd

Cache

YAML pathEnv var(s)Notes
cache.typeCACHE_TYPEredis, memory
cache.redis_urlCACHE_REDIS_URLredis://host:port/db
cache.redis_dbCACHE_REDIS_DBDB index
cache.redis_max_connectionsCACHE_REDIS_MAX_CONNECTIONSPool size
cache.ttl_msCACHE_TTL_MSDefault TTL in ms
cache.enable_memory_cacheCACHE_ENABLE_MEMORYLocal memory layer toggle
cache.memory_ttl_msCACHE_MEMORY_TTL_MSMemory TTL in ms

Service backends (generic mapping)

Use these patterns for downstream service configuration. Replace <SERVICE> with the upper‑snake service name.

PatternEnv var(s)Notes
services.<name>.base_url&lt;SERVICE&gt;_BASE_URLDownstream base URL
services.<name>.token_url&lt;SERVICE&gt;_TOKEN_URLOAuth token endpoint
services.<name>.client_id&lt;SERVICE&gt;_CLIENT_IDClient credentials
services.<name>.client_secret&lt;SERVICE&gt;_CLIENT_SECRETClient credentials
services.<name>.cache.enabled&lt;SERVICE&gt;_CACHE_ENABLEDPer‑service cache toggle
services.<name>.cache.ttl_ms&lt;SERVICE&gt;_CACHE_TTLPer‑service cache TTL

Legacy services

YAML pathEnv var(s)Notes
legacy_services.*LEGACY_SERVICE_&lt;NAME&gt;_URLLegacy endpoints
LEGACY_SERVICE_&lt;NAME&gt;_TIMEOUTRequest timeouts
circuit_breaker.*CIRCUIT_BREAKER_*Global breaker knobs
response_cache.*RESPONSE_CACHE_*Global response cache
request.max_body_sizeREQUEST_MAX_BODY_SIZEIn bytes

Notes

  • Env substitution uses ${VAR} in YAML; provide concrete values via Compose/K8s/runtime env.
  • Typical auth scopes include: admin.api, application.all (adjust per downstream).
  • For Experience app support, include the app origin in CORS__ALLOW_ORIGINS and dev tools (e.g., http://localhost:5177) in dev origins.

Anchor index

Use these fragment IDs to deep‑link to specific settings from how‑tos and website pages. Patterned variables (e.g., <SERVICE>_BASE_URL) are not enumerated.