pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/aws/aws-cli/commit/084f934efceacf3e87917d6d790a137421375997

r-b69241e157469407.css" /> Update CloudTrail validate-logs for full key query range (#10072) · aws/aws-cli@084f934 · GitHub
Skip to content

Commit 084f934

Browse files
IanLeeYTIan Lee
andauthored
Update CloudTrail validate-logs for full key query range (#10072)
Co-authored-by: Ian Lee <ianleeyt@amazon.com>
1 parent a6f6682 commit 084f934

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "bugfix",
3+
"category": "cloudtrail",
4+
"description": "Fixed edge case in validate-logs where digest validation could fail with \"public key not found\" when the end time lands near a key rotation boundary"
5+
}

awscli/customizations/cloudtrail/validation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,11 @@ def traverse_digests(self, start_date, end_date=None, is_backfill=False):
585585

586586
# For regular digests, pre-load public keys. For backfill, start with empty dict
587587
public_keys = (
588-
{} if is_backfill else self._load_public_keys(start_date, end_date)
588+
{}
589+
if is_backfill
590+
else self._load_public_keys(
591+
start_date, end_date + timedelta(hours=2)
592+
)
589593
)
590594

591595
yield from self._traverse_digest_chain(

tests/unit/customizations/cloudtrail/test_validation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,9 @@ def test_ensures_public_keys_are_loaded(self):
994994
digest_iter = traverser.traverse_digests(start_date, end_date)
995995
with self.assertRaises(RuntimeError):
996996
next(digest_iter)
997-
key_provider.get_public_keys.assert_called_with(start_date, end_date)
997+
key_provider.get_public_keys.assert_called_with(
998+
start_date, end_date + timedelta(hours=2)
999+
)
9981000

9991001
def test_ensures_public_key_is_found(self):
10001002
start_date = START_DATE

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy