Skip to main content

Build

Rubrik Webhooks

HookdeckOfficialCertified

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.

  • New
  • v1.0.2
  • Reviewed Oct 21
  • No reviews yet

Capabilities

  • Critical: Rubrik Webhooks Are Not Signed

    There is no HMAC, no signature header and no signing secret

  • Authentication (core)

    Compare the configured header against your secret in constant time

  • Common Event Types

    There is no single event.type string

  • Local Development

    No account required — the CLI creates a guest account on first run and provides a local tunnel

Getting started

Full instructions

Example command

Local Development

npx hookdeck-cli listen 3000 rubrik --path /webhooks/rubrik

Instructions: SKILL.mdv1.0.2

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:

javascript
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:

json
{
  "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

bash
# CUSTOM_HEADER (recommended) — the header key/value you entered in Rubrik
RUBRIK_WEBHOOK_HEADER_NAME=X-Rubrik-Webhook-Token
RUBRIK_WEBHOOK_SECRET=a-long-random-string

# BEARER — optional
RUBRIK_WEBHOOK_BEARER_TOKEN=

# BASIC — optional
RUBRIK_WEBHOOK_USERNAME=
RUBRIK_WEBHOOK_PASSWORD=

Delivery and Retries

  • Rubrik retries 3 times (backoff 1s, 5s, 10s), then removes the event from the queue.
  • The webhook is auto-disabled after 25 consecutive failures (status AUTO_DISABLED).
  • So: authenticate, enqueue, return 200 quickly. Deduplicate on custom_details.id.

Local Development

For local webhook testing, run the Hookdeck CLI via npx — no install required:

bash
npx hookdeck-cli listen 3000 rubrik --path /webhooks/rubrik

No account required — the CLI creates a guest account on first run and provides a local tunnel
plus a web UI for inspecting requests. Because Rubrik drops events after 3 quick retries,
putting Hookdeck in front of your endpoint also gives you a durable queue and replay.

Resources

  • overview.md - PD-CEF payload, template variables, status/class values, audit events
  • setup.md - Create the webhook in the RSC console or via createWebhookV2
  • verification.md - Custom header, Bearer and Basic auth, gotchas, debugging
  • examples/express/ - Express handler with tests
  • examples/nextjs/ - Next.js App Router handler with tests
  • examples/fastapi/ - FastAPI handler with tests

For production-ready webhook handling, also install the webhook-handler-patterns skill:

  • Handler sequence - Webhook processing flow
  • Idempotency - Prevent duplicate processing
  • Error handling - Graceful error recovery
  • Retry logic - Handle transient failures
  • pagerduty-webhooks - PagerDuty incident webhooks (Rubrik's default payload uses PagerDuty's event format)
  • grafana-webhooks - Grafana alerting webhooks
  • sentry-webhooks - Sentry error and issue webhooks
  • okta-webhooks - Okta event hooks (shared-secret header auth)
  • azure-event-grid-webhooks - Azure Event Grid events
  • sparkpost-webhooks - Another unsigned provider authenticated with Basic/Bearer
  • github-webhooks - GitHub repository webhooks with HMAC-SHA256
  • stripe-webhooks - Stripe payment webhooks with signature verification
  • webhook-handler-patterns - Idempotency, error handling, retry logic
  • hookdeck-event-gateway - Production webhook infrastructure

Explore more skills

Browse all
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed

Reviews (0)

More from Hookdeck

View source →
razorpay-webhooksReceive and verify Razorpay webhooks. Use when setting up Razorpay webhook handlers, debugging X-Razorpay-Signature verification, or handling payment events like payment.captured, payment.failed, order.paid, refund.processed, or…3 installsvercel-log-drains-webhooksReceive and verify Vercel Log Drains deliveries. Use when setting up a Vercel log drain HTTP endpoint, debugging x-vercel-signature verification, passing the drain's endpoint test, or processing batched log entries from sources like…1 installsstripe-webhooksReceive and verify Stripe webhooks. Use when setting up Stripe webhook handlers, debugging signature verification, or handling payment events like payment_intent.succeeded, customer.subscription.created, or invoice.paid.1 installsalchemy-webhooksReceive and verify Alchemy Notify webhooks. Use when setting up Alchemy webhook handlers, debugging X-Alchemy-Signature verification, or handling onchain events like ADDRESS_ACTIVITY, NFT_ACTIVITY, or GRAPHQL (Custom Webhook).1 installstiktok-webhooksReceive and verify TikTok for Developers webhooks (Login Kit, Content Posting, Data Portability). Use when setting up TikTok webhook handlers, debugging TikTok-Signature verification, or handling events like authorization.removed,…1 installsfedex-webhooksReceive and verify FedEx Advanced Integrated Visibility (AIV) shipment tracking webhooks. Use when setting up an AIV webhook or "Try this webhook" in the FedEx Developer Portal, verifying the fdx-signature header (base64 HMAC-SHA256 of the…1 installs

Frequently asked questions about rubrik-webhooks

What does the rubrik-webhooks skill do?

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. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the rubrik-webhooks skill?

Run `npx @skills-hub-ai/cli install hookdeck-rubrik-webhooks` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/hookdeck-rubrik-webhooks/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does rubrik-webhooks work with?

rubrik-webhooks runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the rubrik-webhooks skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use rubrik-webhooks after installing it?

In Claude Code, type `/hookdeck-rubrik-webhooks` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the rubrik-webhooks skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.

Badge for your README

Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.

Install on Skills Hub badge preview
Markdown
[![Install on Skills Hub](https://skills-hub.ai/api/badges/skill/hookdeck-rubrik-webhooks)](https://skills-hub.ai/skills/hookdeck-rubrik-webhooks)
HTML
<a href="https://skills-hub.ai/skills/hookdeck-rubrik-webhooks"><img src="https://skills-hub.ai/api/badges/skill/hookdeck-rubrik-webhooks" alt="Install on Skills Hub"></a>

More options in the badge docs.