diff --git a/plugins/extractors/shield/shield.go b/plugins/extractors/shield/shield.go index 28e8ec3c3..d44982616 100644 --- a/plugins/extractors/shield/shield.go +++ b/plugins/extractors/shield/shield.go @@ -97,14 +97,10 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error { Type: "user", Description: user.GetSlug(), }, - Email: user.GetEmail(), - Username: user.GetId(), - FullName: user.GetName(), - DisplayName: "", - Title: "", - Status: "active", - ManagerEmail: "", - Profiles: nil, + Email: user.GetEmail(), + Username: user.GetId(), + FullName: user.GetName(), + Status: "active", Memberships: []*assetsv1beta1.Membership{ { GroupUrn: fmt.Sprintf("%s:%s", grp.Group.GetName(), grp.Group.GetId()), @@ -115,7 +111,6 @@ func (e *Extractor) Extract(ctx context.Context, emit plugins.Emit) error { CreateTime: user.GetCreatedAt(), UpdateTime: user.GetUpdatedAt(), }, - Event: nil, })) } diff --git a/plugins/extractors/shield/shield_test.go b/plugins/extractors/shield/shield_test.go index f2d187518..29f7de933 100644 --- a/plugins/extractors/shield/shield_test.go +++ b/plugins/extractors/shield/shield_test.go @@ -143,13 +143,8 @@ func setupExtractExpectation(ctx context.Context, client *mockClient) { Id: "user-A", }, mock.Anything).Return(&sh.GetRoleResponse{ Role: &sh.Role{ - Id: "user-A", - Name: "role-A", - Types: nil, - Namespace: nil, - Metadata: nil, - CreatedAt: nil, - UpdatedAt: nil, + Id: "user-A", + Name: "role-A", }, }, nil).Once() @@ -157,13 +152,8 @@ func setupExtractExpectation(ctx context.Context, client *mockClient) { Id: "user-B", }, mock.Anything).Return(&sh.GetRoleResponse{ Role: &sh.Role{ - Id: "user-B", - Name: "role-B", - Types: nil, - Namespace: nil, - Metadata: nil, - CreatedAt: nil, - UpdatedAt: nil, + Id: "user-B", + Name: "role-B", }, }, nil).Once() @@ -171,13 +161,8 @@ func setupExtractExpectation(ctx context.Context, client *mockClient) { Id: "user-A", }, mock.Anything).Return(&sh.GetGroupResponse{ Group: &sh.Group{ - Id: "grpId-A", - Name: "grpname-A", - Slug: "", - OrgId: "", - Metadata: nil, - CreatedAt: nil, - UpdatedAt: nil, + Id: "grpId-A", + Name: "grpname-A", }, }, nil).Once() @@ -185,13 +170,8 @@ func setupExtractExpectation(ctx context.Context, client *mockClient) { Id: "user-B", }, mock.Anything).Return(&sh.GetGroupResponse{ Group: &sh.Group{ - Id: "grpId-B", - Name: "grpname-B", - Slug: "", - OrgId: "", - Metadata: nil, - CreatedAt: nil, - UpdatedAt: nil, + Id: "grpId-B", + Name: "grpname-B", }, }, nil).Once() }