Skip to content

Notification Policies

Notification policies define which webhooks fire for which events on a given database and environment. They separate “what triggers” from “how to deliver.”

Notification policies are managed via server.toml (config-managed since v0.1.5):

[[notification_policies]]
database = "app"
environment = "production"
webhooks = ["ops-alerts"]
events = ["request_created", "break_glass", "request_completed"]

Changes take effect on server restart or dbward server reload.

FieldTypeDescription
databaseStringDatabase scope (or * for all)
environmentStringEnvironment scope (or * for all)
webhooksString[]Webhook IDs to fire
eventsString[]Events that trigger notifications (empty or ["*"] = all)
EventFires when
request_createdNew request submitted
request_approvedRequest manually approved (all steps complete)
request_auto_approvedRequest auto-approved by risk assessment
step_approvedOne step of a multi-step workflow approved
request_rejectedRequest rejected
request_completedExecution completed successfully
request_failedExecution failed
break_glassEmergency bypass used

Notification policies follow the same scoping model as other policies:

# All events on production → ops-channel webhook
[[notification_policies]]
database = "*"
environment = "production"
webhooks = ["ops-channel"]
events = ["*"]
# Break-glass on any DB → security-channel webhook
[[notification_policies]]
database = "*"
environment = "*"
webhooks = ["security-channel"]
events = ["break_glass"]
  • Webhooks define the delivery mechanism (URL, format, secret)
  • Notification policies define when those webhooks fire

A webhook without a notification policy never fires. A notification policy referencing a non-existent webhook ID is ignored.

You can also define webhooks directly in server.toml with an events filter. These act as combined webhook + notification policy:

[[webhooks]]
url = "https://hooks.slack.com/..."
format = "slack"
events = ["request_created", "break_glass"]

For finer-grained control (different events per database), use the API-managed notification policies instead.