Skip to content

Commit

Permalink
Fix how filters are applied
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Aug 30, 2024
1 parent b555f8b commit 5c504a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/eventing/features/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The `.spec.from` section specifies **who** is allowed to send events to the targ

The `.spec.filters` section is optional and specifies additional criteria that the event itself must meet to be allowed.

* **Example:** Only CloudEvents with the `type` equals to `com.github.push` or matching a CESQL expression are allowed.
* **Example:** Only CloudEvents with the `type` equals to `com.github.push` and matching a certain CESQL expression are allowed.
* **Use Case:** Use `filters` when you want to have more fine grained criterias on allowed CloudEvents.
```yaml
from:
Expand All @@ -146,7 +146,7 @@ The `.spec.filters` section is optional and specifies additional criteria that t
type: com.github.push
```

If the filters are specified, an event must match **at least one of them** to be accepted. `.spec.filters` accepts the same filter dialects as [Triggers](../triggers/README.md#supported-filter-dialects).
If the filters are specified, an event must match **all** the specified filters of an `EventPolicy` (in addition to its `.spec.from`) to be accepted. `.spec.filters` accepts the same filter dialects as [Triggers](../triggers/README.md#supported-filter-dialects).

!!! note
Filters apply in addition to `.spec.from`. This means, soon as an `EventPolicy` specifies `.spec.filters`, they must match the request, as well as the `.spec.from` (*AND* operand). Only then the `EventPolicy` allows the request.
Expand Down

0 comments on commit 5c504a1

Please sign in to comment.