Contents

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
  • ed25519 supports hex_raw_32 and hex_spki_der
  • rsa and ecdsa support pem_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 rsa and ecdsa
  • ECDSA pairings in v1:
    • sha256 -> P-256 keys with DER signatures
    • sha384 -> P-384 keys with DER signatures
    • sha512 -> 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:

  • payload and signature are required strings
  • timestamp is optional unless message_mode or freshness checking requires it
  • payload must 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 -> valid gets the input, invalid is null
  • Invalid signature -> invalid gets the input, valid is null

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 Signature does not inspect webhook headers or request envelopes.
    • Fix: Prepare { payload, signature, timestamp } upstream.
  • Expecting malformed input to route to invalid

    • Problem: Missing fields, bad encodings, and malformed keys are runtime errors.
    • Fix: Reserve invalid for cryptographically invalid signatures only.

Tips#

  • Keep this node focused: extract request data upstream, verify here, branch downstream.
  • For webhook flows, use the exact raw_body from Webhook Trigger as payload when that is what the provider signs.
  • Use js_script only when you need custom cryptographic behavior beyond this node's supported algorithms and message modes.

Inputs

  • inputRequired

Outputs

  • valid
  • invalid

Configuration

FieldTypeRequiredDescription
algorithmenum(ed25519, rsa, ecdsa)NoPublic-key algorithm used to verify the signature
public_keytextYesVerification public key in the configured format
public_key_formatenum(hex_raw_32, hex_spki_der, pem_spki)NoHow to interpret public_key for the selected algorithm
message_modeenum(payload, timestamp_plus_payload)NoWhether to verify payload alone or timestamp + payload
signature_encodingenum(hex, base64)NoEncoding used by the incoming signature string
hash_algorithmenum(sha256, sha384, sha512)NoRequired for RSA and ECDSA. For ECDSA, v1 supports sha256/P-256, sha384/P-384, and sha512/P-521. Ignored for Ed25519.
verify_timestamp_freshnessbooleanNoReject stale timestamps before cryptographic verification
timestamp_max_age_secondsintegerNoMaximum allowed timestamp age when freshness verification is enabled
base_configrecordNoShared 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).