Skip to content

Expose secrets from executor to function context #3

@jmarbutt

Description

@jmarbutt

Problem

Secrets sent by the Inngest executor in CallRequestPayload.Secrets are parsed but never exposed to functions. The SDK has a _secrets dictionary that's only populated via RegisterSecret(), but secrets from the executor are ignored.

Location: Inngest/InngestClient.cs:1110-1201 (HandleCallRequest)

The payload.Secrets field is never read or passed to InngestContext.

Expected Behavior

Functions should be able to access secrets via context.GetSecret("key") or similar API, where secrets are sourced from:

  1. The executor's CallRequestPayload.Secrets
  2. Locally registered secrets via RegisterSecret()

SDK Spec Reference

This blocks the SDK_SPEC "secrets" capability.

Suggested Implementation

  1. Add a Secrets property to InngestContext
  2. Merge payload.Secrets with locally registered secrets when building context
  3. Provide a GetSecret(string key) method

Priority

Medium - required for full SDK spec compliance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions