namespace ScadaLink.InboundAPI; public class InboundApiOptions { /// /// Default cap on the inbound API request body, in bytes (InboundAPI-006). /// public const long DefaultMaxRequestBodyBytes = 1L * 1024 * 1024; // 1 MiB public TimeSpan DefaultMethodTimeout { get; set; } = TimeSpan.FromSeconds(30); /// /// InboundAPI-006: maximum accepted request body size for POST /api/{methodName}. /// Requests whose body exceeds this are rejected with HTTP 413 before being /// buffered into a . The inbound API /// has no rate limiting (a deliberate design choice), so an explicit, modest cap /// bounds per-request allocations. /// public long MaxRequestBodyBytes { get; set; } = DefaultMaxRequestBodyBytes; /// /// ConfigurationDatabase-012: server-side HMAC pepper used to hash inbound-API /// bearer credentials. API keys are persisted as a deterministic keyed hash, never /// as plaintext; this pepper is the HMAC key that binds every hash to this /// deployment, so a stolen configuration database is not directly exploitable. /// /// This is a secret: supply a strong, random value via configuration or a secret /// store, never hard-coded. It must be present and at least /// /// characters — AddInboundAPI fails fast otherwise. /// /// public string ApiKeyPepper { get; set; } = string.Empty; }