Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
**Webhook Secret**, rather than sending something Hookdeck would reject or
silently drop.

### Changed

- [Getting started](docs/getting-started.md) now says how n8n stores the API
key, and covers the routes other than pasting it into the editor: external
secrets, credential overwrites on self-hosted, and n8n's public API and CLI.
It also says why `$env` is not one of them.

### Fixed

- **AWS SNS** and **ShipStation** sources the trigger creates are now verified.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Three importable workflows are in [`examples/`](examples/), all built and run ag

Webhook payloads are third-party input, and these nodes treat them that way:

- Provider verification happens at the Hookdeck source, using that platform's own scheme, once you supply its signing secret. That secret lives at the Hookdeck source; the trigger sends it there on publish and never checks a signature with it itself.
- Provider verification happens at the Hookdeck source, using that platform's own scheme, once you supply its signing secret. AWS SNS and ShipStation need none, and the node switches theirs on. That secret lives at the Hookdeck source; the trigger sends it there on publish and never checks a signature with it itself.
- Deliveries into n8n carry a second signature, in `x-hookdeck-n8n-signature`, made with a secret the trigger generates on publish. Requests that fail it get `401` and never start the workflow.
- n8n's own webhook URL is hidden on the trigger. Sending a provider there bypasses Hookdeck and silently loses everything above.
- A body that is not valid UTF-8 is rejected with `400`, outside the retryable range, rather than parsed into corrupted text.
Expand Down
30 changes: 28 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,30 @@ project, add a second credential.
A key from an Outpost project will not work here. Outpost is the outbound path,
with its own API; these nodes only speak to the Event Gateway.

### How the key is stored, and routes other than the editor

n8n stores the key in its own database, encrypted with the instance's
`N8N_ENCRYPTION_KEY`, and shows it masked once saved. Pasting it into the
editor is the usual route, but not the only one:

- **External secrets** (Enterprise, self-hosted or Cloud). Set **API Key** to
`{{ $secrets.<vault-name>.<secret> }}` and n8n reads the key from AWS Secrets
Manager, Azure Key Vault, GCP Secrets Manager, HashiCorp Vault, Infisical or
1Password. This is the answer when policy says secrets are not pasted into
UIs.
- **Credential overwrites** (self-hosted). Setting
`CREDENTIALS_OVERWRITE_DATA='{"hookdeckEventGatewayApi":{"apiKey":"<key>"}}'`
fills **API Key** on Hookdeck credentials without storing the key in them.
The editor then hides the field, so every Hookdeck credential created there
uses that key, and so that one project.
- **Scripted provisioning.** n8n's public API and `n8n import:credentials`
create the credential without the editor.

Not `{{ $env.HOOKDECK_API_KEY }}`. n8n 2.x blocks `$env` in expressions
unless `N8N_BLOCK_ENV_ACCESS_IN_NODE=false`, which reopens environment access
to every node and Code step on the instance, and n8n Cloud has no environment to
read. Credential overwrites do the same job without that cost.

## Setting up the trigger

Set a source name, pick the platform sending the events, and activate the
Expand All @@ -56,8 +80,10 @@ configured on the node under **Options**. Every option is listed in the
**Verification only starts when a secret is set.** Choosing a Source Type tells
Hookdeck *which* signature scheme that platform uses; it does not enable
verification on its own. Fill in **Webhook Secret** for platform sources, or
set **Verification** for generic ones. [Security](security.md) explains why this
is easy to miss and how to confirm a source is verifying.
set **Verification** for generic ones. AWS SNS and ShipStation are the
exception: Hookdeck fetches their signing keys itself, so they take no secret,
and the node turns their verification on. [Security](security.md) explains why
this is easy to miss and how to confirm a source is verifying.

### An existing source is adopted, not rewritten

Expand Down
10 changes: 9 additions & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ no signing secret accepts an unsigned, forged payload and delivers it β€” the ed
answers `200` and records `verified: false`.

So fill in **Webhook Secret** for platform sources, or set **Verification** for
generic ones. Two things make this easy to miss:
generic ones.

AWS SNS and ShipStation are the exception. Hookdeck fetches their signing keys
itself, so there is no secret to enter, but their verification is still off
unless the source is created with it on. The node does that whenever **Webhook
Secret** is empty. A source of either type created some other way may not have
it.

Two things make this easy to miss:

- **The status code is not the verdict.** Hookdeck answers `200` at the edge
whether or not a payload verified. The answer is the `verified` field on the
Expand Down
4 changes: 2 additions & 2 deletions docs/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ is covered in [Getting started](getting-started.md).
| Parameter | Description |
| --- | --- |
| Source | The Hookdeck source. **From List** shows every source in the project with its public URL, so you can copy the URL for your provider without leaving the canvas. **By Name** takes a new name β€” letters, numbers, hyphens and underscores β€” and creates the source on publish. |
| Source Type | The platform sending events. This selects *which* signature scheme Hookdeck applies; it does not switch verification on by itself β€” see [Security](security.md#verification-only-starts-when-a-secret-is-set). Use **Webhook (Generic)** to configure verification yourself. Applies when the node creates the source; an existing source keeps its own type. |
| Source Type | The platform sending events. This selects *which* signature scheme Hookdeck applies; it does not switch verification on by itself, except for AWS SNS and ShipStation, which need no secret β€” see [Security](security.md#verification-only-starts-when-a-secret-is-set). Use **Webhook (Generic)** to configure verification yourself. Applies when the node creates the source; an existing source keeps its own type. |
| Verification | For generic sources: HMAC, API Key, Basic Auth, or none. |
| Webhook Secret | For platform sources: the signing secret the platform issued you. Placed in whichever field that platform expects. A few platforms need more than one value β€” those ask you to use Source Config (JSON) instead, and name the fields. |
| Webhook Secret | For platform sources: the signing secret the platform issued you. Placed in whichever field that platform expects. A few platforms need more than one value β€” those ask you to use Source Config (JSON) instead, and name the fields. AWS SNS and ShipStation take none; leave it empty and the node switches their verification on. |
| Acknowledgement Mode | **Async Retry** (default) or **Sync**. See [Acknowledgement modes](#acknowledgement-modes). |

## Options
Expand Down
Loading