Chronicle webhooks: deliver events to HTTP receivers
Cratis Chronicle webhooks send observed events to an external HTTP endpoint so another system can react without connecting to Chronicle. The Kernel, Chronicle’s server, makes the HTTP calls. Register a webhook once, then make the receiver safe to call again: delivery is at least once, so retries and replays can send an event more than once.
Register a webhook
Section titled “Register a webhook”Choose the event types your receiver handles and the credentials it expects. The .NET example registers account-events to send WebhooksIndexAccountOpened events with a bearer token and an x-source header. The receiver must be reachable from the Kernel, not just from the application registering it. Check the target validation policy before registering a local or private-network receiver.
using Cratis.Chronicle;using Cratis.Chronicle.Events;using Cratis.Chronicle.Webhooks;
[EventType]public record WebhooksIndexAccountOpened(string OwnerName);
public class WebhooksIndexRegister(IEventStore eventStore){ public async Task RegisterWebhook() => await eventStore.Webhooks.Register( "account-events", "https://example.com/chronicle/webhooks", builder => builder .WithEventType<WebhooksIndexAccountOpened>() .WithHeader("x-source", "my-app") .WithBearerToken(Environment.GetEnvironmentVariable("WEBHOOK_TOKEN")!));}import io.cratis.chronicle.EventStoreimport io.cratis.chronicle.events.EventType
@EventTypedata class WebhooksIndexOrderPlaced(val orderId: String)
suspend fun registerOrderWebhook(store: EventStore) { store.webhooks.register("order-placed-webhook", "https://hooks.example.com/orders") { builder -> builder .withEventType(WebhooksIndexOrderPlaced::class) .withBearerToken(System.getenv("CHRONICLE_WEBHOOK_TOKEN") ?: error("CHRONICLE_WEBHOOK_TOKEN is required")) }}import io.cratis.chronicle.EventStore;import io.cratis.chronicle.events.EventType;
import io.cratis.chronicle.java.WebhookDefinitionBuilderJavaBridge;import io.cratis.chronicle.java.WebhooksServiceJavaBridge;
@EventTyperecord WebhooksIndexOrderPlaced(String orderId) {}
class WebhooksIndexRegistration { void registerOrderWebhook(EventStore store) { WebhooksServiceJavaBridge.register(store.getWebhooks(), "order-placed-webhook", "https://hooks.example.com/orders", builder -> { WebhookDefinitionBuilderJavaBridge.withEventType(builder, WebhooksIndexOrderPlaced.class) .withBearerToken(java.util.Objects.requireNonNull(System.getenv("CHRONICLE_WEBHOOK_TOKEN"), "CHRONICLE_WEBHOOK_TOKEN is required")); }); }}defmodule MyApp.Events.WebhooksIndexAccountOpened do use Cratis.Chronicle.Events.EventType, id: "webhooks-index-account-opened"
defstruct [:owner_name]end
defmodule MyApp.WebhooksIndexRegister do alias MyApp.Events.WebhooksIndexAccountOpened
def register_webhook do Cratis.Chronicle.WebHooks.register( "account-events", "https://example.com/chronicle/webhooks", fn builder -> builder |> Cratis.Chronicle.WebHooks.DefinitionBuilder.with_event_type(WebhooksIndexAccountOpened) |> Cratis.Chronicle.WebHooks.DefinitionBuilder.with_header("x-source", "my-app") |> Cratis.Chronicle.WebHooks.DefinitionBuilder.with_bearer_token(System.fetch_env!("WEBHOOK_TOKEN")) end ) endendimport { eventType, IEventStore } from '@cratis/chronicle';import { field } from '@cratis/fundamentals';
@eventType()class WebhooksIndexAccountOpened { @field(String) readonly ownerName: string;
constructor(ownerName: string) { this.ownerName = ownerName; }}
class WebhooksIndexRegister { constructor( private readonly store: IEventStore, private readonly webhookToken: string ) {}
async registerWebhook(): Promise<void> { await this.store.webhooks.register( 'account-events', 'https://example.com/chronicle/webhooks', builder => { builder .withEventType(WebhooksIndexAccountOpened) .withHeader('x-source', 'my-app') .withBearerToken(this.webhookToken); } ); }
async registerWebhookWithOAuth(authority: string, clientId: string, clientSecret: string): Promise<void> { await this.store.webhooks.register( 'account-events-oauth', 'https://example.com/chronicle/webhooks', builder => builder .withEventType(WebhooksIndexAccountOpened) .withOAuth(authority, clientId, clientSecret, 'accounts.read accounts.write') .withHeader('x-source', 'my-app') ); }}Chronicle tracks delivery through an observer. An observer uses either a webhook or connected clients, never both at once. If you reuse an observer identifier, disconnect its clients first. Registration is refused while a connected client serves that observer in any namespace of the event store. The .NET client logs a warning and returns normally, leaving the webhook registration unchanged; a completed call alone does not prove registration succeeded.
A client stream waits while a webhook serves the observer. After you remove the webhook, subscription recovery resumes the client stream. Registration timing does not switch delivery between the two.
If you omit event types, the .NET builder uses all event types known to that client at registration time. Events of other types are not forwarded. Re-register to refresh that list when the client knows about additional types.
Custom header visibility
Section titled “Custom header visibility”Configure custom header values when registering a webhook. List and observable queries return HeaderValuesSet, a map of header names to whether a non-empty value is configured. Whitespace counts as a value; an empty string does not. The compatibility Headers map retains the names but contains only empty strings. Workbench shows names and value-set indicators without revealing values.
Filtering happens when definitions are read, including definitions stored before the upgrade; no migration or replay is needed. Delivery still sends the configured values. The .NET GetAll() result exposes metadata on Target.HeaderValuesSet and only empty values on Target.Headers. It is not a registration snapshot: do not re-register a query result, since registration replaces configuration and the original values cannot be recovered from the result. Workbench header editing is not available in this version.
Public event reads, exports, and event streams omit target header values from WebhookAdded and TargetHeadersSetForWebhook, including their original, revised, and generational content. Header names remain with empty values. Preview and snapshot reconstruction use the same public content. This applies in every event store, including its system sequence, and to events stored before the upgrade without a migration or replay. These public copies do not change stored event history or internal webhook replay and delivery configuration; this is read-time redaction, not encryption at rest.
An older Kernel still returns legacy values until upgraded; upgrade every Kernel serving queries or streams. The updated .NET client discards any legacy response values after deriving presence metadata, but an old Kernel’s wire response still carries those values until the Kernel is upgraded.
Signing
Section titled “Signing”Webhooks are unsigned by default. In the .NET registration callback, opt in with
WithSigning(WebhookSigningMode.Ed25519); the enum is in Cratis.Chronicle.Webhooks.
Chronicle signs deliveries using Standard Webhooks. Receivers verify signatures with
the event store’s public keys; see Verify signatures. HMAC signing is not available yet. See Signing keys for public-key retrieval and rotation.
To disable signing, re-register the webhook with WithSigning(WebhookSigningMode.None).
Signing keys
Section titled “Signing keys”In .NET, call eventStore.Webhooks.GetSigningKeys(). Other languages use the kernel query WebhookSigningPublicKey.GetWebhookSigningKeys(eventStore)
(GetWebhookSigningKeys on the Webhooks gRPC service) to retrieve an event store’s
current Ed25519 public keys. Each result contains KeyId, Algorithm, PublicKey,
Status, CreatedAt, and OverlapEndsAt. PublicKey uses whpk_ followed by
Base64-encoded Ed25519 public-key bytes. Private keys and HMAC secrets are never
returned. The query adds no extra authorization policy beyond the host defaults
and reads only the requested event store’s ring.
To rotate, submit the kernel command RotateWebhookSigningKey with EventStore
and optional UseSpecifiedOverlap and OverlapSeconds. Rotation requires administrator rights. The command
returns no key material: query GetWebhookSigningKeys again afterward to obtain the
new public key, then make it available to receivers within the overlap window. Receivers
load public keys themselves, as described in Verify signatures; the kernel does not push them.
Omit UseSpecifiedOverlap (or set it to false) for the default 24-hour overlap;
OverlapSeconds is ignored in that case. Set UseSpecifiedOverlap to true to use
OverlapSeconds, including zero. The maximum specified overlap is 30 days. During overlap, deliveries
carry signatures from both keys and the query lists the new Active key and the
previous Overlap key, including its OverlapEndsAt. For a compromised key, set
UseSpecifiedOverlap to true and OverlapSeconds to zero to retire it immediately and distribute the replacement
public key promptly. Expired overlap keys disappear from query results at read time;
retired keys are not listed. Treat Cratis-Key-Id as an advisory hint, not an
authorization or verification decision.
This unreleased rotation API replaces its earlier nullable overlap input; prerelease clients must regenerate their contracts to use the explicit overlap selector.
CLI retrieval and rotation commands will arrive in a separate CLI follow-up; use the kernel API for now. HMAC secret hand-off remains deferred and HMAC signing stays off.
Delivery retries and timeouts
Section titled “Delivery retries and timeouts”The observer schedules recovery rather than making the HTTP client sleep and retry inline. The authentication handlers can resend a request once after a 401, as described under OAuth client credentials and managed identity.
Transient failures (5xx, 408, connection errors and timeouts) consume the retry budget for a partition, the group of events tracked together by the observer. Receiver back-pressure can defer delivery instead, as described below. Webhook retries use Cratis:Chronicle:Webhooks:Retry, independently of the global Observers settings.
The default delays are 1s, 5s, 30s, 2m, 10m, 30m, then hourly, with ±20% jitter (random variation) capped at one hour. Chronicle saves the chosen deadline before scheduling recovery. The default elapsed retry budget is 24 hours from the first failure in the current budget. When that budget expires, Chronicle quarantines the partition, pausing its delivery. MaxRetryAttempts defaults to 0, which removes the attempt-count limit but not the elapsed-time limit.
These kernel settings under Cratis:Chronicle:Webhooks tune delivery:
| Setting | Default | What it does |
|---|---|---|
RequestTimeoutSeconds |
60 |
Timeout for each individual delivery request. Raise it for receivers that legitimately take longer to answer |
TestTimeoutSeconds |
10 |
Timeout when testing a webhook endpoint |
CircuitBreakerSamplingDurationSeconds |
30 |
Window over which failures are sampled by the delivery circuit breaker |
CircuitBreakerBreakDurationSeconds |
15 |
How long the circuit breaker stays open after it trips |
MaximumRetryAfterSeconds |
86400 |
Longest Retry-After delay Chronicle honors. Longer receiver deadlines are clamped to this bound |
For example, Cratis__Chronicle__Webhooks__RequestTimeoutSeconds=120 doubles the request timeout.
The observer’s subscriber timeout cancels the HTTP operation and waits for cancellation cleanup before another delivery starts. Cancelling a catch-up, replay, or partition-retry job also cancels its HTTP operation. The job does not immediately retry a timed-out call; the observer owns recovery.
Circuit-open deferrals and manual retry
Section titled “Circuit-open deferrals and manual retry”A circuit breaker temporarily stops requests to a failing receiver. Webhooks share a breaker by target authority (scheme, host, and port), so different paths, observers, and event stores calling that authority share its state. An open circuit defers delivery until its deadline without consuming a partition retry attempt. Chronicle saves the deadline and first unhandled event; a restart or resubscription does not resume delivery early.
A manual partition retry is an explicit operator override: it clears the deferral and retries immediately, recording an information-level log with the overridden reason and deadline. If the circuit is still open, delivery is rejected without sending an HTTP request and the partition is deferred again. Automatic recovery does not override deadlines.
The chronicle-webhook-circuit-opened and chronicle-webhook-circuit-rejected counters
are tagged by normalized target authority. With Telemetry:MetricNames=Convention (opt-in) they are published as cratis.chronicle.webhook.circuit_openings and cratis.chronicle.webhook.circuit_rejections, tagged cratis.chronicle.webhook.authority. Circuit-open deferrals also log the authority
and deadline; paths, observer identifiers, and event-store names are not metric tags.
Receiver back-pressure and permanent failures
Section titled “Receiver back-pressure and permanent failures”A valid Retry-After on 429 or 503 defers the partition without consuming a retry
attempt. Both delta-seconds and HTTP-date values are accepted. Deadlines are clamped to
Webhooks.MaximumRetryAfterSeconds (default 24 hours); malformed or past values fall
back to the transient failure budget. A 429 without a valid deadline is also retryable.
No receiver back-pressure response sleeps on a worker or trips the circuit breaker.
After handling 408, 429, and 410 separately, Chronicle treats other 4xx responses as configuration problems. It records the failure and quarantines the entire observer, pausing all its delivery rather than spending the retry budget on unchanged credentials or URLs. Correct the configuration, then let automatic recovery check it or clear observer quarantine to resume immediately.
A 410 Gone immediately parks the partition with no automatic retries and logs the target authority. It does not retire the webhook. Correcting the receiver alone will not resume that partition; operator intervention is required.
After reactivation, Chronicle retains retry counts, deadlines, and the first event to deliver again, including that event. A failed automatic retry replaces its expired deadline with a new RetryBackoff deadline. Reactivation itself neither chooses new jitter nor consumes an attempt. Structured logs distinguish configuration rejection, 410 parking, circuit-open rejection, receiver back-pressure, and backoff attempts and deadlines. These webhook policies do not change retry behavior for other observers.
Webhook observer quarantine defaults to 5 parked partitions or at least 50% of the distinct partitions in its failure/resolution history, whichever is reached first. Valid throttle/circuit deferrals do not count as parked partitions or consume attempts. Clearing partition quarantine starts a fresh retry budget while retaining attempt history.
Catch-up and replay also wait for an existing partition deferral. They do not report events handled or advance their checkpoint while waiting. Only the recovery job authorized for that failure can clear it; completion from an older job cannot discard the saved resume position.
Automatic recovery from quarantine
Section titled “Automatic recovery from quarantine”For eligible quarantined webhooks, Chronicle periodically tries to deliver one real, pending event. This recovery check, called a probe, uses the same subscriber, validation, authentication, circuit breaker, event-generation policy, and back-pressure handling as ordinary delivery. Your receiver needs no separate health endpoint. The observer stays quarantined until that event succeeds and Chronicle saves its progress. If the bounded read finds no deliverable event, delivery remains paused.
Probes begin after 60 seconds by default. After an unsuccessful check, the delay doubles, with ±20% jitter capped at one hour. The chosen deadline survives restart. On startup, Chronicle restores the subscriber without clearing quarantine, resetting retry budgets, or sending early. A later circuit-open or Retry-After deadline takes precedence over probe backoff.
Probe failures do not add partition attempts, consume the normal retry budget, or grow the failure history. Only one probe may run for an observer, and cancellation must finish cleaning up its HTTP operation before a later delivery can begin.
Configuration failures and exhausted transient-failure budgets are eligible for probing. 410 Gone, legacy failures without an explicit receiver policy, and unrelated watchdog quarantines still require manual recovery. A successful probe resets eligible partitions’ retry budgets but retains their attempt history. It leaves 410 and manual-only partitions parked, and keeps other partitions’ saved deferral deadlines and resume positions.
Chronicle saves the successful event’s checkpoint before normal recovery starts at the next undelivered position. This is not an exactly-once guarantee: a crash before that checkpoint can cause redelivery, so receivers must remain idempotent.
To check recovery, inspect the observer state in the Workbench or CLI. It shows Quarantined until recovery succeeds. Structured logs identify the probe and failure, with deadlines and outcomes but no payloads, URLs or credentials. Counters
chronicle-webhook-probe-scheduled, chronicle-webhook-probe-attempts,
chronicle-webhook-probe-failures, chronicle-webhook-probe-successes,
chronicle-webhook-probe-deferred, chronicle-webhook-probe-skipped,
chronicle-webhook-probe-cancelled, and chronicle-webhook-probe-resumes distinguish scheduling from actual delivery and resumption. These are the default names. Opt in to Telemetry:MetricNames=Convention (or Both while migrating) to publish them under cratis.chronicle.webhook.*; see the telemetry name reference. Do not sum series when using Both: each measurement is recorded to both sets.
Disable automatic checks with Cratis:Chronicle:Webhooks:Probe:Enabled=false; manual clear,
retry, retirement and removal remain available. Unsubscribe, explicit re-registration and
operator recovery invalidate the old probe so a late callback cannot resume a new lifecycle.
See Kernel webhook options for schedule, budget and quarantine overrides.
OAuth client credentials
Section titled “OAuth client credentials”Use OAuth client credentials when the receiver requires an access token from an identity provider. Configure WithOAuth(authority, clientId, clientSecret, scope) on the .NET webhook builder. The Kernel obtains the token and applies it to each HTTP send.
scope is optional and defaults to an empty string; the Workbench’s OAuth form also accepts an optional scope. For Microsoft Entra client credentials, request the resource’s api://<application-id>/.default scope. An empty scope is omitted from the token request. Existing registrations without scope continue to work unchanged, but re-registering OAuth credentials without scope clears a previously configured scope.
The Kernel shares tokens for the same token endpoint, client, scope, and credentials, and refreshes shortly before expiry. Tokens without an expiry are not cached. A 401 invalidates the rejected token and resends the same request once with a fresh token. Other responses do not trigger an OAuth retry. If the receiver still returns 401, Chronicle treats it as a configuration failure and pauses the observer.
Managed identity
Section titled “Managed identity”Managed identity authenticates webhook calls with the Kernel’s Azure identity, not the identity of the client registering the webhook. Approving a receiver lets it receive that identity’s access token, so approve only trusted receivers and scopes.
Before registering the webhook, the Kernel operator must configure the global identity allow-lists. Managed identity webhooks are disabled until scopes are allowed. In chronicle.json:
{ "webhooks": { "allowedHosts": ["receiver.example"], "managedIdentity": { "allowedScopes": ["api://receiver/.default"], "allowedClientIds": ["<managed-identity-client-id>"], "allowSystemAssigned": false } }}The equivalent environment variables are:
Cratis__Chronicle__Webhooks__AllowedHosts__0=receiver.exampleCratis__Chronicle__Webhooks__ManagedIdentity__AllowedScopes__0=api://receiver/.defaultCratis__Chronicle__Webhooks__ManagedIdentity__AllowedClientIds__0=<managed-identity-client-id>Cratis__Chronicle__Webhooks__ManagedIdentity__AllowSystemAssigned=falseAllowedScopes defaults to empty and matches the complete scope ignoring case, without prefix or wildcard matching. AllowedClientIds defaults to empty and matches non-empty client ids exactly. AllowSystemAssigned defaults to false; set it to true only to permit an empty client id, including the AZURE_CLIENT_ID environment default on workload identity hosts. These identity options are global only, not per event store.
The receiver host must explicitly match the existing AllowedHosts policy, even in Warn mode. Existing EventStoreAllowedHosts overrides and *.example.com subdomain matching still apply. Other authorization types retain their validation mode behavior. Registration, including bulk client registration, refuses unapproved requests before recording changes or acquiring a token. Delivery rechecks approval before token acquisition; revoking approval blocks persisted definitions and pauses their observer instead of sending a token.
Then register the approved scope, client id and receiver with the .NET builder’s WithManagedIdentity(scope, clientId) method. The kernel requests tokens with its
own managed identity or workload identity. scope is required, for example
api://<receiver-application-id>/.default; clientId is optional and selects a user-assigned
identity (leave it out for the system-assigned identity only when AllowSystemAssigned is enabled). The Workbench offers the same option as
Managed identity.
using Cratis.Chronicle;using Cratis.Chronicle.Events;using Cratis.Chronicle.Webhooks;
[EventType]public record WebhooksIndexManagedIdentityAccountOpened(string OwnerName);
public class WebhooksIndexManagedIdentity(IEventStore eventStore){ public async Task RegisterWebhook() => await eventStore.Webhooks.Register( "account-events-managed-identity", "https://example.com/chronicle/webhooks", builder => builder .WithEventType<WebhooksIndexManagedIdentityAccountOpened>() .WithManagedIdentity("api://<receiver-application-id>/.default"));}Access tokens are not stored in webhook definitions or delivery-failure details and are not shown in the Workbench. Receiver response bodies and reason phrases are not retained as managed identity delivery errors.
Tokens are cached and refreshed shortly before expiry. On a 401, Chronicle discards its cached token and the Azure credential instance that supplied it, then retries once. Azure Identity and the identity endpoint control their own caching; this does not guarantee a different access token.
If the Kernel has no managed identity, token acquisition fails and delivery enters the webhook failure policy; registration does not provision an identity.
See Call Entra-protected endpoints from webhooks
for the hosting details.
Pin the generation your endpoint understands
Section titled “Pin the generation your endpoint understands”To keep an endpoint on the event shape it knows, opt in per webhook with the .NET
builder’s WithGenerationDelivery(EventGenerationDelivery.Pinned) method. The enum is
in Cratis.Chronicle.Observation. This is independent of the client’s global reactor,
reducer, and projection option. Core registrations can set GenerationDelivery to Pinned
on AddWebhook or on each definition sent to AddWebhooks.
The kernel persists each subscribed event type’s identifier and generation with the delivery policy. Live delivery, catch-up, replay, and partition retries select and release that generation. Registering another generation does not move these pins; deliberately re-register the webhook with different event types to change them. Registration rejects unregistered generations and multiple generations of one event type before recording changes.
The HTTP payload envelope is unchanged: it still carries the partition and appended events,
including GenerationalContent. In pinned mode, an event’s content, delivered generation,
and hash correspond to its pin; AppendedGeneration still records the original append generation.
Missing stored materializations are migrated for delivery only, with no stored hash. A release
failure sends no HTTP request and fails the batch without acknowledging it.
The default remains Compatibility. Upgrade every kernel silo before opting in. See
event type migrations
for revision and protected-value behavior.
Query registered webhooks
Section titled “Query registered webhooks”After registration, list the stored definitions to check that your webhook is present with the intended configuration. A stored definition confirms registration, not successful HTTP delivery. Use observer state and the recovery logs described above to investigate delivery failures.
using Cratis.Chronicle;using Cratis.Chronicle.Webhooks;
public class WebhooksIndexQuery(IEventStore eventStore){ public async Task<IEnumerable<WebhookDefinition>> GetAllWebhooks() => await eventStore.Webhooks.GetAll();}import io.cratis.chronicle.EventStore
suspend fun listRegisteredWebhooks(store: EventStore) { val webhooks = store.webhooks.getAll() webhooks.forEach { webhook -> println("${webhook.identifier} -> ${webhook.target.url}") }}import Cratis.Chronicle.Contracts.Observation.Webhooks.ObservationWebhooks;
import io.cratis.chronicle.EventStore;
import io.cratis.chronicle.java.WebhooksServiceJavaBridge;
import java.util.List;
class WebhooksIndexListing { void listRegisteredWebhooks(EventStore store) { List<ObservationWebhooks.WebhookDefinition> webhooks = WebhooksServiceJavaBridge.getAll(store.getWebhooks()); for (ObservationWebhooks.WebhookDefinition webhook : webhooks) { System.out.println(webhook.getIdentifier() + " -> " + webhook.getTarget().getUrl()); } }}defmodule MyApp.WebhooksIndexQuery do def get_all_webhooks do Cratis.Chronicle.WebHooks.all() endendimport { IEventStore } from '@cratis/chronicle';import { WebhookDefinition } from '@cratis/chronicle.contracts';
class WebhooksIndexQuery { constructor(private readonly store: IEventStore) {}
async getAllWebhooks(): Promise<WebhookDefinition[]> { return this.store.webhooks.getWebhooks(); }}Target validation
Section titled “Target validation”The Kernel applies the same target policy to single and bulk webhook registration, webhook delivery,
OAuth discovery, and the discovered OAuth token endpoint. Redirects are never followed, including in
Warn mode: receivers and authorities must expose their final URL directly. Policy/probe failures
return local error messages rather than remote response bodies.
Configure the Kernel’s Webhooks section (not client registration options). In chronicle.json:
{ "webhooks": { "validation": "Enforce", "allowedHosts": ["hooks.example.com", "*.identity.example.com"], "eventStoreAllowedHosts": { "orders": ["orders.receiver.example", "login.identity.example.com"] } }}Validation defaults to Warn in Development builds and BlockLocalAddresses in other builds. Choose the mode for the destinations your Kernel may call:
| Mode | Effect |
|---|---|
Warn |
Permits violations with structured warnings, except unapproved metadata addresses. |
BlockLocalAddresses |
Blocks unapproved loopback (including IPv4-mapped loopback), IPv4 169.254/16 link-local and 0/8 unspecified addresses, and IPv6 fe80::/10 link-local and :: unspecified addresses. Warns for other private/special addresses, HTTP, and missing host approval. |
BlockPrivateAddresses |
Also blocks other unapproved private/special addresses. |
Enforce |
Rejects every policy violation, including HTTP and missing host approval, subject to the Development exceptions below. |
Chronicle evaluates stored active webhooks against current policy before subscription, including after restart. A rejected stored target or OAuth authority quarantines the observer without changing the definition or its IsActive flag. Warn-mode violations are logged at activation, not for every delivery. Inactive webhooks remain inactive and are not subscribed.
After fixing the target, approved hosts, or runtime policy, re-register the webhook or explicitly clear its observer quarantine. Policy is evaluated again before delivery resumes; clearing quarantine alone cannot bypass a still-invalid target. A policy rejection during request/connect validation also pauses the whole observer rather than consuming its transient retry budget.
Before selecting BlockPrivateAddresses or Enforce, review policy warnings and approve only trusted receiver and OAuth hosts. Include any local or private-network receivers that your deployment intentionally uses; a stricter mode can block their delivery.
An exact host entry also explicitly permits that host’s private addresses. *.example.com approves
subdomains, not example.com or notexample.com. Entries are hosts, without a scheme, path, or port.
An event-store entry replaces the global host list, so include both receiver and OAuth hosts there.
Administrator approval means adding the host to this configuration; there is no CLI proposal/approval flow.
Registration reachability probes and webhook OAuth requests carry their event-store context,
including deliveries with an empty batch. Callers without event-store context use the global list
and emit a debug diagnostic; include their receiver and OAuth hosts globally.
DNS is resolved again when opening each connection; every answer is checked before connecting to
an approved IP directly. IPv4-mapped IPv6 addresses are checked as IPv4. Loopback, private, link-local,
unspecified, multicast, and other special addresses are not public destinations. The metadata services
169.254.169.254 and fd00:ec2::254 are blocked even in Warn unless the host is explicitly approved.
Do not approve metadata hosts in normal deployments. Kernel HTTP clients do not use system proxies,
which would otherwise bypass local connect-time address validation. Requests using an explicit host
allowance close their connection after each request, even when the host currently resolves publicly,
so one event store cannot lend its approved connection to another. Unapproved public destinations
retain connection pooling in modes that permit them.
HTTP capture destinations use a separate ExternalServices policy and never inherit webhook approvals;
see External Services.
Local development
Section titled “Local development”Run the Kernel with DOTNET_ENVIRONMENT=Development. In that environment, HTTP loopback receivers
(localhost, 127.0.0.1, ::1) work without an exception. From a container, localhost is the container,
not your development machine: use host.docker.internal and enable AllowInsecureHttp if using HTTP.
For a tunnel, approve its exact hostname (or a trusted wildcard) and prefer HTTPS:
{ "webhooks": { "validation": "Enforce", "allowInsecureHttp": true, "allowedHosts": ["my-receiver.tunnel.example"] }}AllowInsecureHttp is ignored outside Development, with a startup warning. In Enforce mode it cannot enable HTTP in production, even for an approved host. In Warn mode, HTTP outside Development logs a violation rather than failing, except for the metadata rule above.
Target evaluation never activates or rewrites stored definitions. Stored targets are rechecked at request/connection time; a newly disallowed target fails delivery with a local policy reason. A rejected registration is not persisted. See the Kernel webhook options for all configuration keys.
Related topics
Section titled “Related topics”To write the endpoint that receives these requests, including what each request contains and how to handle the same event arriving twice, see Webhook receivers. To inspect and control long-running Kernel operations, continue with Jobs. If the destination is another event store rather than an HTTP receiver, use Subscriptions instead.