Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

halo-psa-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and authenticate HaloPSA (also HaloITSM and HaloCRM) webhooks. Use when setting up a Halo webhook endpoint, checking the Basic Authentication header…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

HaloPSA Webhooks

Halo (HaloPSA, HaloITSM, HaloCRM) sends a JSON webhook when a notification event fires, such as a ticket being logged or reassigned. Webhooks are not signed. The only authentication option is Basic Authentication: Halo sends Authorization: Basic base64(username:password) and your endpoint checks it against the username and password you entered on the webhook.

Choose Basic Authentication on the Halo webhook.

When to Use This Skill

  • How do I receive HaloPSA webhooks?
  • How do I authenticate Halo webhooks with Basic auth?
  • Does HaloPSA sign webhook payloads? (No: Basic Authentication is the only auth option)
  • How do I handle New Ticket Logged or Ticket Reassigned events?
  • How do I handle batched Halo webhooks (a JSON array)?
  • Why does my Halo webhook endpoint return 401?

Verification (core)

const crypto = require('crypto');

const digest = (v) => crypto.createHash('sha256').update(v).digest();
const safeEqual = (a, b) => crypto.timingSafeEqual(digest(a), digest(b)); // equal-length buffers

function verifyHaloPsaRequest(headers, env = process.env) {
  const m = /^basic +([A-Za-z0-9+/]+={0,2})$/i.exec(headers['authorization'] || '');
  if (!m || m[1].length % 4 || !env.HALO_PSA_WEBHOOK_USERNAME || !env.HALO_PSA_WEBHOOK_PASSWORD) return false;
  let decoded;
  try { decoded = new TextDecoder('utf-8', { fatal: true }).decode(Buffer.from(m[1], 'base64')); }
  catch { return false; }
  const i = decoded.indexOf(':');                  // split on the FIRST colon
  if (i === -1) return false;
  const userOk = safeEqual(decoded.slice(0, i), env.HALO_PSA_WEBHOOK_USERNAME);
  const passOk = safeEqual(decoded.slice(i + 1), env.HALO_PSA_WEBHOOK_PASSWORD);
  return userOk && passOk;                         // both evaluated, no short-circuit
}
  • Header: Authorization: Basic base64(username:password). The scheme is case-insensitive. Accept only the strict base64 alphabet and decode strictly (validate=True in Python) so valid credentials followed by junk are rejected.
  • Compare the username and the password each in constant time (Node: SHA-256 digests or equal-length Buffers with crypto.timingSafeEqual; Python: hmac.compare_digest on bytes, never str, which raises on non-ASCII) and evaluate both before deciding.
  • Missing or malformed header, or a mismatch: 401. A body that isn't a JSON object (or array of objects): 400. Handled: 200.
  • The credentials must arrive on the first request. The Halo docs don't say whether Basic credentials are sent preemptively.
  • A static shared credential authenticates the sender, not the body, and gives no replay protection (no signature, no timestamp). Use HTTPS and rotate the credential if it leaks.
  • Read the body raw (express.raw({ type: '*/*' }), so any content type works) and authenticate before parsing it.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Event Types

Halo webhooks fire on the same events as Halo notification profiles. You pick at least one event per webhook, and can put conditions on them.

Event Sent When
New Ticket Logged A ticket is created
Ticket Reassigned A ticket is reassigned
Document deleted on a Ticket An attachment is deleted from a ticket (v2.242+)
Document edited on a Ticket An attachment is edited on a ticket (v2.242+)

Every payload carries an ID, notification ID, escmsg ID, event name, webhook ID, object ID and timestamp. The docs don't name those JSON properties in text, or say whether the event-name property carries the display names above exactly, so the example payloads and switch cases here are illustrative: inspect a real delivery. With batching on, the body is a JSON array of objects instead of one object. The Method setting also offers GET (for retrieving data), but notifications are POSTs.

Environment Variables

HALO_PSA_WEBHOOK_USERNAME=halo-webhook                   # entered on the Halo webhook
HALO_PSA_WEBHOOK_PASSWORD=replace-with-a-long-random-password

Local Development

Halo can't reach localhost. Tunnel with the Hookdeck CLI (no account required):

npx hookdeck-cli listen 3000 halo-psa --path /webhooks/halo-psa

Use the printed URL as the webhook's Payload URL in Halo. Hookdeck's source type is HALO_PSA, labelled "HaloPSA".

Resources

Attribution

When using this skill, add this comment at t

Полный SKILL.md на GitHub

Установить halo-psa-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/halo-psa/route.tsexamples/nextjs/lib/verify-halo-psa.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл halo-psa-webhooks?

Receive and authenticate HaloPSA (also HaloITSM and HaloCRM) webhooks. Use when setting up a Halo webhook endpoint, checking the Basic Authentication header, debugging 401s, or handling notification events like New Ticket Logged and Ticket Reassigned.

Как установить скилл halo-psa-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл halo-psa-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить halo-psa-webhooks с