One notification-channel model replaces webhook subscriptions and delivers alerts by templated webhook and e-mail #149
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Reference
lantea-one/ninlil#149
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Webhooks post one fixed JSON shape (
WebhookDeliveryService.BuildPayload,src/dotnet/src/Ninlil.Dns.Server.Webhooks/WebhookDeliveryService.cs:547-563).WebhookSubscriptionEntityhas no template field (src/dotnet/src/Ninlil.Dns.Data.Abstractions/Entity/WebhookSubscriptionEntity.cs:13-72), so ntfy, Gotify, Discord or Slack cannot receive a readable message. SMTP exists only for identity mail (src/dotnet/src/Ninlil.Dns.Identity/Email/SmtpEmailSender.cs:29,IEmailSender.cs:9-23). The owner chose one channel entity for every delivery kind, so a later kind (MQTT, for example) is a new value, not a new table.What changes
The design, in one place so every child agrees:
NotificationChannelEntity(tableNinlilDnsNotificationChannels) replacesWebhookSubscriptionEntity. Common fields:Name(unique),Kind(NotificationChannelKindEnum:Webhook,Email),EventTypeNames,MaxDeliveryAttempts,IsDisabled,Comments. Webhook fields (null for other kinds):TargetUrl,AuthMode,AuthCredentialsEncrypted,HmacSigningSecretEncrypted,PayloadTemplate,PayloadContentType. E-mail fields (null for other kinds):EmailRecipients,EmailSubjectTemplate,EmailBodyTemplate.NotificationDeliveryEntity(tableNinlilDnsNotificationDeliveries) replacesWebhookDeliveryAttemptEntityfor every kind:ChannelId,ChannelName,ChannelKind,EventTypeName,Payload(the rendered body, captured once as today,WebhookDeliveryAttemptEntity.cs:49-54) and the existing status and retry fields.Webhookchannel with the sameId, so its delivery history keeps pointing at it. Stored role and user claims move to the new permission names:webhooks:read/webhooks:writebecomenotifications:read/notifications:write, andwebhookdeliverysettings:read/webhookdeliverysettings:writebecomenotificationdeliverysettings:read/notificationdeliverysettings:write. Older backup archives restore as webhook channels.NotificationDeliveryService) with one sender per kind, the existing persisted retry sweep for every kind, and one placeholder renderer for templates.api/notification-channelsreplacesapi/webhooks, which is removed in the same release (#156) with no deprecated alias.NINLIL_DNS_SERVER_WEBHOOKS_DELIVERY_*(sectionDnsServer:Webhooks:Delivery,src/dotnet/src/Ninlil.Dns.Server.Webhooks/WebhookDeliveryOptions.cs:19;ENVIRONMENT.md:468-472) becomeNINLIL_DNS_SERVER_NOTIFICATIONS_DELIVERY_*(sectionDnsServer:Notifications:Delivery);api/webhook-delivery-settings(src/dotnet/src/Ninlil.Web/Controllers/WebhookDeliverySettingsController.cs:38) becomesapi/notification-delivery-settings;webhook-delivery-retry-sweep(src/dotnet/src/Ninlil.Web/Services/ManagedServiceRegistry.cs:309) becomesnotification-delivery-retry-sweep;webhookDelivery(src/dotnet/src/Ninlil.Web/Program.cs:712) becomesnotificationDelivery.Children, in order:
api/webhooks, READMEAcceptance
Unreleasedlists the removed route and every renamed name.Source
audit-feature-parity.md§2A #12.Owner decision 2026-10-31: "ONE UNIFIED notification-channel entity (replaces webhook subscriptions)" (Q-PN-7); "mail retry: best effort" (Q-PN-8).
Owner decisions 2026-10-31, round 2: "api/webhooks: remove now, no deprecated alias" (R2-WEBHOOKS); "webhook delivery env vars, route, sweep id, health check: rename to notifications, no aliases" (R2-RENAME).