AZSentinel icon indicating copy to clipboard operation
AZSentinel copied to clipboard

Failed to import "AzureResource" entityType and "ResourceId" field.

Open hisashin0728 opened this issue 2 years ago • 0 comments

Environment

PSVersion 7.2.2 PSEdition Core OS Microsoft Windows 10.0.22000 AzSentinel 0.6.21

Windows build number: [run "ver" at a command prompt]
PowerShell version (if applicable):7.2.2

Any other software?

Steps to reproduce

Import the following sample YAML rule. https://github.com/hisashin0728/SentinelRule_AzureCISBenchmark/blob/main/CIS_521.yaml

Import-AzSentinelAlertRule -SubscriptionId <SubscriptionID> -WorkspaceName <MyLASpace> -SettingsFile "CIS_521.yaml" image

Expected behavior

Successfully to import a rule.

Actual behavior

Succeeded but few parameters are NOT imported.

  1. Cannot import the specific entity Type "AzureResource" "Account" and "IP" Types are able to import, but "AzureResource" cannot be imported. Here is snipped the entityMapping of YAML source. In my understanding, the format is correct (entityType = "AzureResource" and fieldMapping = "ResourceId").
entityMappings:
  - entityType: AzureResource
    fieldMappings:
      - identifier: ResourceId
        columnName: AzCustomEntity

  1. Missed fieldMapping of "Name" identifer. Sentinel imported as "FullName". The mapping entityType of Account defines "Name", but it was imported as "FullName" about entityType.
  - entityType: Account
    fieldMappings:
      - identifier: Name
        columnName: AccountCustomEntity
image

Can you please advise me how to resolve issues? thanks you.

hisashin0728 avatar Mar 31 '22 08:03 hisashin0728