Search

name 비정상 요청 차단

우선 순위 올려줘야 적용될 수 있으므로 주의하기
{ "Name": "BlockProductName", "Priority": 4, "Statement": { "AndStatement": { "Statements": [ { "ByteMatchStatement": { "SearchString": "/v1/product", "FieldToMatch": { "UriPath": {} }, "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ], "PositionalConstraint": "EXACTLY" } }, { "OrStatement": { "Statements": [ { "AndStatement": { "Statements": [ { "ByteMatchStatement": { "SearchString": "POST", "FieldToMatch": { "Method": {} }, "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ], "PositionalConstraint": "EXACTLY" } }, { "ByteMatchStatement": { "SearchString": "<특정문자열>", "FieldToMatch": { "JsonBody": { "MatchPattern": { "IncludedPaths": [ "/name" ] }, "MatchScope": "VALUE", "InvalidFallbackBehavior": "MATCH", "OversizeHandling": "CONTINUE" } }, "TextTransformations": [ { "Priority": 0, "Type": "LOWERCASE" } ], "PositionalConstraint": "CONTAINS" } } ] } }, { "AndStatement": { "Statements": [ { "ByteMatchStatement": { "SearchString": "GET", "FieldToMatch": { "Method": {} }, "TextTransformations": [ { "Priority": 0, "Type": "NONE" } ], "PositionalConstraint": "EXACTLY" } }, { "ByteMatchStatement": { "SearchString": "<특정문자열>", "FieldToMatch": { "QueryString": {} }, "TextTransformations": [ { "Priority": 0, "Type": "LOWERCASE" } ], "PositionalConstraint": "CONTAINS" } } ] } } ] } } ] } }, "Action": { "Block": { "CustomResponse": { "ResponseCode": 403, "CustomResponseBodyKey": "error-text" } } }, "VisibilityConfig": { "SampledRequestsEnabled": true, "CloudWatchMetricsEnabled": true, "MetricName": "BlockProductName" } }
JSON
복사