Skip to content

chore: Wire up or remove unused WEBHOOK_SIGNING_SECRET env var #148

Description

@dotunv

Overview

Wire up or remove the WEBHOOK_SIGNING_SECRET environment variable, which is documented in .env.example and README but reads nothing in the codebase.

Motivation

Per ASSUMPTIONS.md item 4, WEBHOOK_SIGNING_SECRET "is read by nothing in the codebase" — it's documented but unused. This causes confusion: operators may set a secret expecting webhook signatures to be validated, when in fact there is no signing component at all. This is a documentation/hygiene gap that could lead to a false sense of security.

Proposed Design

Two options:

Option A (preferred): Wire it up. Implement webhook signing so the secret is actually used:

  1. Add a signature header (X-Savitura-Signature) to outbound webhooks using HMAC-SHA256 of the body with WEBHOOK_SIGNING_SECRET
  2. Add a GET endpoint to introspect whether signing is enabled
  3. Document how consumers can verify signatures

Option B: Remove it. If signing is out of scope:

  1. Remove WEBHOOK_SIGNING_SECRET from .env.example
  2. Remove from README/env table
  3. Remove from ASSUMPTIONS.md item 4
  4. Add a note that webhook signing is not yet implemented

Acceptance Criteria

For Option A:

  • Outbound webhooks include X-Savitura-Signature header using HMAC-SHA256
  • Verification utility exists with tests
  • Signature uses body bytes with canonical timestamp to prevent replay
  • Documentation updated with verification instructions

For Option B:

  • WEBHOOK_SIGNING_SECRET removed from .env.example
  • Removed from README env table
  • ASSUMPTIONS.md item 4 updated to note signing is not implemented
  • No references remain in the codebase

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackendBackend / API workdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions