Exclude specific cookie content from WAF logs

0

I wanted to exclude/mask a specific cookie content from WAF logs while processing app requests. If I specify the parts of the cookies to inspect and narrow the set of cookies to inspect by including or excluding specific keys, will the content get logged ?.

Any help on this appreciated. Thanks

AnnaT
질문됨 9달 전336회 조회
2개 답변
1

Hi,

I am not sure that WAF offers what you need out of the box: AFAIK, no ability to exclude the logging of some parts of the content like a cookie.

But, you can achieve that by yourself: WAF can route its logs to a Kinesis stream. So, you can write a listener such a stream that we do the cleanup that you want before writing to CloudWatch. It gives you full control on the content of your permanently stored WAF logs.

See section of "Amazon Kinesis Data Firehose data streams" of https://docs.aws.amazon.com/waf/latest/developerguide/waf-policies.html

Best,

Didier

profile pictureAWS
전문가
답변함 9달 전
0
수락된 답변

From the documentation at https://docs.aws.amazon.com/waf/latest/APIReference/API_Cookies.html

if you specify the parts of the cookies to inspect and narrow the set of cookies to inspect by including or excluding specific keys, the content of the cookies will not be logged.

For example, the following CookieMatchSet condition will inspect all cookies except for the password cookie:

{
    "Name": "MyCookieMatchSet",
    "CookieNames": ["*"],
    "MatchTypes": ["EQUALS"],
    "ExcludedCookieNames": ["password"]
}
profile pictureAWS
답변함 9달 전
profile picture
전문가
검토됨 한 달 전

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

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

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

관련 콘텐츠