Operating Husaria

Runtime settings

Runtime settings #

Persisted in husaria_data.runtime_settings and rendered live by the console. Writes serialise through Store.Set; readers are lock-free via an atomic snapshot pointer. The catalog is hard-coded.

Settings catalog #

KeyKindLive or restartDescription
log_levelstringlive (zap atom)Process-wide log verbosity.
introspection_enabledboolliveAllow __schema / __type on /v1/graphql.
maintenance_modeboolliveNon-admin callers get 503 on /v1/graphql. Admin secret bypasses.
unauthorized_rolestringliveRole applied to unauthenticated requests in legacy session-vars flows.
default_query_limitintliveConsole SQL Runner default LIMIT. Hard cap stays 5000.
cors_originsstringrestartComma-separated CORS allow-list.
db_max_connectionsintrestartPostgres pool size.
enable_consoleboolrestartMount the /console UI.
enable_websocketboolrestartToggle GraphQL subscriptions over WebSocket.
jwt_claims_namespacestringrestartJWT namespace claim path.

Endpoints #

  • PUT /console/api/settings upserts a single key.
  • DELETE /console/api/settings/:key reverts to the env default; live-applied keys fire their observer with nil.

Behaviour #

"Live" settings take effect immediately — log level changes propagate to the zap atomic level, the GraphQL handler reads the introspection flag per-request, and the maintenance gate is checked on each call. "Restart" settings are persisted but only consumed at startup; the console flags them so operators know a redeploy is required.