-
Notifications
You must be signed in to change notification settings - Fork 10.3k
[Ruleset Engine] Add query param filtering to Fields reference #19910
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
[Ruleset Engine] Add query param filtering to Fields reference #19910
Conversation
| - name: cf.tls_client_extensions_sha1 | ||
| data_type: String | ||
| categories: [Request] | ||
| categories: [Request, SSL/TLS] |
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.
Added a new category so we can filter by mTLS fields + other SSL/TLS fields.
This "double category" is usually expressed in the docs as "the available cf.tls_* fields".
| --- | ||
|
|
||
| Many organizations qualify traffic based on the presence of specific HTTP request headers. Use the Rules language [HTTP request header fields](/ruleset-engine/rules-language/fields/reference/) to target requests with specific headers. | ||
| Many organizations qualify traffic based on the presence of specific HTTP request headers. Use the Rules language [HTTP request header fields](/ruleset-engine/rules-language/fields/reference/?field-category=Headers&search-term=http.request) to target requests with specific headers. |
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.
We don't have a category just for request headers, so here we filter by the Headers category and the http.request search term.
| useEffect(() => { | ||
| // On component load, check for deep-links to categories in the query param | ||
| const params = new URLSearchParams(window.location.search); | ||
| const categories = params.getAll("field-category"); |
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.
Supports filtering by more than one category (and some links in this PR use this possibility).
| mTLS is verified and checked in the [Cloudflare WAF phase](/waf/reference/phases/). This is done by creating WAF [Custom Rules](/waf/custom-rules/) using the dynamic fields. | ||
|
|
||
| All Client Certificate details can be found in the [`cf.tls_*`](/ruleset-engine/rules-language/fields/reference/) fields in the [Cloudflare Ruleset Engine](/ruleset-engine/). | ||
| All Client Certificate details can be found in the [`cf.tls_*`](/ruleset-engine/rules-language/fields/reference/?field-category=mTLS&field-category=SSL/TLS) fields in the [Cloudflare Ruleset Engine](/ruleset-engine/). |
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.
Filters by two categories.
KianNH
left a comment
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.
Nice work!
Summary
Follows a similar strategy to the one in
ProductCatalog.tsx.Adds support for linking to one or more field categories (filtered on page load).