- server.Config + DefaultConfig + LoadConfig/ParseConfig (yaml.v3) - all operator knobs now configurable: listen addr, audience, data dir, log level, per-IP rate limits, per-subject quota, challenge/session TTLs, max body bytes - server.New takes Config; flags (-addr/-audience/-data/-config) override the file; missing config.yaml falls back to defaults - config.yaml.example committed as template; config.yaml git-ignored - tests for config defaults/parsing/partial override
20 lines
887 B
Text
20 lines
887 B
Text
# Example relay configuration. Copy to config.yaml and edit.
|
|
# config.yaml itself is git-ignored; this file is the committed template.
|
|
|
|
listen_addr: ":8080" # HTTP listen address
|
|
audience: "trust.n1ko.dev" # audience bound into auth assertions
|
|
data_dir: "" # "" = in-memory; set a path to persist objects
|
|
log_level: "info" # debug | info | warn | error
|
|
|
|
# Per-IP fixed-window rate limits.
|
|
put_limit: 60 # POST /v1/objects per window
|
|
put_window: "1m"
|
|
challenge_limit: 30 # POST /v1/auth/challenge per window
|
|
challenge_window: "1m"
|
|
|
|
max_per_subject: 1000 # max claims stored per subject address
|
|
|
|
challenge_ttl: "5m" # validity of an issued auth challenge
|
|
session_ttl: "30m" # validity of a verified auth session
|
|
|
|
max_body_bytes: 9216 # hard request-body cap (tce.MaxClaimTCE*2 + 1024)
|