Skip to main content
Home

Built and signed on GitHub Actions

E2E encryption middleware for Inngest.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
94%
Published
3 months ago (1.0.2)
interface EncryptionMiddlewareOptions

Options used to configure the encryption middleware.

Properties

The key used to encrypt and decrypt data. If you are rotating keys, you can add fallbackDecryptionKeys to allow the middleware to decrypt data with multiple keys.

This key will always be used to encrypt.

If you are rotating keys, you can add fallbackDecryptionKeys to allow the middleware to decrypt data with multiple keys.

None of these keys will be used for encryption.

Puts the encryption middleware into a mode where it only decrypts data and does not encrypt it.

This is useful for adding the middleware to many services (or the same service with rolling deploys) before enabling encryption, so that all services are ready to decrypt data when it is encrypted.

It can also be used to slowly phase out E2E encryption so that it can be safely removed from services once no more data from current runs is encrypted.

The encryption service used to encrypt and decrypt data. If not provided, a default encryption service will be used.

The name of the top-level field of the event that will be encrypted.

By default, the top-level field named "encrypted" will be encrypted.

optional
legacyV0Service: Omit<LEGACY_V0Service.Options, "key">

If set and enabled is `true, the encryption middleware will only encrypt using the legacy V0 AES encryption service. This is useful for transitioning all services to using the new encryption service before then removing the flag and moving all encryption to LibSodium.

If you used a custom encryptionService beforehand, continue using that.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";
or

Import directly with a jsr specifier

import { type EncryptionMiddlewareOptions } from "jsr:@inngest/middleware-encryption";

Add Package

pnpm i jsr:@inngest/middleware-encryption
or (using pnpm 10.8 or older)
pnpm dlx jsr add @inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";

Add Package

yarn add jsr:@inngest/middleware-encryption
or (using Yarn 4.8 or older)
yarn dlx jsr add @inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";

Add Package

vlt install jsr:@inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";

Add Package

npx jsr add @inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";

Add Package

bunx jsr add @inngest/middleware-encryption

Import symbol

import { type EncryptionMiddlewareOptions } from "@inngest/middleware-encryption";