{
"Name": "CheckForLengthKey",
"Priority": 1,
"Action": {
"Block": {
"CustomResponse": {
"ResponseCode": 403
}
}
},
"VisibilityConfig": {
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "CheckForLengthKey"
},
"Statement": {
"AndStatement": {
"Statements": [
{
"ByteMatchStatement": {
"FieldToMatch": {
"UriPath": {}
},
"PositionalConstraint": "EXACTLY",
"SearchString": "/v1/token",
"TextTransformations": [
{
"Type": "NONE",
"Priority": 0
}
]
}
},
{
"ByteMatchStatement": {
"FieldToMatch": {
"Method": {}
},
"PositionalConstraint": "EXACTLY",
"SearchString": "POST",
"TextTransformations": [
{
"Type": "NONE",
"Priority": 0
}
]
}
},
{
"NotStatement": {
"Statement": {
"ByteMatchStatement": {
"FieldToMatch": {
"JsonBody": {
"MatchScope": "KEY",
"MatchPattern": {
"All": {}
},
"OversizeHandling": "CONTINUE"
}
},
"PositionalConstraint": "EXACTLY",
"SearchString": "length",
"TextTransformations": [
{
"Type": "NONE",
"Priority": 0
}
]
}
}
}
}
]
}
}
}