Skip to main content

Configuration Reference

Dvara is configured through application.yml with environment variable overrides. All configuration lives under the gateway namespace.

Configuration Hierarchy

Configuration is resolved in this order (later sources override earlier ones):

  1. Defaults — Hardcoded in application.yml
  2. application.yml — File-based configuration
  3. Environment variables — Override any property (e.g., OPENAI_API_KEY)
  4. System properties — JVM -D flags

Full Application Configuration

gateway:
# ── Provider Configuration ──
providers:
openai:
api-key: ${OPENAI_API_KEY:} # blank = provider disabled
base-url: https://api.openai.com/v1 # override for Azure/proxy

anthropic:
api-key: ${ANTHROPIC_API_KEY:}

gemini:
api-key: ${GEMINI_API_KEY:}

ollama:
enabled: ${OLLAMA_ENABLED:false}
base-url: ${OLLAMA_BASE_URL:http://localhost:11434}

bedrock:
enabled: ${BEDROCK_ENABLED:false}
access-key: ${AWS_ACCESS_KEY_ID:}
secret-key: ${AWS_SECRET_ACCESS_KEY:}
region: ${AWS_REGION:us-east-1}

mock:
enabled: ${MOCK_PROVIDER_ENABLED:false}
response: "This is a mock response" # static text or script
latency-ms: 100 # simulated delay
stream-token-delay-ms: 20 # inter-token SSE delay
error-rate: 0.0 # 0.0–1.0 failure fraction

# ── Route Configuration ──
routes:
- id: load-balance-gpt
model-pattern: "gpt*"
strategy: round-robin
providers:
- provider: openai
- provider: bedrock

- id: weighted-claude
model-pattern: "claude*"
strategy: weighted
providers:
- provider: anthropic
weight: 70
- provider: bedrock
weight: 30

# ── Resilience ──
resilience:
retry:
max-attempts: 3
wait-duration-ms: 500
circuit-breaker:
failure-rate-threshold: 50
sliding-window-size: 20
wait-duration-in-open-state-ms: 30000
timeout:
chat-timeout-ms: 30000
streaming-timeout-ms: 120000

# ── Rate Limiting ──
rate-limit:
enabled: false
global:
requests-per-second: 100
default-per-key:
requests-per-second: 10
tokens-per-minute: 100000
keys:
sk-premium-key:
requests-per-second: 50
tokens-per-minute: 500000

# ── Region Configuration ──
region:
id: ${GATEWAY_REGION_ID:} # region identity (blank = region-unaware)
name: ${GATEWAY_REGION_NAME:} # human-readable region name

# ── Response Caching ──
cache:
enabled: false
ttl-seconds: 3600
max-size: 10000
redis:
enabled: false

# ── Observability ──
management:
endpoints:
web:
exposure:
include: health,prometheus,gateway-status # exposed actuator endpoints
endpoint:
health:
show-details: when-authorized
prometheus:
metrics:
export:
enabled: true # enable Prometheus scrape endpoint
tracing:
sampling:
probability: ${TRACING_SAMPLING_PROBABILITY:1.0} # 0.0–1.0
otlp:
tracing:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT:http://localhost:4318/v1/traces}

# ── Spring Boot settings ──
spring:
threads:
virtual:
enabled: true # Project Loom virtual threads
# profiles:
# active: log-plain # switch from JSON to plain-text logging

server:
port: 8080

Environment Variable Reference

Environment VariablePropertyDescription
OPENAI_API_KEYgateway.providers.openai.api-keyOpenAI API key
ANTHROPIC_API_KEYgateway.providers.anthropic.api-keyAnthropic API key
GEMINI_API_KEYgateway.providers.gemini.api-keyGoogle Gemini API key
OLLAMA_ENABLEDgateway.providers.ollama.enabledEnable Ollama provider
OLLAMA_BASE_URLgateway.providers.ollama.base-urlOllama server URL
BEDROCK_ENABLEDgateway.providers.bedrock.enabledEnable AWS Bedrock provider
AWS_ACCESS_KEY_IDgateway.providers.bedrock.access-keyAWS access key for Bedrock
AWS_SECRET_ACCESS_KEYgateway.providers.bedrock.secret-keyAWS secret key for Bedrock
AWS_REGIONgateway.providers.bedrock.regionAWS region for Bedrock
MOCK_PROVIDER_ENABLEDgateway.providers.mock.enabledEnable mock provider for testing
GATEWAY_REGION_IDgateway.region.idRegion identity for this gateway instance
GATEWAY_REGION_NAMEgateway.region.nameHuman-readable region name
TRACING_SAMPLING_PROBABILITYmanagement.tracing.sampling.probabilityTrace sampling rate (0.0–1.0, default: 1.0)
OTEL_EXPORTER_OTLP_ENDPOINTmanagement.otlp.tracing.endpointOTLP HTTP endpoint for trace export
GATEWAY_COMPLIANCE_SOC2_SCHEDULEgateway.compliance.soc2-scheduleCron expression for scheduled SOC2 reports
GATEWAY_COMPLIANCE_HIPAA_SCHEDULEgateway.compliance.hipaa-scheduleCron expression for scheduled HIPAA reports
GATEWAY_COMPLIANCE_GDPR_SCHEDULEgateway.compliance.gdpr-scheduleCron expression for scheduled GDPR reports
GATEWAY_COMPLIANCE_DEFAULT_TENANTgateway.compliance.default-tenant-idTenant for scheduled reports (blank = all)
GATEWAY_COMPLIANCE_RETENTION_DAYSgateway.compliance.retention-daysReport retention period (default: 365)
GATEWAY_PII_ENABLEDgateway.pii.enabledEnable PII detection (default: true)
GATEWAY_PII_DEFAULT_ACTIONgateway.pii.default-actionDefault PII action: LOG, BLOCK, REDACT
GATEWAY_PII_SCAN_RESPONSESgateway.pii.scan-responsesScan LLM responses for PII (default: true)
GATEWAY_PII_STRIP_BEFORE_CACHEgateway.pii.strip-before-cacheRedact PII before caching (default: true)
GATEWAY_PII_TOKEN_ENCRYPTION_PASSWORDgateway.pii.token-encryption-passwordAES-256-GCM key for PII token encryption
GATEWAY_PII_MAX_TOKENS_PER_TENANTgateway.pii.max-tokens-per-tenantMax PII tokens per tenant (default: 50000)
GATEWAY_PII_TOKEN_RETENTION_DAYSgateway.pii.token-retention-daysPII token retention period (default: 30)
GATEWAY_CONFIG_FILEPath to gateway.yaml (default: ./gateway.yaml)
GATEWAY_API_KEYStatic API key for standalone mode
GATEWAY_BOOTSTRAP_FILEPath to bootstrap.yaml for first-startup seeding

Bootstrap File Seeding

Set GATEWAY_BOOTSTRAP_FILE to a YAML file path to seed tenants, API keys, and routes on first startup. This is designed for full unlicensed mode where state is persisted in a database.

GATEWAY_BOOTSTRAP_FILE=./bootstrap.yaml ./mvnw -pl gateway-server spring-boot:run

The bootstrap loader is idempotent: it checks the config version and skips seeding if any configuration has already been applied (from a previous startup or from gateway.yaml). See examples/bootstrap/bootstrap.yaml in the repository for a complete example.

tenants:
- id: acme-corp
name: Acme Corp
status: active

api_keys:
- tenant: acme-corp
name: production-key
key: ${ACME_API_KEY} # env var reference
- tenant: acme-corp
name: dev-key
generate: true # auto-generated, printed at startup

routes:
- id: gpt-route
model: "gpt*"
provider: openai

Key differences from gateway.yaml:

  • gateway.yaml is for standalone mode (in-memory, no database)
  • bootstrap.yaml is for full unlicensed mode (seeds a database on first startup)
  • Both support $\{ENV_VAR\} and ${ENV_VAR:-default} references

Standalone Configuration (gateway.yaml)

In standalone mode (GATEWAY_MODE=standalone), the gateway reads a gateway.yaml file to configure providers, routes, API keys, and rate limits — all without a database.

File Location

MethodExample
Default./gateway.yaml in working directory
Environment variableGATEWAY_CONFIG_FILE=/etc/dvara/gateway.yaml

Full Schema Reference

# gateway.yaml — standalone mode configuration
providers:
- name: openai # unique provider name
type: openai # provider type (see table below)
api_key: ${OPENAI_API_KEY} # env var reference resolved at startup
base_url: https://api.openai.com/v1 # optional override (Azure, proxy)

- name: anthropic
type: anthropic
api_key: ${ANTHROPIC_API_KEY}

- name: gemini
type: gemini
api_key: ${GEMINI_API_KEY}

- name: ollama
type: ollama
base_url: ${OLLAMA_BASE_URL:-http://localhost:11434}

- name: bedrock
type: bedrock
access_key: ${AWS_ACCESS_KEY_ID}
secret_key: ${AWS_SECRET_ACCESS_KEY}
region: ${AWS_REGION:-us-east-1}

- name: mock
type: mock

routes:
- id: gpt-route # unique route ID
model: "gpt*" # glob pattern for model matching
provider: openai # single-provider shorthand

- id: claude-balanced
model: "claude*"
strategy: weighted # model-prefix (default), round-robin, weighted
providers:
- provider: anthropic
weight: 70
- provider: bedrock
weight: 30
fallback: openai # fallback provider on failure

- id: ollama-local
model: "ollama/*"
provider: ollama

api_keys:
- key: ${MY_GATEWAY_KEY} # static key from env var
tenant: production
name: prod-key
scopes: [completions:write]

- generate: true # auto-generated, printed at startup
tenant: development
name: dev-key

rate_limits:
requests_per_minute: 600
tokens_per_minute: 100000

Provider Types

type valueDescriptionRequired fields
openaiOpenAI APIapi_key
anthropicAnthropic Claudeapi_key
geminiGoogle Geminiapi_key
ollamaOllama (local)base_url (optional)
bedrockAWS Bedrockaccess_key, secret_key, region
mockMock provider

Environment Variable References

YAML values support $\{VAR\} and ${VAR:-default} syntax, resolved at startup:

providers:
- name: openai
type: openai
api_key: ${OPENAI_API_KEY} # required — fails if unset
base_url: ${OPENAI_BASE_URL:-https://api.openai.com/v1} # with default

Minimal Environment Variable Config (No YAML File)

You can configure a single provider entirely through environment variables, without creating a gateway.yaml file:

# Single provider + auto-generated API key
GATEWAY_MODE=standalone \
OPENAI_API_KEY=sk-... \
./mvnw -pl gateway-server spring-boot:run

Or with a static API key:

GATEWAY_MODE=standalone \
OPENAI_API_KEY=sk-... \
GATEWAY_API_KEY=gw_mykey123456789012345678901234567890ab \
./mvnw -pl gateway-server spring-boot:run

When providers are configured via environment variables but no gateway.yaml exists, the gateway auto-generates an API key and prints it in the startup banner.

Auto-Generated API Keys

When generate: true is set on an API key entry (or when no key is explicitly configured), the gateway generates a cryptographically secure key at startup and prints it in a banner:

╔════════════════════════════════════════════════════════╗
║ GENERATED API KEYS (gateway.yaml) ║
╠════════════════════════════════════════════════════════╣
║ dev-key (development): gw_a1b2c3d4e5f6... ║
╠════════════════════════════════════════════════════════╣
║ Save these keys! They will NOT be shown again. ║
╚════════════════════════════════════════════════════════╝

Generated keys are stored in memory and lost on restart — they are regenerated each time.

Schema Validation

On startup, the gateway validates the gateway.yaml file and produces clear error messages with field paths:

  • Missing required fields: providers[0].type is required
  • Invalid provider type: providers[1].type 'unknown' is not a valid provider type
  • Invalid strategy: routes[0].strategy 'random' is not valid — use model-prefix, round-robin, weighted, or latency-aware
  • Weighted route without weights: routes[1] uses weighted strategy but providers have no weight

Invalid configuration logs errors at WARN level — the gateway continues startup but the misconfigured entries are skipped.

Example Files

Pre-built examples in examples/gateway-yaml/:

FileDescription
gateway.full.yamlAll providers, routes, API keys, rate limits
gateway.openai.yamlMinimal OpenAI-only setup
gateway.anthropic.yamlMinimal Anthropic-only setup
gateway.ollama.yamlLocal Ollama (no API key needed)
gateway.multi-provider.yamlMultiple providers with weighted routing

Provider Activation

A provider bean is only registered when its activation condition is met:

ProviderActivation Condition
OpenAIOPENAI_API_KEY is set and non-blank
AnthropicANTHROPIC_API_KEY is set and non-blank
GeminiGEMINI_API_KEY is set and non-blank
OllamaOLLAMA_ENABLED=true
BedrockBEDROCK_ENABLED=true
MockMOCK_PROVIDER_ENABLED=true

If no provider is configured for a requested model, the gateway returns HTTP 400 with error code no_provider.

Property Reference

gateway.providers.*

See Provider Setup for per-provider configuration details.

gateway.routes[]

PropertyTypeRequiredDefaultDescription
idstringyesUnique route identifier
model-patternstringyesGlob pattern to match model names
strategystringnomodel-prefixmodel-prefix, round-robin, weighted, latency-aware (enterprise)
cost-tolerance-pctintno0Cost tolerance for latency-aware routing (0–100)
providers[].providerstringyesProvider name
providers[].weightintno1Weight for weighted strategy
providers[].regionstringnoRegion affinity for this provider entry
pinned-model-versionstringnoOverride model name sent to provider

gateway.resilience.*

PropertyTypeDefaultDescription
resilience.retry.max-attemptsint3Max retry attempts on failure
resilience.retry.wait-duration-msint500Wait between retries (ms)
resilience.circuit-breaker.failure-rate-thresholdint50Failure % to open circuit
resilience.circuit-breaker.sliding-window-sizeint20Calls in sliding window
resilience.circuit-breaker.wait-duration-in-open-state-msint30000Time before half-open (ms)
resilience.timeout.chat-timeout-msint30000Non-streaming request timeout
resilience.timeout.streaming-timeout-msint120000Streaming request timeout

gateway.rate-limit.*

PropertyTypeDefaultDescription
rate-limit.enabledbooleanfalseEnable rate limiting
rate-limit.global.requests-per-secondint100Global request cap
rate-limit.default-per-key.requests-per-secondint10Default per-key request rate
rate-limit.default-per-key.tokens-per-minuteint100000Default per-key token budget
rate-limit.keys.\{key\}.*Per-key overrides

gateway.cache.*

PropertyTypeDefaultDescription
cache.enabledbooleanfalseEnable response caching
cache.ttl-secondsint3600Cache entry time-to-live
cache.max-sizeint10000Max entries (Caffeine only)
cache.redis.enabledbooleanfalseUse Redis instead of Caffeine

gateway.pii.* (Enterprise — PII Detection)

PropertyTypeDefaultDescription
pii.enabledbooleantrueEnable PII detection and enforcement
pii.default-actionstringLOGDefault action: LOG, BLOCK, REDACT
pii.scan-responsesbooleantrueScan LLM responses for PII output leaks
pii.strip-before-cachebooleantrueAlways redact PII before writing to cache
pii.token-encryption-passwordstringAES-256-GCM password for PII token encryption
pii.max-tokens-per-tenantint50000Maximum PII tokens stored per tenant
pii.token-retention-daysint30Days to retain PII tokens before expiry

Per-tenant PII configuration is set via tenant metadata keys:

Metadata KeyValuesDescription
pii.enabledtrue / falseOverride PII detection for this tenant
pii.actionBLOCK / REDACT / LOGOverride default PII action for this tenant
pii.scan-responsestrue / falseOverride response scanning for this tenant
pii.custom-patternsJSON stringCustom regex patterns ({"label": "regex", ...})
cost.downgrade-threshold-pctint (0–100)Budget utilization % at which model downgrade triggers (default: 80)
cost.downgrade-rulesstringComma-separated model downgrade rules (format: "from:to,from:to", e.g. "gpt-4o:gpt-4o-mini,claude-3-opus:claude-3-sonnet")
cost.anomaly-threshold-pctintPer-tenant anomaly detection threshold (default: 200 = 2x baseline)

See PII Detection for full configuration details.

gateway.guardrail.* (Enterprise — Guardrails & Safety)

PropertyTypeDefaultDescription
guardrail.enabledbooleantrueEnable guardrail detection and enforcement
guardrail.default-actionstringLOGDefault action: LOG, BLOCK, FLAG
guardrail.scan-responsesbooleantrueScan LLM responses for violations
guardrail.risk-score-thresholddouble0.7Detections below this score are ignored
guardrail.max-input-tokensint32000Max estimated input tokens (OWASP LLM10)
guardrail.max-messages-per-requestint100Max messages per request (OWASP LLM10)
guardrail.max-message-lengthint50000Max character length per message (OWASP LLM10)
guardrail.default-max-response-tokensint4096Applied when client doesn't specify max_tokens

Per-tenant guardrail configuration is set via tenant metadata keys:

Metadata KeyValuesDescription
guardrail.enabledtrue / falseOverride guardrail detection for this tenant
guardrail.actionBLOCK / FLAG / LOGOverride default action for this tenant
guardrail.risk-score-thresholddouble (0.0–1.0)Override risk score threshold
guardrail.max-input-tokensintOverride max estimated input tokens
guardrail.max-messages-per-requestintOverride max messages per request
guardrail.max-message-lengthintOverride max message character length
guardrail.default-max-response-tokensintOverride default response token cap
guardrail.content.profanity.actionBLOCK / FLAG / LOGPer-category action override
guardrail.content.violence.actionBLOCK / FLAG / LOGPer-category action override
guardrail.content.sexual.actionBLOCK / FLAG / LOGPer-category action override
guardrail.content.competitor.keywordscomma-separatedCompetitor brand keywords
guardrail.content.topic-restrictionscomma-separatedRestricted topic keywords
guardrail.content.custom-denylistJSON stringCustom deny-list patterns
guardrail.injection.custom-patternsJSON stringCustom injection patterns
guardrail.mcp-injection.enabledtrue / falseEnable MCP injection scanning
guardrail.mcp-injection.actionBLOCK / FLAG / SANITIZEMCP injection action
guardrail.context.warning-threshold-pctint (0–100)Context window warning threshold (default: 70)
guardrail.context.hard-threshold-pctint (0–100)Context window hard threshold (default: 90)
guardrail.context.pruning-strategyNONE / TRUNCATE_OLDEST / TRUNCATE_MIDDLEContext pruning strategy

See Guardrails & Safety for full configuration details.

gateway.finops.* (Enterprise — Cost Calculation)

PropertyTypeDefaultDescription
finops.enabledbooleantrueEnable enterprise cost calculation
finops.pricing-cache-ttl-secondsint60TTL for pricing lookup cache (0 = disabled)
finops.spend-cache-ttl-secondsint5TTL for budget spend cache (avoids per-request DB queries)
finops.soft-alert-cooldown-minutesint60Cooldown between soft budget alert audit events
finops.downgrade-cache-ttl-secondsint5TTL for per-tenant downgrade policy cache (0 = disabled)
finops.chargeback-schedulestring""Cron expression for monthly chargeback report auto-generation (empty = disabled)
finops.anomaly-threshold-pctint200Default anomaly threshold: current daily rate vs 30d baseline (200 = 2x)
finops.budget-warning-threshold-pctint75Default utilization % threshold for WARN_AGENT policy rules

Cost calculation uses ModelPricing entries managed via the /admin/v1/pricing API. Pricing supports glob patterns (e.g. gpt-4o* matches gpt-4o, gpt-4o-mini). Costs are calculated per-request using BigDecimal precision and persisted as CostRecord entries, queryable via /admin/v1/costs.

Budget caps enforce soft and hard spending limits per tenant, API key, or globally. Configure budgets via /admin/v1/budgets. Soft limits trigger BUDGET_CAP_SOFT audit events at a configurable threshold (default 80%). Hard limits block requests with HTTP 402 and write BUDGET_CAP_HARD audit events. Budget periods (DAILY, WEEKLY, MONTHLY) reset automatically at UTC boundaries.

Chargeback reports aggregate costs by tenant, API key, model, provider, and time period. Reports are exportable as CSV and PDF. Monthly auto-generation is available via chargeback-schedule cron. Cost forecasting uses trailing 7-day and 30-day spend trends with linear projection. Cost anomaly detection compares current daily spend rate against the 30-day baseline; alerts fire when the deviation exceeds the configured threshold (per-tenant override via cost.anomaly-threshold-pct metadata key).

Enterprise Config Sync (Multi-Instance)

Requires enterprise-core on classpath + valid JWT license key. Enables instances to poll a primary instance for configuration changes within 5 seconds.

PropertyEnvironment VariableDefaultDescription
gateway.config.sync.enabledfalseEnable config polling on secondary instances
gateway.config.sync.control-plane-urlBase URL of the primary instance (e.g. http://dvara-primary:8080)
gateway.config.sync.poll-interval-ms3000How often to check for version changes (ms)
gateway.config.sync.internal-secretShared secret for /internal/* API authentication
gateway.config.sync.connect-timeout-ms3000HTTP connect timeout for control plane calls
gateway.config.sync.read-timeout-ms5000HTTP read timeout for control plane calls
gateway.config.sync.heartbeat-interval-ms10000How often to POST heartbeat to control plane (ms)

Secondary instances check /internal/v1/config/version every poll-interval-ms. On version change, the full config is fetched from /internal/v1/config/full and applied locally. Instances also POST heartbeats to /internal/v1/instances/heartbeat for fleet visibility.

Enterprise Latency-Aware Routing Configuration

Requires enterprise-routing on classpath + valid JWT license key.

PropertyEnvironment VariableDefaultDescription
gateway.routing.latency.alpha0.2EWMA smoothing factor (0.0–1.0). Higher values give more weight to recent samples
gateway.routing.latency.decay-threshold-ms60000Staleness threshold in milliseconds. Entries older than this receive a decay penalty
gateway.routing.latency.decay-multiplier0.5Stale EWMA is divided by this value (lower = harsher penalty)
gateway.routing.latency.min-samples5Minimum latency samples before EWMA is used for routing decisions
gateway.routing.latency.snapshot-interval100Persist latency snapshot to repository every N samples

Enterprise Priority Routing Configuration

Requires enterprise-routing on classpath + valid JWT license key.

PropertyEnvironment VariableDefaultDescription
gateway.routing.priority.enabledfalseEnable concurrency-based priority admission control
gateway.routing.priority.max-concurrent-requests1000Maximum concurrent requests across all tiers
gateway.routing.priority.tiers.premium.throttle-threshold-pct100Load % at which premium requests are throttled
gateway.routing.priority.tiers.standard.throttle-threshold-pct80Load % at which standard requests are throttled
gateway.routing.priority.tiers.bulk.throttle-threshold-pct50Load % at which bulk requests are throttled
gateway.routing.priority.resolver-cache-ttl-seconds5TTL for tenant → priority tier cache

Enterprise Webhook Configuration

Requires enterprise-audit on classpath + valid JWT license key.

PropertyEnvironment VariableDefaultDescription
gateway.webhooks.enabledGATEWAY_WEBHOOKS_ENABLEDtrueEnable webhook delivery of governance events
gateway.webhooks.max-retriesGATEWAY_WEBHOOKS_MAX_RETRIES3Maximum retry attempts for failed deliveries
gateway.webhooks.base-retry-delay-msGATEWAY_WEBHOOKS_RETRY_DELAY1000Base delay in milliseconds for exponential backoff
gateway.webhooks.retry-multiplierGATEWAY_WEBHOOKS_RETRY_MULTIPLIER4Multiplier for exponential backoff (delay = base x multiplier^attempt)
gateway.webhooks.delivery-timeout-msGATEWAY_WEBHOOKS_DELIVERY_TIMEOUT5000HTTP connect+read timeout for webhook delivery
gateway.webhooks.approval-base-urlGATEWAY_WEBHOOKS_APPROVAL_BASE_URL"" (empty)Base URL for approve/deny links in MCP approval webhooks
gateway.webhooks.approval-ttl-minutesGATEWAY_WEBHOOKS_APPROVAL_TTL15TTL in minutes for approval token validity

gateway.persistence.* (Enterprise — Database Persistence)

Requires enterprise-persistence on classpath + valid JWT license key.

PropertyEnvironment VariableDefaultDescription
gateway.persistence.enabledGATEWAY_PERSISTENCE_ENABLEDfalseEnable database-backed persistence for all repositories
gateway.persistence.batch-sizeGATEWAY_PERSISTENCE_BATCH_SIZE100Batch size for bulk write operations
spring.datasource.urlSPRING_DATASOURCE_URLJDBC connection URL (e.g. jdbc:postgresql://localhost:5432/dvara)
spring.datasource.usernameSPRING_DATASOURCE_USERNAMEDatabase username
spring.datasource.passwordDB_PASSWORDDatabase password
spring.flyway.enabledSPRING_FLYWAY_ENABLEDtrueAuto-run Flyway database migrations on startup
# Enterprise Persistence (enterprise-persistence module)
gateway:
persistence:
enabled: true # default: false
batch-size: 100 # default: 100

spring:
datasource:
url: jdbc:postgresql://localhost:5432/dvara
username: dvara
password: ${DB_PASSWORD}
flyway:
enabled: true # auto-runs migrations on startup

gateway.caching.* (Enterprise — Distributed Caching)

Requires enterprise-caching on classpath + valid JWT license key.

PropertyEnvironment VariableDefaultDescription
gateway.caching.distributed.enabledGATEWAY_CACHING_DISTRIBUTED_ENABLEDfalseEnable Redis cache-aside decorators for repositories
gateway.caching.distributed.ttl-secondsGATEWAY_CACHING_DISTRIBUTED_TTL300Default cache TTL in seconds
gateway.caching.distributed.max-entriesGATEWAY_CACHING_DISTRIBUTED_MAX_ENTRIES10000Maximum cache entries
gateway.caching.distributed.key-prefixGATEWAY_CACHING_DISTRIBUTED_KEY_PREFIXdvaraRedis key prefix for all cache entries
gateway.ratelimit.distributed.enabledGATEWAY_RATELIMIT_DISTRIBUTED_ENABLEDfalseEnable Redis sliding-window distributed rate limiter
spring.data.redis.hostSPRING_DATA_REDIS_HOSTlocalhostRedis server hostname
spring.data.redis.portSPRING_DATA_REDIS_PORT6379Redis server port
spring.data.redis.passwordREDIS_PASSWORDRedis server password
# Enterprise Distributed Caching (enterprise-caching module)
gateway:
caching:
distributed:
enabled: true # default: false
ttl-seconds: 300
max-entries: 10000
key-prefix: dvara

ratelimit:
distributed:
enabled: true # default: false (Redis sliding-window)

spring:
data:
redis:
host: localhost
port: 6379
password: ${REDIS_PASSWORD:}

MCP Proxy Configuration

Configuration for the standalone MCP Proxy application (mcp-proxy-server, port 8070). Requires enterprise license.

PropertyEnvironment VariableDefaultDescription
gateway.mcp.timeout-defaultMCP_TIMEOUT_DEFAULT30Default timeout in seconds for MCP server requests
gateway.mcp.timeout-maxMCP_TIMEOUT_MAX120Maximum allowed timeout in seconds
gateway.mcp.registry-cache-ttl-secondsMCP_REGISTRY_CACHE_TTL30TTL for the Caffeine-backed MCP server registry cache
gateway.mcp.registry-cache-max-sizeMCP_REGISTRY_CACHE_MAX_SIZE1000Maximum entries in the MCP server registry cache

management.* (Observability)

PropertyTypeDefaultDescription
management.endpoints.web.exposure.includestringhealth,prometheus,gateway-statusActuator endpoints to expose
management.endpoint.health.show-detailsstringwhen-authorizedHealth detail visibility
management.prometheus.metrics.export.enabledbooleantrueEnable Prometheus scrape endpoint

Logging

ConfigurationValueDescription
Default formatJSON (LogstashEncoder)Every log line is valid JSON
Plain-text modespring.profiles.active=log-plainHuman-readable output for local dev
Log config filelogback-spring.xmlLogback configuration with Spring profile support