Skip to content

Commit

Permalink
more debugging of users being sent to the gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgottlieb committed Dec 3, 2024
1 parent fdc3e09 commit 978b6c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/aws-iam-check-keys/find_stale_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 978b6c1

Please sign in to comment.