Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestReply: Add CESQL function #8318

Open
Cali0707 opened this issue Nov 10, 2024 · 2 comments · May be fixed by #8360
Open

RequestReply: Add CESQL function #8318

Cali0707 opened this issue Nov 10, 2024 · 2 comments · May be fixed by #8360
Assignees
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)

Comments

@Cali0707
Copy link
Member

Problem
For the RequestReply resource, we need to create a CESQL function KN_VERIFY_CORRELATIONID(correlationid, secretName1, secretName2, ...) which verifies that the correlation id being used is valid. To do this, the correlation id is formatted as follows:

<original id>:<original id signed with a secret key>

The CESQL function should sign the original id and see if it matches the original id signed with a secret key referenced in the correlation id.

CESQL can be extended with new functions as follows: https://github.com/cloudevents/sdk-go/blob/24f83eb0a86d9cd7f4f28759f823fa77f58b0910/sql/v2/runtime/test/user_defined_functions_test.go#L33-L57

The function should:

  1. Get the secret
  2. Split the correlation id
  3. Sign the original id
  4. Return true iff the signed id matches the second half of the split correlation id

Persona:
Which persona is this feature for?

Exit Criteria
Unit tests of CESQL expressions that pass/fail

Time Estimate (optional):
How many developer-days do you think this may take to resolve? 1-2

Additional context (optional)
Add any other context about the feature request here.

@d3akhtar
Copy link

/assign

@Cali0707
Copy link
Member Author

/triage accepted

@knative-prow knative-prow bot added the triage/accepted Issues which should be fixed (post-triage) label Nov 21, 2024
d3akhtar added a commit to d3akhtar/eventing that referenced this issue Nov 30, 2024
d3akhtar added a commit to d3akhtar/eventing that referenced this issue Dec 1, 2024
@d3akhtar d3akhtar linked a pull request Dec 1, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request triage/accepted Issues which should be fixed (post-triage)
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants