Command Palette

Search for a command to run...

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

rubrik-webhooks

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

Receive and authenticate Rubrik Security Cloud (RSC) webhooks. Use when setting up Rubrik webhook handlers, authenticating Rubrik webhooks with a custom…

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

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

Rubrik Webhooks

When to Use This Skill

  • How do I receive Rubrik Security Cloud webhooks?
  • How do I verify / authenticate Rubrik webhooks? (there is no signature to verify)
  • How do I handle Rubrik backup failure and backup success events?
  • How do I parse the Rubrik PD-CEF payload (summary, class, custom_details)?
  • How do I alert on Rubrik Anomaly (ransomware) events?
  • Why did Rubrik auto-disable my webhook?

Critical: Rubrik Webhooks Are Not Signed

There is no HMAC, no signature header and no signing secret. Any code that runs createHmac / hmac.new over a Rubrik webhook body is wrong. Instead, each webhook carries a credential chosen with authInfo.authType (AuthenticationTypeV2):

authType What Rubrik sends Use it?
CUSTOM_HEADER <headerKey>: <headerValue> (you choose both) Recommended
BEARER A bearer token, presumably Authorization: Bearer <token> (Rubrik's docs don't show the header) Yes
BASIC A username/password pair, presumably Authorization: Basic base64(username:password) (not shown either) Yes
OAUTH2 Bearer token Rubrik mints from your IdP (client credentials) Needs JWT validation; not covered
URL Token embedded in the webhook URL Avoid: URLs end up in logs

Your handler must fail closed: if no credential is configured, reject every request.

Authentication (core)

Compare the configured header against your secret in constant time. Hashing both sides first means timingSafeEqual never throws on a length mismatch:

const crypto = require('crypto');

const secureEquals = (a, b) => crypto.timingSafeEqual(
  crypto.createHash('sha256').update(String(a), 'utf8').digest(),
  crypto.createHash('sha256').update(String(b), 'utf8').digest()
);

// CUSTOM_HEADER: header name and value are whatever you set in Rubrik.
function verifyRubrikHeader(headers) {
  const name = (process.env.RUBRIK_WEBHOOK_HEADER_NAME || 'X-Rubrik-Webhook-Token').toLowerCase();
  const secret = process.env.RUBRIK_WEBHOOK_SECRET;
  const value = headers[name]; // Node lowercases incoming header names
  if (!secret || typeof value !== 'string') return false; // fail closed
  return secureEquals(value, secret);
}
// BEARER: same compare on the value after "Bearer " in the Authorization header.

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

The examples accept CUSTOM_HEADER, BEARER and BASIC (whichever you configure) and return 401 otherwise. There is no Rubrik SDK helper for receiving webhooks: the Rubrik SDKs (PowerShell, Python, Go) call the RSC GraphQL API and don't authenticate incoming requests. See references/verification.md.

Payload: PD-CEF by Default, Templated Otherwise

The default payload is PagerDuty Common Event Format (PD-CEF). The event details sit under custom_details:

{
  "summary": "Failed backup of vSphere VM 'sh1-EncryptMe-05-Group1'.",
  "source": "Rubrik Security Cloud",
  "severity": "critical",
  "timestamp": "2024-07-18T06:39:40.46Z",
  "class": "Backup",
  "custom_details": {
    "id": "c2b47274-6323-4025-b307-afed1cfb7574",
    "type": "Event",
    "objectName": "sh1-EncryptMe-05-Group1",
    "objectType": "VmwareVm",
    "status": "Failure",
    "eventName": "Snapshot.BackupFailed",
    "clusterName": "sh1-PaloAlto"
  }
}

Custom JSON templates (Go-template variables such as {{.Status}}, {{.ObjectName}}, {{.UUID}}) can produce any shape, so the examples read custom_details when present and fall back to top-level fields.

Common Event Types

There is no single event.type string. Route on class and status:

Field Values (from Rubrik's docs) Use
custom_details.status Final: Success, Failure, PartialSuccess, Canceled. In progress: Running, Queued, Canceling, TaskSuccess, TaskFailure, Info, Warning Act only on final outcomes
class Backup in Rubrik's example. ActivityTypeEnum spells the rest (Anomaly, Recovery, LOG_BACKUP, ...), but no webhook example confirms them Which kind of activity
custom_details.type Event (audit webhooks carry audit fields instead) Event vs audit
severity critical, warning or info Decide what needs attention: a critical ransomware detection arrives with status Success
custom_details.eventName e.g. Snapshot.BackupFailed Fine-grained, treat as opaque

Subscriptions filter on EventType enum values (BACKUP, ANOMALY, RECOVERY, ...) and EventSeverity (SEVERITY_CRITICAL, SEVERITY_WARNING, SEVERITY_INFO). Full list in references/overview.md.

Environment Variables

# CUSTOM_HEADER (recommended) — the header key/value you entered in Rubrik
R
Полный SKILL.md на GitHub

Установить rubrik-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/rubrik/route.tsexamples/nextjs/lib/rubrik-auth.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

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

Receive and authenticate Rubrik Security Cloud (RSC) webhooks. Use when setting up Rubrik webhook handlers, authenticating Rubrik webhooks with a custom header, Bearer token or Basic auth (Rubrik webhooks are NOT signed — no HMAC, no signature header), parsing the default PagerDuty Common Event Format (PD-CEF) payload or a custom JSON template, or handling backup Failure/Success, Anomaly (ransomware) and audit events.

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

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

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

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

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

Сравнить rubrik-webhooks с