Skip to content

feat(HTTPReceiver): add invalidRequestSignatureHandler callback#2827

Open
mvanhorn wants to merge 1 commit intoslackapi:mainfrom
mvanhorn:osc/2156-invalid-sig-handler
Open

feat(HTTPReceiver): add invalidRequestSignatureHandler callback#2827
mvanhorn wants to merge 1 commit intoslackapi:mainfrom
mvanhorn:osc/2156-invalid-sig-handler

Conversation

@mvanhorn
Copy link
Copy Markdown

Adds invalidRequestSignatureHandler to HTTPReceiver.

Why this matters

PR #2154 added this callback to AwsLambdaReceiver. HTTPReceiver was missing it. Now HTTP apps can hook into signature verification failures too.

Changes

  • HTTPReceiver.ts: New HTTPReceiverInvalidRequestSignatureHandlerArgs interface. New option in HTTPReceiverOptions. Constructor wiring with noop default. Fires in the signature-verification catch block with rawBody, signature header, and timestamp.

ExpressReceiver support can follow in a separate PR.

Testing

Codex ran npm test against the change. All existing tests pass.

Refs #2156

This contribution was developed with AI assistance (Claude Code).

Adds an optional invalidRequestSignatureHandler to HTTPReceiver,
matching the callback added to AwsLambdaReceiver in PR slackapi#2154.
When signature verification fails, the handler fires with the
raw body, signature header, and timestamp. Defaults to a noop.

Refs slackapi#2156
@mvanhorn mvanhorn requested a review from a team as a code owner March 24, 2026 08:24
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality semver:minor labels Mar 30, 2026
@mwbrooks
Copy link
Copy Markdown
Member

Hey @mvanhorn 👋🏻 This sounds like a reasonable enhancement and thank you the explaining the motivation related to the AwsLambdaReceiver.

I'll add a few maintainers to review this PR 👏🏻

In the meantime, can you please add tests for the new changes? I imagine that'll be one of the first requests from the reviewers as well. 🙇🏻

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

Labels

cla:signed enhancement M-T: A feature request for new functionality semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants