.NET API
TraconWebhookOptions
Tracon.Core.dllEvent publishing (webhook) settings.
public sealed class TraconWebhookOptions- Inheritance
- object ← TraconWebhookOptions
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the Tracon:Webhooks configuration section.
Constructors
Section titled “Constructors”TraconWebhookOptions()
Section titled “ TraconWebhookOptions()”public TraconWebhookOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "Tracon:Webhooks"Field Value
Section titled “Field Value”Properties
Section titled “Properties”AllowInsecureHttp
Section titled “ AllowInsecureHttp”Whether unencrypted http targets are allowed. Even when
allowed, only loopback addresses are accepted.
public bool AllowInsecureHttp { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Needed to test a listener in local development. The loopback restriction is not lifted: sending an unencrypted event to a publicly reachable address would expose the event’s content to the network.
AllowPrivateNetworkTargets
Section titled “ AllowPrivateNetworkTargets”Whether delivery to private network addresses is allowed. Disabled by default.
public bool AllowPrivateNetworkTargets { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Enabling this opens up an SSRF surface: the server becomes able to
send requests to any service on the internal network, and to the
cloud metadata endpoint (169.254.169.254). It should only be
enabled deliberately, on a closed network.
AllowedConfigurationPrefix
Section titled “ AllowedConfigurationPrefix”Gets or sets the only prefix under which a subscription may reference a
configuration key: its signing secret and every entry of its
headerConfigurationKeys. Default is "Tracon:WebhookSecrets:".
public string AllowedConfigurationPrefix { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A security boundary, not a convenience default — the same reason as TraconTenantProviderOptions.AllowedConfigurationPrefix. Without it, a subscription could name an unrelated configuration key as its “signing secret” and Tracon would sign deliveries with a value that was never meant to leave the process.
DisableAfterConsecutiveFailures
Section titled “ DisableAfterConsecutiveFailures”If a subscription fails this many times in a row, it is automatically disabled and the event is written to the audit trail.
public int DisableAfterConsecutiveFailures { get; set; }Property Value
Section titled “Property Value”Enabled
Section titled “ Enabled”Whether event publishing is enabled. While disabled, a subscription can be registered, but no event is written to the queue.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”MaxExtraHeaders
Section titled “ MaxExtraHeaders”Gets or sets how many extra headers a subscription may add to a
delivery, plain headers and headerConfigurationKeys
together. Default 20.
public int MaxExtraHeaders { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Extra headers are administrator input and travel on every delivery. A
save over the limit is rejected with 400; a stored subscription
over it (saved before the rule, or by another store) sends the headers
read from configuration first, so the limit only cuts plain headers.
Headers whose name Tracon sets itself are always dropped, whatever
this limit is.
MaxResponseBytes
Section titled “ MaxResponseBytes”The maximum bytes read from the recipient’s response body.
public int MaxResponseBytes { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The response body is kept only for diagnostics. Reading it without a limit would let a malicious recipient exhaust memory.
RetryDelays
Section titled “ RetryDelays”The retry ladder. The list’s length is also the maximum number of attempts.
public IList<TimeSpan> RetryDelays { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This ladder is handed to the queue through
ReleaseForRetryAsync(retryAfter); a second queue or scheduler
is not written.
In configuration, a list (RetryDelays:0 = "00:01:00") that replaces the
default. Each delay must be greater than zero: a delay of zero or below, or
one that is not a TimeSpan, stops the application at startup
with an Options.OptionsValidationException
that names RetryDelays and quotes the entry as written. Such an entry
used to be dropped without a word.
SignatureTolerance
Section titled “ SignatureTolerance”The signature timestamp tolerance the recipient should accept. This is the value recommended to the recipient in the README; Tracon only documents it.
public TimeSpan SignatureTolerance { get; set; }Property Value
Section titled “Property Value”Timeout
Section titled “ Timeout”The timeout for a single delivery attempt.
public TimeSpan Timeout { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Covers the whole attempt: opening the connection, sending the payload, and reading the recipient’s response body up to TraconWebhookOptions.MaxResponseBytes. A recipient that answers its headers quickly and then stalls on the body is cut off at the same deadline. Must be from one millisecond to about 49.7 days; any other value fails at startup.