Skip to content

Commit

Permalink
fix sessionContext path
Browse files Browse the repository at this point in the history
  • Loading branch information
arielkr256 committed Dec 5, 2024
1 parent 49a5bdf commit 9f03e44
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion data_models/aws_cloudtrail_data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ def get_actor_user(event):
actor_user = deep_get(event, "userIdentity", "userName", default=f"Unknown{user_type}")
elif user_type in ("AssumedRole", "Role", "FederatedUser"):
actor_user = deep_get(
event, "sessionContext", "sessionIssuer", "userName", default=f"Unknown{user_type}"
event,
"userIdentity",
"sessionContext",
"sessionIssuer",
"userName",
default=f"Unknown{user_type}",
)
elif user_type == "IdentityCenterUser":
actor_user = deep_get(
Expand Down

0 comments on commit 9f03e44

Please sign in to comment.