Verify Signature
verify_signature · Nodes · Control
Verifies a request signature before continuing.
Verify Signature#
Verifies a payload against a signature and routes the original input down valid or invalid.
When to Use#
- Gate a workflow on a valid public-key signature
- Verify Discord interaction payloads without putting crypto logic in
js_script - Verify RSA or ECDSA signed payloads with a configured public key
How It Works#
Verify Signature takes a single input object with payload, signature, and optional timestamp. It verifies that exact payload using the node configuration, then forwards the original input unchanged on either valid or invalid.
The node does not read headers, inspect webhook payload shapes, or extract fields from other objects. Upstream nodes are responsible for preparing { payload, signature, timestamp } before verification.
Configuration#
algorithm - Public-key algorithm to use.
- Values:
ed25519,rsa,ecdsa - Default:
ed25519
public_key - Public key text in the selected format.
- Required: yes
public_key_format - How to parse public_key.
- Values:
hex_raw_32,hex_spki_der,pem_spki - Default:
hex_raw_32 ed25519supportshex_raw_32andhex_spki_derrsaandecdsasupportpem_spki
message_mode - Message bytes to verify.
- Values:
payload,timestamp_plus_payload - Default:
timestamp_plus_payload
signature_encoding - How to decode the incoming signature string.
- Values:
hex,base64 - Default:
hex
hash_algorithm - Hash function for RSA verification, and the supported hash/curve pairing for ECDSA verification.
- Values:
sha256,sha384,sha512 - Required for
rsaandecdsa - ECDSA pairings in v1:
sha256-> P-256 keys with DER signaturessha384-> P-384 keys with DER signaturessha512-> P-521 keys with DER signatures
- Ignored for
ed25519
verify_timestamp_freshness - Reject stale timestamps before signature verification.
- Default:
false
timestamp_max_age_seconds - Max allowed age when freshness checking is enabled.
- Default:
300
Inputs#
input - Object with verification material.
{
"payload": "{\"type\":1}",
"signature": "ce3a...",
"timestamp": "1712345678"
}
Notes:
payloadandsignatureare required stringstimestampis optional unlessmessage_modeor freshness checking requires itpayloadmust be the exact content that was signed
Outputs#
valid - The original input object when verification succeeds.
invalid - The original input object when verification fails.
Inactive branch behavior:
- Valid signature ->
validgets the input,invalidisnull - Invalid signature ->
invalidgets the input,validisnull
Examples#
Discord verification after preparing input#
[Webhook Trigger] -> [Prepare { payload, signature, timestamp }] -> [Verify Signature] -> valid -> [Webhook Response]
Recommended config:
{
"algorithm": "ed25519",
"public_key": "YOUR_DISCORD_PUBLIC_KEY_HEX",
"public_key_format": "hex_raw_32",
"message_mode": "timestamp_plus_payload",
"signature_encoding": "hex"
}
RSA payload verification#
{
"algorithm": "rsa",
"public_key": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----",
"public_key_format": "pem_spki",
"message_mode": "payload",
"signature_encoding": "base64",
"hash_algorithm": "sha256"
}
Runtime Errors#
| Error | Cause | Remediation |
|---|---|---|
VerifySignature input.payload is required |
Input did not include payload. |
Prepare { payload, signature, timestamp } upstream before verification. |
VerifySignature input.signature is required |
Input did not include signature. |
Extract or compute the signature upstream and pass it into the node input. |
invalid hex encoding for signature |
Signature text did not match the configured encoding. | Fix signature_encoding or provide the correctly encoded signature. |
unsupported public key format ... |
Algorithm and key format do not match. | Use hex_raw_32/hex_spki_der for Ed25519 or pem_spki for RSA/ECDSA. |
timestamp is too old ... |
Freshness validation failed. | Disable freshness checking or increase timestamp_max_age_seconds if appropriate. |
Common Mistakes#
Passing parsed JSON instead of the signed payload
- Problem: Parsed data may not match the exact bytes or text that were signed.
- Fix: Pass the exact signed payload string into
payload.
Expecting the node to read headers
- Problem:
Verify Signaturedoes not inspect webhook headers or request envelopes. - Fix: Prepare
{ payload, signature, timestamp }upstream.
- Problem:
Expecting malformed input to route to
invalid- Problem: Missing fields, bad encodings, and malformed keys are runtime errors.
- Fix: Reserve
invalidfor cryptographically invalid signatures only.
Tips#
- Keep this node focused: extract request data upstream, verify here, branch downstream.
- For webhook flows, use the exact
raw_bodyfromWebhook Triggeraspayloadwhen that is what the provider signs. - Use
js_scriptonly when you need custom cryptographic behavior beyond this node's supported algorithms and message modes.
Inputs
inputRequired
Outputs
validinvalid
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
algorithm | enum(ed25519, rsa, ecdsa) | No | Public-key algorithm used to verify the signature |
public_key | text | Yes | Verification public key in the configured format |
public_key_format | enum(hex_raw_32, hex_spki_der, pem_spki) | No | How to interpret public_key for the selected algorithm |
message_mode | enum(payload, timestamp_plus_payload) | No | Whether to verify payload alone or timestamp + payload |
signature_encoding | enum(hex, base64) | No | Encoding used by the incoming signature string |
hash_algorithm | enum(sha256, sha384, sha512) | No | Required for RSA and ECDSA. For ECDSA, v1 supports sha256/P-256, sha384/P-384, and sha512/P-521. Ignored for Ed25519. |
verify_timestamp_freshness | boolean | No | Reject stale timestamps before cryptographic verification |
timestamp_max_age_seconds | integer | No | Maximum allowed timestamp age when freshness verification is enabled |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |