From 978b6c16f1db5bc70ba4f18a9fb0398bd8e69798 Mon Sep 17 00:00:00 2001 From: Robert Gottlieb Date: Tue, 3 Dec 2024 16:24:03 -0500 Subject: [PATCH] more debugging of users being sent to the gateway --- ci/aws-iam-check-keys/find_stale_keys.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ci/aws-iam-check-keys/find_stale_keys.py b/ci/aws-iam-check-keys/find_stale_keys.py index 2b539f3..a02a89a 100644 --- a/ci/aws-iam-check-keys/find_stale_keys.py +++ b/ci/aws-iam-check-keys/find_stale_keys.py @@ -332,11 +332,14 @@ def check_key(key_num: int, last_rotated_key: str, user: Threshold, row: dict, a days_since_rotation = calc_days_since_rotation(last_rotated_key) user_dict = {"user":row["user"], "key_num": key_num, "user_type": user.account_type, "account": account, "days_since_rotation": days_since_rotation, "last_rotated":last_rotated_key} if days_since_rotation >= user.violation and user.account_type: + print(f"about to send user: {user_dict['user']}") send_key(user_dict, "violation") elif days_since_rotation >= user.warn: + print(f"about to send user: {user_dict['user']}") send_key(user_dict, "warn") else: # print(f"about to send rotated for user: {user}") + print(f"about to del user: {user_dict['user']}") del_key(user_dict)