Skip to content

Add option to disable unauthed PUT requests - #1506

Merged
amh4r merged 4 commits into
mainfrom
unauthed-put-opt-out
May 14, 2026
Merged

Add option to disable unauthed PUT requests#1506
amh4r merged 4 commits into
mainfrom
unauthed-put-opt-out

Conversation

@amh4r

@amh4r amh4r commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Add an opt-out for unauthed PUT requests. This is via an env var or serve option.

Note that unauthed PUT requests are not a critical security issue. They merely tell the SDK to sync itself, but the SDK does not return sensitive info to the caller. Instead, the SDK sends an outgoing request to the Inngest API.

Checklist

  • Added unit/integration tests
  • Added changesets if applicable

Note

Adds an opt-out for unauthenticated PUT (sync) requests via a new enableUnauthedSync serve option and INNGEST_ENABLE_UNAUTHED_SYNC env var. When disabled in cloud mode, every PUT must carry a valid signature. Also refactors all 401 responses to share a single unauthorizedResponse constant and adds method to all signature-failure log entries.

Written by Mendral for commit ffabd56.

@amh4r
amh4r requested review from Linell and jpwilliams April 30, 2026 14:28
@changeset-bot

changeset-bot Bot commented Apr 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: cebcd6c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
inngest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@inngest-release-bot inngest-release-bot added the 📦 inngest Affects the `inngest` package label Apr 30, 2026

@mendral-app mendral-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs attention — 1 issue in 1 file

The new unauthorizedResponse constant silently changes the in-band PUT signature-failure body from { code: "sig_verification_failed" } to { message: "Unauthorized" }. Any caller (Inngest backend, third-party integration) that pattern-matches on code will break. Everything else — parseAsBoolean handling, cloud-mode guard, as const safety — is correct.

Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.

<assessment>
The new `unauthorizedResponse` constant silently changes the in-band PUT signature-failure body from `{ code: "sig_verification_failed" }` to `{ message: "Unauthorized" }`. Any caller (Inngest backend, third-party integration) that pattern-matches on `code` will break. Everything else — `parseAsBoolean` handling, cloud-mode guard, `as const` safety — is correct.
</assessment>

<file name="packages/inngest/src/components/InngestCommHandler.ts">
<issue location="packages/inngest/src/components/InngestCommHandler.ts:2059">
The in-band PUT signature failure previously returned `{ code: "sig_verification_failed" }` but now returns `{ message: "Unauthorized" }` via the shared constant. Any caller that distinguishes this error by `code` will silently break.
</issue>
</file>

Tag @mendral-app with feedback or questions. View session

Comment thread packages/inngest/src/components/InngestCommHandler.ts

@mendral-app mendral-app Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Previous comment about the in-band { code: "sig_verification_failed" } shape was addressed — the PR author confirmed the shape change is intentional (accepted). No new issues found. CI failures are pre-existing: middleware-validation: Test is a known Jest/ESM incompatibility (insight); Test examples (framework-nextjs-app-router) failed due to a transient npm ECONNRESET network error, not this PR.

Tag @mendral-app with feedback or questions. View session

@amh4r
amh4r merged commit 342a736 into main May 14, 2026
46 checks passed
@amh4r
amh4r deleted the unauthed-put-opt-out branch May 14, 2026 14:06
jacobheric pushed a commit that referenced this pull request May 28, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## inngest@4.5.0

### Minor Changes

- [#1522](#1522)
[`ebeb4516`](ebeb451)
Thanks [@Linell](https://github.com/Linell)! - Bump minimum
`@opentelemetry/auto-instrumentations-node` to `0.75.0` to address

[GHSA-q7rr-3cgh-j5r3](GHSA-q7rr-3cgh-j5r3)
in the
transitive `@opentelemetry/sdk-node` /
`@opentelemetry/exporter-prometheus` packages.

Note that upstream `auto-instrumentations-node@0.72.0` dropped bundled
Fastify,
instrumentation, so if you relied on it for tracing your Fastify routes,
add
    `@opentelemetry/instrumentation-fastify` directly.

### Patch Changes

- [#1540](#1540)
[`10dad398`](10dad39)
Thanks [@amh4r](https://github.com/amh4r)! - Fix attempt count not
resetting during checkpointing

- [#1544](#1544)
[`f1ee6f34`](f1ee6f3)
Thanks [@jacobheric](https://github.com/jacobheric)! - Allow
`useRealtime` to accept direct client subscription tokens from
`getClientSubscriptionToken()` when `channel` and `topics` are provided
as hook options, and avoid reconnecting solely because an inline token
factory or token object gets a new render identity.

- [#1506](#1506)
[`342a7369`](342a736)
Thanks [@amh4r](https://github.com/amh4r)! - Add option to disable
unauthed PUT requests

- [#1518](#1518)
[`fd71a95b`](fd71a95)
Thanks [@Linell](https://github.com/Linell)! - Fix RetryAfterError not
respected

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 inngest Affects the `inngest` package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants