AWS WAFv2 how to use httpRequest.httpVersion in rules

0

I am wondering if it is possible to check HTTP version and incorporate them into WAF rules.

For example - check httpRequest.httpVersion = 'HTTP/1.1' then add a label, the label would then be used in other rules.

HieuVu
질문됨 2년 전477회 조회
2개 답변
0

AWS WAFv2 does not currently offer a direct configuration option for HTTP version. However, we can leverage CloudFront to achieve this functionality. CloudFront acts as the initial service that receives the request and adds the following headers:

Abheesh
답변함 일 년 전
-2

Hello Hieuvu,

Yes! it's possible to create a rule with the matching condition to match {Key:Vlaue} "httpVersion":"HTTP/1.1". To create a rule, please check Single header. https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-fields-list.html#waf-rule-statement-request-component-single-header

To label, use the action count and add the custom label to the request post that we are good to use the label match condition next.

To label: https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-label-add.html Label match condition example: https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-label-match-examples.html

profile pictureAWS
답변함 2년 전
  • Hi Chethan,

    I do not believe httpVersion is apart of the request header and therefore can not using the suggested match to a single header.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠