Skip to content

Webhooks / notifications

Harbor suiteRole: adminDescribes Onboard 0.58.0 / Health 0.21.0

Harbor can post short messages to a Microsoft Teams or Slack incoming webhook: operational events (a safe created, new compliance drift, new health problems) and security events (an emergency sign-in). Notifications are best-effort: a broken webhook is logged and never stops the action that triggered it.

Security events nobody looks at do not protect anything. An emergency (break-glass) sign-in in particular should reach a person within minutes, so Harbor sends it to the webhook whenever one is configured, whatever the event list says.

There is no console form for webhooks yet. Add a notifications block to the profile in the shared configuration, %ProgramData%\Harbor\environment.local.json (as an administrator of the machine), inside the profile’s existing fields:

"notifications": {
"webhookUrl": "<incoming webhook URL>",
"events": ["safe-created", "safe-decommissioned", "compliance-new-drift", "health-new-problems"]
}
Field Meaning
webhookUrl The incoming webhook URL from Teams or Slack. No URL means notifications are off.
events Which operational events to send. Leave it out to send all of them. Security events are always sent.

The message is {"text": "[Harbor] ..."} (security events name the product, for example [Harbor Onboard] ...), which both Teams and Slack incoming webhooks accept. Treat the webhook URL as a secret: anyone who has it can post to your channel. It is stored in the shared configuration, which only SYSTEM, Administrators and the Harbor account can read.

Event Sent when
safe-created A safe was created.
safe-decommissioned A safe was decommissioned.
account-onboarded An account was onboarded.
compliance-findings A compliance report found problems.
compliance-new-drift A scheduled compliance scan found new findings since the previous scan. The first scan records a quiet baseline.
compliance-auto-remediated Automatic remediation repaired drift after a scheduled scan.
Event Sent when
health-new-problems A scheduled health scan found new problems.
health-scan-failed A scheduled health scan failed.

Security events (both consoles, always sent)

Section titled “Security events (both consoles, always sent)”
Event Sent when
break-glass-used Someone signed in with the emergency account.
break-glass-changed The emergency account was created or its password changed.
bootstrap-complete A console’s first run was completed.

Failed sign-ins go to the audit log only.

An emergency sign-in is a quick end-to-end test: sign in once with the emergency account and check that break-glass-used reaches the channel. A webhook that fails is logged as a warning in the activity log, with the reason (for security events: the host only, at most once a minute).

  • Delivery is best-effort with a 10-second time-out and no retry queue. Do not use the webhook as your only record: the audit log is.
  • The message text is short and fixed; there is no template.

Covers Harbor Onboard 0.59.0 / Harbor Health 0.22.0. On an older release? Upgrading and the release notes list what changed.