Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/go/ein/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -1957,11 +1957,7 @@ func ConvertAzureRoleEligibilityScheduleInstanceToRel(instance models.RoleEligib
id := strings.ToUpper(fmt.Sprintf("%s@%s", instance.RoleDefinitionId, instance.TenantId))

relationships := make([]IngestibleRelationship, 0)
//If the scope is not the directory, we are going to skip creating the edges for now until later work is done
//This isn't necessarily the best spot for this, but it works and it makes testing simple, since none of our azure convertors are exported
if instance.DirectoryScopeId != "/" {
return relationships
}

relationships = append(relationships, NewIngestibleRelationship(
IngestibleEndpoint{
Value: strings.ToUpper(instance.PrincipalId),
Expand Down
3 changes: 2 additions & 1 deletion packages/go/ein/azure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ func TestConvertAzureRoleEligibilityScheduleInstanceToRel(t *testing.T) {
Id: "lAPpYvVpN0KRkAEhdxReELKn6QMIlSROgkgWZy9fE3c-1-e",
RoleDefinitionId: "62e90394-69f5-4237-9190-012177145e10",
PrincipalId: "03e9a7b2-9508-4e24-8248-16672f5f1377",
// Note that we no longer exclude items with directory scope other than "/""
DirectoryScopeId: "abc123",
StartDateTime: "2024-01-04T01:22:36.867Z",
TenantId: "6c12b0b0-b2cc-4a73-8252-0b94bfca2145",
}

expectedRels = ein.ConvertAzureRoleEligibilityScheduleInstanceToRel(testData)
require.Len(t, expectedRels, 0)
require.Len(t, expectedRels, 1)
}

func Test_ConvertAppFederatedIdentityCredential(t *testing.T) {
Expand Down
Loading