Repository navigation
Webhook Providers and Plugins
Kera works for any HTTP or webhook traffic. Provider detection is a convenience layer that adds
a label such as stripe or github, plus an advisory event type. It never gates capture,
forwarding, replay, or inspection.
Provider labels are debugging aids, not authentication. A request with
stripe-signatureis labeledstripewhether or not the signature is valid. Kera forwards and stores original bytes and does not verify or regenerate signatures.
Every request sent to the Kera listener is handled the same way:
- Check for
x-kera-hop; reject loops with508. - Capture method, path, raw query, lowercase multi-value headers, and raw body bytes.
- Forward to the configured target.
- Capture response status, headers, body, and timing.
- Persist the exchange in SQLite.
- Derive an optional provider label and event type from the request.
- Return the upstream response unchanged.
Provider detection therefore adds metadata; it does not change proxy behavior. Unrecognized
traffic still appears in list_requests with provider: null and eventType: null.
The registry is tried in table order; the first match wins.
provider |
Match in normalized request headers | eventType |
|---|---|---|
stripe |
stripe-signature |
JSON type, e.g. invoice.payment_failed
|
github |
x-github-event |
Event header plus JSON action if present, e.g. pull_request.opened; otherwise header alone |
shopify |
x-shopify-topic |
Topic header, e.g. orders/create
|
svix |
svix-id, svix-timestamp, and svix-signature
|
JSON type when supplied, e.g. user.created for a Clerk event delivered by Svix |
twilio |
x-twilio-signature |
null; callback types vary by Twilio product |
paystack |
x-paystack-signature |
JSON event, e.g. charge.success
|
paddle |
paddle-signature |
JSON event_type, e.g. transaction.completed
|
lemonsqueezy |
x-signature and a usable x-event-name
|
Event header, e.g. order_created
|
Signature headers recognized for warning purposes:
| Provider | Signature header(s) |
|---|---|
| Stripe | stripe-signature |
| GitHub |
x-hub-signature-256, legacy x-hub-signature
|
| Shopify | x-shopify-hmac-sha256 |
| Svix | svix-signature |
| Twilio | x-twilio-signature |
| Paystack | x-paystack-signature |
| Paddle | paddle-signature |
| Lemon Squeezy | x-signature |
- Matches the presence of
stripe-signature. - Reads the top-level JSON
typefor the event label. - Example:
"type": "invoice.payment_failed"→eventType: "invoice.payment_failed". - A malformed, incomplete, or non-UTF-8 body falls back to a provider match with no event label.
- Use
list_requestswith{"provider":"stripe"}to filter.
- Matches the presence of
x-github-event. - Uses the event header as the base label.
- If the body contains a valid top-level JSON
action, appends it:pull_request+opened→pull_request.opened. - Repeated event headers are not used as labels.
- GitHub signed deliveries are recognized through
x-hub-signature-256or legacyx-hub-signature.
These are already built in. Use them as reference implementations when adding a provider.
-
Shopify: topic header must match
^[a-z0-9_]{1,63}/[a-z0-9_]{1,63}$. -
Svix / Clerk: requires all three Svix headers. Clerk events delivered by Svix are labeled
svix, notclerk. The event type comes from JSONtype. - Twilio: signature header only; no generic event type because callback shapes vary.
-
Paystack: JSON
event. -
Paddle: JSON
event_type. -
Lemon Squeezy: requires both
x-signatureand a usablex-event-name; the event header is the label.
- Headers passed to detection are lowercase and may contain multiple values.
- Body metadata is read only when the body is:
- complete (not capture-truncated),
- at most 1 MiB,
- UTF-8 JSON,
- not content-encoded (other than
identity).
- Event labels must be bounded strings. Invalid labels fall back to header metadata only.
- Repeated event headers are not used as event labels.
- A matched provider is still stored if its event label is unavailable.
- Existing captures are not relabeled when a provider is added.
- Filter values in
list_requestsare exact, lowercase provider names. - Captured signature headers are masked by default in inspection output.
Kera does not re-sign payloads.
When replaying a captured request:
- Omit
override_bodyto replay complete original bytes. - A capture with a truncated/incomplete body requires an override.
- If the original was recognized as signed and the replay changes, removes, or replaces an incomplete body, the result includes:
{
"warnings": [
{
"code": "SIGNATURE_MAY_BE_INVALID",
"message": "Kera did not re-sign the modified webhook body. Upstream signature verification may fail."
}
]
}Warnings are based on the original capture's headers. Even unchanged bytes may fail verification if the provider checks timestamps or the original delivery URL.
Current interface in packages/core/src/providers/provider.ts:
import type { HeaderMap } from '../capture/types.js';
export interface WebhookProvider {
readonly name: string;
readonly signatureHeaders?: readonly string[];
detect(headers: HeaderMap, body?: Uint8Array): { matched: boolean; eventType?: string };
}- Receives lowercase, multi-value headers and optional captured bytes.
- Returns
{ matched: false }for unrelated requests. - Returns
{ matched: true, eventType? }for a match. - Keep labels bounded and handle absent/malformed bodies without throwing.
- Use
singleHeader()for headers that must have exactly one value. - Use
readEventField()andisEventLabel()for safe JSON event extraction.
Declare lowercase signature header names so Kera can:
- mark the provider as signed for replay warnings,
- ensure centralized redaction masks those headers.
There is no resign() method in the current interface. Kera never regenerates provider
signatures. A future cryptographic re-signing design would require verified official provider test
vectors and explicit security review; it is not part of Milestone 7 and has no scheduled date. Do
not build integrations that assume Kera will re-sign a modified webhook.
The workflow is intentionally small. All eight built-in providers use it.
Create packages/core/src/providers/<name>.ts. Prefer the shared signedProvider() helper when detection is
just a signature header plus one JSON field.
// packages/core/src/providers/example.ts
import { signedProvider } from './provider.js';
export const example = signedProvider(
'example',
'x-example-signature',
'event_type',
);For custom logic:
import {
isEventLabel,
readEventField,
singleHeader,
type WebhookProvider,
} from './provider.js';
const eventHeader = 'x-example-event';
export const example: WebhookProvider = {
name: 'example',
signatureHeaders: ['x-example-signature'],
detect(headers, body) {
if (!Object.hasOwn(headers, eventHeader)) return { matched: false };
const event = singleHeader(headers, eventHeader);
if (!isEventLabel(event)) return { matched: true };
const action = readEventField(body, 'action');
return {
matched: true,
eventType: action === undefined ? event : `${event}.${action}`,
};
},
};If the provider has signature headers, confirm they are masked by
packages/core/src/redaction/redact.ts. Header names containing signature, token, secret, key, or
password are already masked, and known credential headers are explicitly listed. Add the header
to the explicit set if it does not match those patterns.
Add the import and instance to packages/core/src/providers/registry.ts in the desired precedence order.
First match wins, so place specific providers before broad ones.
const builtInProviders: readonly WebhookProvider[] = [
stripe,
github,
shopify,
svix,
twilio,
paystack,
paddle,
lemonsqueezy,
example,
];Use synthetic payloads and non-authenticating signature placeholders. Never commit real webhook secrets, customer payloads, or valid signatures.
Cover:
- header match and non-match,
- event label extraction,
- missing, malformed, incomplete, and oversized bodies,
- repeated headers,
- precedence when another provider also matches,
- redaction of the signature header,
-
list_requestsfiltering by the new provider name.
- Add the provider to the table in this page.
- Update any provider counts in
README.md/docs/PROVIDERS.md. - Add a changeset with
pnpm changeset.
pnpm run checkProvider work is a behavior change: tests and docs are required.
The Claude Code plugin is packaging, not a webhook provider. It bundles the MCP server definition and the webhook debugging skill. It does not change provider detection, redaction, or replay behavior.
- Install:
/plugin install kera --marketplace mcdavidobioha/kera - Skill:
/kera:webhook-debugging - Setup details: Quickstart and MCP Setup
Provider plugins in this wiki mean registry modules under packages/core/src/providers/. They are
in-process, typed, and tested; there is no third-party dynamic plugin loader in Milestone 7.
-
MCP Tools Reference — filtering with
providerand inspecting signed requests. - Security and Privacy — signature redaction and replay warnings.
- Architecture and Contributing — module boundaries and test strategy.
- MCP Tools Reference
- Webhook Providers and Plugins
- Security and Privacy
- Privacy and Data Handling
- Architecture and Contributing
- Roadmap
- GitHub repository
- Issues
- Releases
- npm:
kera-mcp·kera-terminal - Glama listing
-
Official MCP Registry (
io.github.mcdavidobioha/kera) - Contributing guide
- Security policy