-
Notifications
You must be signed in to change notification settings - Fork 420
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
Implement constant-time secret comparisons in CEL. #492
Conversation
/test pull-tekton-triggers-build-tests/ |
/test pull-tekton-triggers-build-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add an example with the secretCompare?
docs/cel_expressions.md
Outdated
The event-listener service account must have access to the secret. | ||
</td> | ||
<td> | ||
<pre>header.canonical('X-Secret-Token').compareSecret('namespace', 'secret-name', 'key')</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the namespace be optional? In other interceptors, if one is not specified, it defaults to the EL's namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented it with variable args, if you provide 3, the first is the namespace, only 2 and it defaults to the eventlistener's namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh ok, that sounds good.
Thoughts on reversing the function params (key, secretName, ns) vs (ns, name, key) since the ns one is optional?
6f9932c
to
38f2e7b
Compare
/test pull-tekton-triggers-build-tests |
/approve One minor thing about the optional namespace position in the function signature but other wise 👍 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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:
Approvers can indicate their approval by writing |
38f2e7b
to
6a1e644
Compare
This adds new compareSecret overload for strings in CEL, allowing comparison of a value against a secret.
6a1e644
to
0a85a35
Compare
/lgtm |
Changes
This adds new compareSecret overload for strings in CEL, allowing comparison of a value against a secret.
This addresses #486
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes