Skip to content

Add context.Context to callback.Validator interface#10139

Closed
fretz12 wants to merge 1 commit into
temporalio:mainfrom
fretz12:fredtzeng/cb-validator-ctx
Closed

Add context.Context to callback.Validator interface#10139
fretz12 wants to merge 1 commit into
temporalio:mainfrom
fretz12:fredtzeng/cb-validator-ctx

Conversation

@fretz12

@fretz12 fretz12 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

What changed?

Added context.Context as the first parameter to the callback.Validator interface and threaded it through all call
sites (WorkflowHandler, activity.FrontendHandler, and their internal validation/preparation methods). The base validator ignores the context. No behavioral change.

Why?

Deployments that decorate the validator (via fx.Decorate) need access to the gRPC context to check caller identity — e.g. to allow internal callers (scheduler) to attach temporal://internal callbacks while rejecting them from external users.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

@fretz12 fretz12 requested review from a team as code owners April 30, 2026 23:11
Thread context through to callback validation so that deployments can check caller identity when validating callbacks. The base validator does not use the context.
@fretz12 fretz12 force-pushed the fredtzeng/cb-validator-ctx branch from 42324d3 to bbf11a4 Compare April 30, 2026 23:49
@fretz12 fretz12 closed this Apr 30, 2026
@fretz12 fretz12 deleted the fredtzeng/cb-validator-ctx branch April 30, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant