Skip to content

Commit

Permalink
add Protocol Version to single condition field types (#222)
Browse files Browse the repository at this point in the history
* add Protocol Version to single condition field types

The Protocol Version is a single condition field type. Plans with rules using this condition will throw a warning when this ought to be a supported type.

* updated docs
  • Loading branch information
dbtlabs-aaron authored Jul 8, 2024
1 parent 2ae15cc commit f458b71
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docs/resources/corp_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Optional:

- `conditions` (Block Set, Max: 10) Conditions (see [below for nested schema](#nestedblock--conditions--conditions))
- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, inList, notInList)
Expand All @@ -106,7 +106,7 @@ Optional:

- `conditions` (Block Set, Max: 10) Conditions (see [below for nested schema](#nestedblock--conditions--conditions--conditions))
- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, inList, notInList)
Expand All @@ -122,7 +122,7 @@ Required:
Optional:

- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, inList, notInList)
Expand Down
6 changes: 3 additions & 3 deletions docs/resources/site_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ Optional:

- `conditions` (Block Set, Max: 10) Conditions (see [below for nested schema](#nestedblock--conditions--conditions))
- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, matches, doesNotMatch, inList, notInList)
Expand All @@ -229,7 +229,7 @@ Optional:

- `conditions` (Block Set, Max: 10) Conditions (see [below for nested schema](#nestedblock--conditions--conditions--conditions))
- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, matches, doesNotMatch, inList, notInList)
Expand All @@ -245,7 +245,7 @@ Required:
Optional:

- `field` (String) types:
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint)
- single - (scheme, method, path, useragent, domain, ip, responseCode, agentname, paramname, paramvalue, country, name, valueString, valueInt, valueIp, signalType, value, ja3Fingerprint, protocolVersion)
- multival - (signal, requestHeader, queryParameter, postParameter, requestCookie, responseHeader)
- `group_operator` (String) type: group, multival - Conditions that must be matched when evaluating the request (all, any)
- `operator` (String) type: single - (equals, doesNotEqual, contains, doesNotContain, greaterEqual, lesserEqual, like, notLike, exists, doesNotExist, matches, doesNotMatch, inList, notInList)
Expand Down
2 changes: 1 addition & 1 deletion provider/lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ var siteImporter = schema.ResourceImporter{
var KnownSingleConditionFields = []string{
"scheme", "method", "path", "useragent", "domain", "ip", "responseCode", "agentname",
"paramname", "paramvalue", "country", "name", "valueString", "valueInt", "valueIp", "signalType",
"value", "ja3Fingerprint",
"value", "ja3Fingerprint", "protocolVersion",
}

var KnownMultivalConditionFields = []string{
Expand Down

0 comments on commit f458b71

Please sign in to comment.