
Security News
Node.js Homepage Adds Paid Support Link, Prompting Contributor Pushback
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
This package provides encryption for the Inngest Python SDK.
Setting encryption middleware on the client will turn on encryption for events and steps in all functions:
import inngest
from inngest_encryption import EncryptionMiddleware
inngest.Inngest(
name="my-app",
encryption_key="my-encryption-key",
middleware=[EncryptionMiddleware.factory("my-secret-key")],
)
When sending events or invoking functions, only the encrypted
field will be encrypted:
await step.send_event(
"my-step",
inngest.Event(
data={
# Everything in this field will be encrypted.
"encrypted": {
"phone": "867-5309",
},
# Not encrypted.
"user_id": "abc123",
},
name="my-event",
),
)
await step.invoke(
"invoke",
function=child_fn_async,
data={
# Everything in this field will be encrypted.
"encrypted": {
"phone": "867-5309",
},
# Not encrypted.
"user_id": "abc123",
},
)
[!NOTE]
Only a portion of the event data is encrypted because that allows for control flow settings (e.g. concurrency key) to work. Since the Inngest server receives encrypted data, it can't perform control flow on values that are encrypted.
The entire step.run
output is encrypted:
def _my_step() -> dict[str, object]:
# Encrypted when sending back to the Inngest server.
return {"msg": "hello"}
output = await step.run("my-step", _my_step)
# Decrypted within this function.
print(output)
When rotating the encryption key, you may still have active functions runs whose data is encrypted with the old key. To decrypt these, you can use the fallback_decryption_keys
option:
inngest.Inngest(
name="my-app",
encryption_key="my-encryption-key",
middleware=[
EncryptionMiddleware.factory(
"new-secret-key",
fallback_decryption_keys=["old-secret-key"],
),
],
)
If decryption fails with the new key, the encryption middleware will fall back to the old key.
FAQs
Encryption for the Inngest SDK
We found that inngest-encryption demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.
Research
Security News
The Socket Research Team investigates a malicious Python typosquat of a popular password library that forces Windows shutdowns when input is incorrect.