@@ -33,9 +33,6 @@ func Test_getLabels(t *testing.T) {
3333 S3 : events.S3Entity {
3434 Bucket : events.S3Bucket {
3535 Name : "elb_logs_test" ,
36- OwnerIdentity : events.S3UserIdentity {
37- PrincipalID : "test" ,
38- },
3936 },
4037 Object : events.S3Object {
4138 Key : "my-bucket/AWSLogs/123456789012/elasticloadbalancing/us-east-1/2022/01/24/123456789012_elasticloadbalancing_us-east-1_app.my-loadbalancer.b13ea9d19f16d015_20220124T0000Z_0.0.0.0_2et2e1mx.log.gz" ,
@@ -46,7 +43,6 @@ func Test_getLabels(t *testing.T) {
4643 want : map [string ]string {
4744 "account_id" : "123456789012" ,
4845 "bucket" : "elb_logs_test" ,
49- "bucket_owner" : "test" ,
5046 "bucket_region" : "us-east-1" ,
5147 "day" : "24" ,
5248 "key" : "my-bucket/AWSLogs/123456789012/elasticloadbalancing/us-east-1/2022/01/24/123456789012_elasticloadbalancing_us-east-1_app.my-loadbalancer.b13ea9d19f16d015_20220124T0000Z_0.0.0.0_2et2e1mx.log.gz" ,
@@ -67,9 +63,6 @@ func Test_getLabels(t *testing.T) {
6763 S3 : events.S3Entity {
6864 Bucket : events.S3Bucket {
6965 Name : "elb_logs_test" ,
70- OwnerIdentity : events.S3UserIdentity {
71- PrincipalID : "test" ,
72- },
7366 },
7467 Object : events.S3Object {
7568 Key : "my-bucket/prefix/AWSLogs/123456789012/elasticloadbalancing/us-east-2/2016/05/01/123456789012_elasticloadbalancing_us-east-2_net.my-loadbalancer.1234567890abcdef_201605010000Z_2soosksi.log.gz" ,
@@ -80,7 +73,6 @@ func Test_getLabels(t *testing.T) {
8073 want : map [string ]string {
8174 "account_id" : "123456789012" ,
8275 "bucket" : "elb_logs_test" ,
83- "bucket_owner" : "test" ,
8476 "bucket_region" : "us-east-2" ,
8577 "day" : "01" ,
8678 "key" : "my-bucket/prefix/AWSLogs/123456789012/elasticloadbalancing/us-east-2/2016/05/01/123456789012_elasticloadbalancing_us-east-2_net.my-loadbalancer.1234567890abcdef_201605010000Z_2soosksi.log.gz" ,
@@ -101,9 +93,6 @@ func Test_getLabels(t *testing.T) {
10193 S3 : events.S3Entity {
10294 Bucket : events.S3Bucket {
10395 Name : "s3_guardduty_test" ,
104- OwnerIdentity : events.S3UserIdentity {
105- PrincipalID : "test" ,
106- },
10796 },
10897 Object : events.S3Object {
10998 Key : "AWSLogs/123456789012/GuardDuty/us-east-1/2024/05/30/07a3f2ce-1485-3031-b842-e1f324c4a48d.jsonl.gz" ,
@@ -114,7 +103,6 @@ func Test_getLabels(t *testing.T) {
114103 want : map [string ]string {
115104 "account_id" : "123456789012" ,
116105 "bucket" : "s3_guardduty_test" ,
117- "bucket_owner" : "test" ,
118106 "bucket_region" : "us-east-1" ,
119107 "day" : "30" ,
120108 "key" : "AWSLogs/123456789012/GuardDuty/us-east-1/2024/05/30/07a3f2ce-1485-3031-b842-e1f324c4a48d.jsonl.gz" ,
@@ -133,9 +121,6 @@ func Test_getLabels(t *testing.T) {
133121 S3 : events.S3Entity {
134122 Bucket : events.S3Bucket {
135123 Name : "vpc_logs_test" ,
136- OwnerIdentity : events.S3UserIdentity {
137- PrincipalID : "test" ,
138- },
139124 },
140125 Object : events.S3Object {
141126 Key : "my-bucket/AWSLogs/123456789012/vpcflowlogs/us-east-1/2022/01/24/123456789012_vpcflowlogs_us-east-1_fl-1234abcd_20180620T1620Z_fe123456.log.gz" ,
@@ -146,7 +131,6 @@ func Test_getLabels(t *testing.T) {
146131 want : map [string ]string {
147132 "account_id" : "123456789012" ,
148133 "bucket" : "vpc_logs_test" ,
149- "bucket_owner" : "test" ,
150134 "bucket_region" : "us-east-1" ,
151135 "day" : "24" ,
152136 "key" : "my-bucket/AWSLogs/123456789012/vpcflowlogs/us-east-1/2022/01/24/123456789012_vpcflowlogs_us-east-1_fl-1234abcd_20180620T1620Z_fe123456.log.gz" ,
@@ -166,9 +150,6 @@ func Test_getLabels(t *testing.T) {
166150 S3 : events.S3Entity {
167151 Bucket : events.S3Bucket {
168152 Name : "vpc_logs_test" ,
169- OwnerIdentity : events.S3UserIdentity {
170- PrincipalID : "test" ,
171- },
172153 },
173154 Object : events.S3Object {
174155 Key : "my-bucket/AWSLogs/123456789012/vpcflowlogs/us-gov-east-1/2022/01/24/123456789012_vpcflowlogs_us-gov-east-1_fl-1234abcd_20180620T1620Z_fe123456.log.gz" ,
@@ -179,7 +160,6 @@ func Test_getLabels(t *testing.T) {
179160 want : map [string ]string {
180161 "account_id" : "123456789012" ,
181162 "bucket" : "vpc_logs_test" ,
182- "bucket_owner" : "test" ,
183163 "bucket_region" : "us-gov-east-1" ,
184164 "day" : "24" ,
185165 "key" : "my-bucket/AWSLogs/123456789012/vpcflowlogs/us-gov-east-1/2022/01/24/123456789012_vpcflowlogs_us-gov-east-1_fl-1234abcd_20180620T1620Z_fe123456.log.gz" ,
@@ -199,9 +179,6 @@ func Test_getLabels(t *testing.T) {
199179 S3 : events.S3Entity {
200180 Bucket : events.S3Bucket {
201181 Name : "cloudtrail_digest_logs_test" ,
202- OwnerIdentity : events.S3UserIdentity {
203- PrincipalID : "test" ,
204- },
205182 },
206183 Object : events.S3Object {
207184 Key : "my-bucket/AWSLogs/123456789012/CloudTrail-Digest/us-east-1/2022/01/24/123456789012_CloudTrail-Digest_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -212,7 +189,6 @@ func Test_getLabels(t *testing.T) {
212189 want : map [string ]string {
213190 "account_id" : "123456789012" ,
214191 "bucket" : "cloudtrail_digest_logs_test" ,
215- "bucket_owner" : "test" ,
216192 "bucket_region" : "us-east-1" ,
217193 "day" : "24" ,
218194 "key" : "my-bucket/AWSLogs/123456789012/CloudTrail-Digest/us-east-1/2022/01/24/123456789012_CloudTrail-Digest_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -232,9 +208,6 @@ func Test_getLabels(t *testing.T) {
232208 S3 : events.S3Entity {
233209 Bucket : events.S3Bucket {
234210 Name : "cloudtrail_logs_test" ,
235- OwnerIdentity : events.S3UserIdentity {
236- PrincipalID : "test" ,
237- },
238211 },
239212 Object : events.S3Object {
240213 Key : "my-bucket/AWSLogs/123456789012/CloudTrail/us-east-1/2022/01/24/123456789012_CloudTrail_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -245,7 +218,6 @@ func Test_getLabels(t *testing.T) {
245218 want : map [string ]string {
246219 "account_id" : "123456789012" ,
247220 "bucket" : "cloudtrail_logs_test" ,
248- "bucket_owner" : "test" ,
249221 "bucket_region" : "us-east-1" ,
250222 "day" : "24" ,
251223 "key" : "my-bucket/AWSLogs/123456789012/CloudTrail/us-east-1/2022/01/24/123456789012_CloudTrail_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -265,9 +237,6 @@ func Test_getLabels(t *testing.T) {
265237 S3 : events.S3Entity {
266238 Bucket : events.S3Bucket {
267239 Name : "cloudtrail_logs_test" ,
268- OwnerIdentity : events.S3UserIdentity {
269- PrincipalID : "test" ,
270- },
271240 },
272241 Object : events.S3Object {
273242 Key : "my-bucket/AWSLogs/123456789012/CloudTrail/us-gov-east-1/2022/01/24/123456789012_CloudTrail_us-gov-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -278,7 +247,6 @@ func Test_getLabels(t *testing.T) {
278247 want : map [string ]string {
279248 "account_id" : "123456789012" ,
280249 "bucket" : "cloudtrail_logs_test" ,
281- "bucket_owner" : "test" ,
282250 "bucket_region" : "us-gov-east-1" ,
283251 "day" : "24" ,
284252 "key" : "my-bucket/AWSLogs/123456789012/CloudTrail/us-gov-east-1/2022/01/24/123456789012_CloudTrail_us-gov-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -298,9 +266,6 @@ func Test_getLabels(t *testing.T) {
298266 S3 : events.S3Entity {
299267 Bucket : events.S3Bucket {
300268 Name : "cloudtrail_logs_test" ,
301- OwnerIdentity : events.S3UserIdentity {
302- PrincipalID : "test" ,
303- },
304269 },
305270 Object : events.S3Object {
306271 Key : "my-bucket/AWSLogs/o-test123456/123456789012/CloudTrail/us-east-1/2022/01/24/123456789012_CloudTrail_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -311,7 +276,6 @@ func Test_getLabels(t *testing.T) {
311276 want : map [string ]string {
312277 "account_id" : "123456789012" ,
313278 "bucket" : "cloudtrail_logs_test" ,
314- "bucket_owner" : "test" ,
315279 "bucket_region" : "us-east-1" ,
316280 "day" : "24" ,
317281 "key" : "my-bucket/AWSLogs/o-test123456/123456789012/CloudTrail/us-east-1/2022/01/24/123456789012_CloudTrail_us-east-1_20220124T0000Z_4jhzXFO2Jlvu2b3y.json.gz" ,
@@ -332,9 +296,6 @@ func Test_getLabels(t *testing.T) {
332296 S3 : events.S3Entity {
333297 Bucket : events.S3Bucket {
334298 Name : "cloudfront_logs_test" ,
335- OwnerIdentity : events.S3UserIdentity {
336- PrincipalID : "test" ,
337- },
338299 },
339300 Object : events.S3Object {
340301 Key : "my/bucket/prefix/E2K2LNL5N3WR51.2022-07-18-12.a10a8496.gz" ,
@@ -344,7 +305,6 @@ func Test_getLabels(t *testing.T) {
344305 },
345306 want : map [string ]string {
346307 "bucket" : "cloudfront_logs_test" ,
347- "bucket_owner" : "test" ,
348308 "bucket_region" : "us-east-1" ,
349309 "day" : "18" ,
350310 "key" : "my/bucket/prefix/E2K2LNL5N3WR51.2022-07-18-12.a10a8496.gz" ,
@@ -364,9 +324,6 @@ func Test_getLabels(t *testing.T) {
364324 S3 : events.S3Entity {
365325 Bucket : events.S3Bucket {
366326 Name : "waf_logs_test" ,
367- OwnerIdentity : events.S3UserIdentity {
368- PrincipalID : "test" ,
369- },
370327 },
371328 Object : events.S3Object {
372329 Key : "prefix/AWSLogs/11111111111/WAFLogs/us-east-1/TEST-WEBACL/2021/10/28/19/50/11111111111_waflogs_us-east-1_TEST-WEBACL_20211028T1950Z_e0ca43b5.log.gz" ,
@@ -376,7 +333,6 @@ func Test_getLabels(t *testing.T) {
376333 },
377334 want : map [string ]string {
378335 "account_id" : "11111111111" ,
379- "bucket_owner" : "test" ,
380336 "bucket_region" : "us-east-1" ,
381337 "bucket" : "waf_logs_test" ,
382338 "day" : "28" ,
@@ -399,9 +355,6 @@ func Test_getLabels(t *testing.T) {
399355 S3 : events.S3Entity {
400356 Bucket : events.S3Bucket {
401357 Name : "waf_logs_test" ,
402- OwnerIdentity : events.S3UserIdentity {
403- PrincipalID : "test" ,
404- },
405358 },
406359 Object : events.S3Object {
407360 Key : "prefix/AWSLogs/11111111111/WAFLogs/us-gov-east-1/TEST-WEBACL/2021/10/28/19/50/11111111111_waflogs_us-gov-east-1_TEST-WEBACL_20211028T1950Z_e0ca43b5.log.gz" ,
@@ -411,7 +364,6 @@ func Test_getLabels(t *testing.T) {
411364 },
412365 want : map [string ]string {
413366 "account_id" : "11111111111" ,
414- "bucket_owner" : "test" ,
415367 "bucket_region" : "us-gov-east-1" ,
416368 "bucket" : "waf_logs_test" ,
417369 "day" : "28" ,
@@ -434,9 +386,6 @@ func Test_getLabels(t *testing.T) {
434386 S3 : events.S3Entity {
435387 Bucket : events.S3Bucket {
436388 Name : "missing_type" ,
437- OwnerIdentity : events.S3UserIdentity {
438- PrincipalID : "test" ,
439- },
440389 },
441390 Object : events.S3Object {
442391 Key : "some-object.json" ,
@@ -446,7 +395,6 @@ func Test_getLabels(t *testing.T) {
446395 },
447396 want : map [string ]string {
448397 "bucket" : "missing_type" ,
449- "bucket_owner" : "test" ,
450398 "bucket_region" : "us-east-1" ,
451399 "key" : "some-object.json" ,
452400 },
@@ -644,7 +592,6 @@ func Test_parseS3Log(t *testing.T) {
644592 },
645593 labels : map [string ]string {
646594 "bucket" : "missing_parser" ,
647- "bucket_owner" : "test" ,
648595 "bucket_region" : "us-east-1" ,
649596 "key" : "some-object.json" ,
650597 "type" : "" ,
0 commit comments