Skip to content
Tracon

TraconWebhookOptions

Namespace Tracon · Assembly Tracon.Core.dll

Event 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()

Read from the Tracon:Webhooks configuration section.

public TraconWebhookOptions()

The configuration section name.

public const string SectionName = "Tracon:Webhooks"

string

Whether unencrypted http targets are allowed. Even when allowed, only loopback addresses are accepted.

public bool AllowInsecureHttp { get; set; }

bool

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.

Whether delivery to private network addresses is allowed. Disabled by default.

public bool AllowPrivateNetworkTargets { get; set; }

bool

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.

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; }

string

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.

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; }

int

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; }

bool

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; }

int

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.

The maximum bytes read from the recipient’s response body.

public int MaxResponseBytes { get; set; }

int

The response body is kept only for diagnostics. Reading it without a limit would let a malicious recipient exhaust memory.

The retry ladder. The list’s length is also the maximum number of attempts.

public IList<TimeSpan> RetryDelays { get; }

IList<TimeSpan>

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.

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; }

TimeSpan

The timeout for a single delivery attempt.

public TimeSpan Timeout { get; set; }

TimeSpan

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.