AWS WAF informações em AWS CloudTrail - AWS WAF, AWS Firewall Manager, e AWS Shield Advanced

As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.

AWS WAF informações em AWS CloudTrail

Todas AWS WAF as ações são registradas AWS CloudTrail e documentadas na Referência da AWS WAF API. Por exemplo, chamadas para ListWebACLUpdateWebACL, e DeleteWebACL geram entradas nos arquivos de CloudTrail log.

Cada entrada de log ou evento contém informações sobre quem gerou a solicitação. As informações de identidade ajudam a determinar:

  • Se a solicitação foi feita com credenciais de usuário raiz

  • Se a solicitação foi feita com credenciais de segurança temporárias de um perfil ou de um usuário federado

  • Se a solicitação foi feita por outro AWS serviço

Para obter mais informações, consulte CloudTrailUserIdentity Element.

Exemplo: entradas do arquivo de AWS WAF log

Uma trilha é uma configuração que permite a entrega de eventos como arquivos de log para um bucket do Amazon S3 que você especificar. AWS CloudTrail os arquivos de log contêm uma ou mais entradas de log. Um evento representa uma única solicitação de qualquer fonte, e inclui informações sobre a ação solicitada, data e hora da ação, parâmetros de solicitação e assim por diante. CloudTrail os arquivos de log não são um rastreamento de pilha ordenado das chamadas públicas de API, portanto, eles não aparecem em nenhuma ordem específica.

Veja a seguir exemplos de entradas de CloudTrail registro para operações de AWS WAF Web ACL.

Exemplo: entrada de CloudTrail registro para CreateWebACL

{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "principalId", "arn": "arn:aws:sts::112233445566:assumed-role/Admin", "accountId": "112233445566", "accessKeyId": "accessKeyId", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "principalId", "arn": "arn:aws:iam::112233445566:role/Admin", "accountId": "112233445566", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2019-11-06T03:43:07Z" } } }, "eventTime": "2019-11-06T03:44:21Z", "eventSource": "wafv2.amazonaws.com", "eventName": "CreateWebACL", "awsRegion": "us-east-1", "sourceIPAddress": "10.0.0.1", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36", "requestParameters": { "name": "foo", "scope": "CLOUDFRONT", "defaultAction": { "block": {} }, "description": "foo", "rules": [ { "name": "foo", "priority": 1, "statement": { "geoMatchStatement": { "countryCodes": [ "AF", "AF" ] } }, "action": { "block": {} }, "visibilityConfig": { "sampledRequestsEnabled": true, "cloudWatchMetricsEnabled": true, "metricName": "foo" } } ], "visibilityConfig": { "sampledRequestsEnabled": true, "cloudWatchMetricsEnabled": true, "metricName": "foo" } }, "responseElements": { "summary": { "name": "foo", "id": "ebbcb976-8d59-4d20-8ca8-4ab2f6b7c07b", "description": "foo", "lockToken": "67551e73-49d8-4363-be48-244deea72ea9", "aRN": "arn:aws:wafv2:us-east-1:112233445566:global/webacl/foo/ebbcb976-8d59-4d20-8ca8-4ab2f6b7c07b" } }, "requestID": "c51521ba-3911-45ca-ba77-43aba50471ca", "eventID": "afd1a60a-7d84-417f-bc9c-7116cf029065", "eventType": "AwsApiCall", "apiVersion": "2019-04-23", "recipientAccountId": "112233445566" }

Exemplo: entrada de CloudTrail registro para GetWebACL

{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "AssumedRole", "arn": "arn:aws:sts::112233445566:assumed-role/Admin/admin", "accountId": "112233445566", "accessKeyId": "accessKeyId", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "AssumedRole", "arn": "arn:aws:iam::112233445566:role/Admin", "accountId": "112233445566", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2019-11-06T19:17:20Z" } } }, "eventTime": "2019-11-06T19:18:28Z", "eventSource": "wafv2.amazonaws.com", "eventName": "GetWebACL", "awsRegion": "us-east-1", "sourceIPAddress": "10.0.0.1", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36", "requestParameters": { "name": "foo", "scope": "CLOUDFRONT", "id": "webacl" }, "responseElements": null, "requestID": "f2db4884-4eeb-490c-afe7-67cbb494ce3b", "eventID": "7d563cd6-4123-4082-8880-c2d1fda4d90b", "readOnly": true, "eventType": "AwsApiCall", "apiVersion": "2019-04-23", "recipientAccountId": "112233445566" }

Exemplo: entrada de CloudTrail registro para UpdateWebACL

{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "principalId", "arn": "arn:aws:sts::112233445566:assumed-role/Admin", "accountId": "112233445566", "accessKeyId": "accessKeyId", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "principalId", "arn": "arn:aws:iam::112233445566:role/Admin", "accountId": "112233445566", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2019-11-06T19:17:20Z" } } }, "eventTime": "2019-11-06T19:20:56Z", "eventSource": "wafv2.amazonaws.com", "eventName": "UpdateWebACL", "awsRegion": ""us-east-1, "sourceIPAddress": "10.0.0.1", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36", "requestParameters": { "name": "foo", "scope": "CLOUDFRONT", "id": "ebbcb976-8d59-4d20-8ca8-4ab2f6b7c07b", "defaultAction": { "block": {} }, "description": "foo", "rules": [ { "name": "foo", "priority": 1, "statement": { "geoMatchStatement": { "countryCodes": [ "AF" ] } }, "action": { "block": {} }, "visibilityConfig": { "sampledRequestsEnabled": true, "cloudWatchMetricsEnabled": true, "metricName": "foo" } } ], "visibilityConfig": { "sampledRequestsEnabled": true, "cloudWatchMetricsEnabled": true, "metricName": "foo" }, "lockToken": "67551e73-49d8-4363-be48-244deea72ea9" }, "responseElements": { "nextLockToken": "a6b54c01-7975-4e6d-b7d0-2653cb6e231d" }, "requestID": "41c96e12-9790-46ab-b145-a230f358f2c2", "eventID": "517a10e6-4ca9-4828-af90-a5cff9756594", "eventType": "AwsApiCall", "apiVersion": "2019-04-23", "recipientAccountId": "112233445566" }

Exemplo: entrada de CloudTrail registro para DeleteWebACL

{ "eventVersion": "1.05", "userIdentity": { "type": "AssumedRole", "principalId": "principalId", "arn": "arn:aws:sts::112233445566:assumed-role/Admin/session-name", "accountId": "112233445566", "accessKeyId": "accessKeyId", "sessionContext": { "sessionIssuer": { "type": "Role", "principalId": "principalId", "arn": "arn:aws:iam::112233445566:role/Admin", "accountId": "112233445566", "userName": "Admin" }, "webIdFederationData": {}, "attributes": { "mfaAuthenticated": "false", "creationDate": "2019-11-06T19:17:20Z" } } }, "eventTime": "2019-11-06T19:25:17Z", "eventSource": "wafv2.amazonaws.com", "eventName": "DeleteWebACL", "awsRegion": "us-east-1", "sourceIPAddress": "10.0.0.1", "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36", "requestParameters": { "name": "foo", "scope": "CLOUDFRONT", "id": "ebbcb976-8d59-4d20-8ca8-4ab2f6b7c07b", "lockToken": "a6b54c01-7975-4e6d-b7d0-2653cb6e231d" }, "responseElements": null, "requestID": "71703f89-e139-440c-96d4-9c77f4cd7565", "eventID": "2f976624-b6a5-4a09-a8d0-aa3e9f4e5187", "eventType": "AwsApiCall", "apiVersion": "2019-04-23", "recipientAccountId": "112233445566" }

Exemplo: entradas AWS WAF clássicas do arquivo de log

AWS WAF Classic é a versão anterior do AWS WAF. Para mais informações, consulte AWS WAF clássico.

A entrada de log demonstra as operações de DeleteRule, CreateRule, GetRule e UpdateRule:

{ "Records": [ { "eventVersion": "1.03", "userIdentity": { "type": "IAMUser", "principalId": "AIDAIEP4IT4TPDEXAMPLE", "arn": "arn:aws:iam::777777777777:user/nate", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "nate" }, "eventTime": "2016-04-25T21:35:14Z", "eventSource": "waf.amazonaws.com", "eventName": "CreateRule", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "console.amazonaws.com", "requestParameters": { "name": "0923ab32-7229-49f0-a0e3-66c81example", "changeToken": "l9434322-8685-4ed2-9c5b-9410bexample", "metricName": "0923ab32722949f0a0e366c81example" }, "responseElements": { "rule": { "metricName": "0923ab32722949f0a0e366c81example", "ruleId": "12132e64-6750-4725-b714-e7544example", "predicates": [ ], "name": "0923ab32-7229-49f0-a0e3-66c81example" }, "changeToken": "l9434322-8685-4ed2-9c5b-9410bexample" }, "requestID": "4e6b66f9-d548-11e3-a8a9-73e33example", "eventID": "923f4321-d378-4619-9b72-4605bexample", "eventType": "AwsApiCall", "apiVersion": "2015-08-24", "recipientAccountId": "777777777777" }, { "eventVersion": "1.03", "userIdentity": { "type": "IAMUser", "principalId": "AIDAIEP4IT4TPDEXAMPLE", "arn": "arn:aws:iam::777777777777:user/nate", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "nate" }, "eventTime": "2016-04-25T21:35:22Z", "eventSource": "waf.amazonaws.com", "eventName": "GetRule", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "console.amazonaws.com", "requestParameters": { "ruleId": "723c2943-82dc-4bc1-a29b-c7d73example" }, "responseElements": null, "requestID": "8e4f3211-d548-11e3-a8a9-73e33example", "eventID": "an236542-d1f9-4639-bb3d-8d2bbexample", "eventType": "AwsApiCall", "apiVersion": "2015-08-24", "recipientAccountId": "777777777777" }, { "eventVersion": "1.03", "userIdentity": { "type": "IAMUser", "principalId": "AIDAIEP4IT4TPDEXAMPLE", "arn": "arn:aws:iam::777777777777:user/nate", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "nate" }, "eventTime": "2016-04-25T21:35:13Z", "eventSource": "waf.amazonaws.com", "eventName": "UpdateRule", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "console.amazonaws.com", "requestParameters": { "ruleId": "7237b123-7903-4d9e-8176-9d71dexample", "changeToken": "32343a11-35e2-4dab-81d8-6d408example", "updates": [ { "predicate": { "type": "SizeConstraint", "dataId": "9239c032-bbbe-4b80-909b-782c0example", "negated": false }, "action": "INSERT" } ] }, "responseElements": { "changeToken": "32343a11-35e2-4dab-81d8-6d408example" }, "requestID": "11918283-0b2d-11e6-9ccc-f9921example", "eventID": "00032abc-5bce-4237-a8ee-5f1a9example", "eventType": "AwsApiCall", "apiVersion": "2015-08-24", "recipientAccountId": "777777777777" }, { "eventVersion": "1.03", "userIdentity": { "type": "IAMUser", "principalId": "AIDAIEP4IT4TPDEXAMPLE", "arn": "arn:aws:iam::777777777777:user/nate", "accountId": "777777777777", "accessKeyId": "AKIAIOSFODNN7EXAMPLE", "userName": "nate" }, "eventTime": "2016-04-25T21:35:28Z", "eventSource": "waf.amazonaws.com", "eventName": "DeleteRule", "awsRegion": "us-east-1", "sourceIPAddress": "AWS Internal", "userAgent": "console.amazonaws.com", "requestParameters": { "changeToken": "fd232003-62de-4ea3-853d-52932example", "ruleId": "3e3e2d11-fd8b-4333-8b03-1da95example" }, "responseElements": { "changeToken": "fd232003-62de-4ea3-853d-52932example" }, "requestID": "b23458a1-0b2d-11e6-9ccc-f9928example", "eventID": "a3236565-1a1a-4475-978e-81c12example", "eventType": "AwsApiCall", "apiVersion": "2015-08-24", "recipientAccountId": "777777777777" } ] }