Skip to content

Commit

Permalink
Update aws iam user mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
romulets committed Jan 8, 2025
1 parent 8207ddf commit c58a61e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/inventory/awsfetcher/fetcher_iam_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func (i *iamUserFetcher) Fetch(ctx context.Context, assetChannel chan<- inventor
AccountName: i.AccountName,
ServiceName: "AWS IAM",
}),
inventory.WithUser(inventory.User{
ID: user.GetResourceArn(),
Name: user.GetResourceName(),
}),
)
}
}
8 changes: 8 additions & 0 deletions internal/inventory/awsfetcher/fetcher_iam_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ func TestIAMUserFetcher_Fetch(t *testing.T) {
AccountName: "alias",
ServiceName: "AWS IAM",
}),
inventory.WithUser(inventory.User{
ID: "arn:aws:iam::000:user/user-1",
Name: "user-1",
}),
),

inventory.NewAssetEvent(
Expand All @@ -111,6 +115,10 @@ func TestIAMUserFetcher_Fetch(t *testing.T) {
AccountName: "alias",
ServiceName: "AWS IAM",
}),
inventory.WithUser(inventory.User{
ID: "arn:aws:iam::000:user/user-2",
Name: "user-2",
}),
),
}

Expand Down

0 comments on commit c58a61e

Please sign in to comment.