eventing icon indicating copy to clipboard operation
eventing copied to clipboard

feat: add package to set and verify correlation/reply ids for RequestReply

Open Cali0707 opened this issue 6 months ago • 3 comments

For the RequestReply resource to securely figure out that a new event is a reply to an earlier event it saw, it needs to encrypt the event id and set that in a correlation id attribute. For the reply event, that correlation id attribute will have been copied into the reply id attribute.

This PR adds helper functions to set and verify these IDs, to be consumed in various places later as the RequestReply implementation continues.

Proposed Changes

  • Add function to set correlation id
  • Add function to verify that a reply id is from this RequestReply resource

Cali0707 avatar Jun 20 '25 19:06 Cali0707

/cc @matzew @dsimansk

Cali0707 avatar Jun 20 '25 19:06 Cali0707

Codecov Report

Attention: Patch coverage is 58.62069% with 24 lines in your changes missing coverage. Please review.

Project coverage is 52.29%. Comparing base (d56ee68) to head (ab4e829). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/requestreply/correlation_id.go 58.62% 16 Missing and 8 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8606      +/-   ##
==========================================
+ Coverage   52.28%   52.29%   +0.01%     
==========================================
  Files         397      398       +1     
  Lines       24978    25036      +58     
==========================================
+ Hits        13059    13093      +34     
- Misses      11127    11143      +16     
- Partials      792      800       +8     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 20 '25 19:06 codecov[bot]

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707, matzew

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [Cali0707,matzew]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

knative-prow[bot] avatar Jun 23 '25 13:06 knative-prow[bot]