From f458b717bcc798f9b6064e19bb2260e1841b3ca3 Mon Sep 17 00:00:00 2001 From: dbtlabs-aaron <123593583+dbtlabs-aaron@users.noreply.github.com> Date: Mon, 8 Jul 2024 08:19:49 -0700 Subject: [PATCH] add Protocol Version to single condition field types (#222) * 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 --- docs/resources/corp_rule.md | 6 +++--- docs/resources/site_rule.md | 6 +++--- provider/lib.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/resources/corp_rule.md b/docs/resources/corp_rule.md index 72a7438..55183f2 100644 --- a/docs/resources/corp_rule.md +++ b/docs/resources/corp_rule.md @@ -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) @@ -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) @@ -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) diff --git a/docs/resources/site_rule.md b/docs/resources/site_rule.md index b9784b9..896f8d5 100644 --- a/docs/resources/site_rule.md +++ b/docs/resources/site_rule.md @@ -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) @@ -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) @@ -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) diff --git a/provider/lib.go b/provider/lib.go index 5936bea..1b8660b 100644 --- a/provider/lib.go +++ b/provider/lib.go @@ -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{