Skip to main content

ENTRA

Constant ENTRA 

Source
pub const ENTRA: &str = "# Microsoft Entra ID sign-in logs, as Azure Monitor diagnostic settings write\n# them to a storage account: one JSON record per line, with the sign-in\n# itself under `properties`. Records sent to an event hub arrive wrapped in a\n# `records` array; unwrap them into lines first.\n#\n# Every sign-in becomes an OCSF Authentication: Logon. Interactive and\n# non-interactive user sign-ins share one shape; service principal sign-ins\n# name the application instead of a user. Every member of `properties` not\n# mapped below, such as the conditional access policies applied, is kept\n# under `unmapped` by its Entra name.\n#\n# Entra writes an empty string where it knows no value, such as the device of\n# a sign-in from an unmanaged client. Those are kept as written, like every\n# other value.\n\nname: entra\nversion: 1\nframing: lines\ndecoding: json\n\ncommon:\n  time: { from: time, as: timestamp }\n  # A sign-in has no severity of its own; its risk is below.\n  severity_id: { value: 1 }\n  metadata.version: { value: \"1.5.0\" }\n  metadata.product.name: { value: Microsoft Entra ID }\n  metadata.product.vendor_name: { value: Microsoft }\n  metadata.log_name: category\n  metadata.uid: properties.id\n  metadata.correlation_uid: correlationId\n  cloud.provider: { value: Azure }\n  cloud.account.uid: tenantId\n  # Entra\'s result code: 0 is success, anything else an error code, such as\n  # 50126 for a wrong password.\n  status_code: { from: resultType, as: string }\n  status_id: { from: resultType, map: { \"0\": 1 }, otherwise: 2 }\n  status_detail: properties.status.failureReason\n  src_endpoint.ip: properties.ipAddress\n  src_endpoint.location.city: properties.location.city\n  src_endpoint.location.region: properties.location.state\n  src_endpoint.location.country: properties.location.countryOrRegion\n  src_endpoint.location.lat: properties.location.geoCoordinates.latitude\n  src_endpoint.location.long: properties.location.geoCoordinates.longitude\n  service.name: properties.resourceDisplayName\n  service.uid: properties.resourceId\n  risk_level: properties.riskLevelDuringSignIn\n  risk_level_id:\n    from: properties.riskLevelDuringSignIn\n    map: { none: 0, low: 1, medium: 2, high: 3 }\n    otherwise: 99\n\nkinds:\n  - name: user\n    when:\n      category: SignInLogs\n    # Authentication: Logon.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields: &user\n      user.name: properties.userPrincipalName\n      user.uid: properties.userId\n      user.display_name: properties.userDisplayName\n      actor.app_name: properties.appDisplayName\n      actor.app_uid: properties.appId\n      http_request.user_agent: properties.userAgent\n      is_mfa:\n        from: properties.authenticationRequirement\n        map: { multiFactorAuthentication: true, singleFactorAuthentication: false }\n      device.uid: properties.deviceDetail.deviceId\n      device.name: properties.deviceDetail.displayName\n      device.os.name: properties.deviceDetail.operatingSystem\n      device.is_compliant: properties.deviceDetail.isCompliant\n      device.is_managed: properties.deviceDetail.isManaged\n    unmapped: [properties]\n\n  - name: non_interactive\n    when:\n      category: NonInteractiveUserSignInLogs\n    # Authentication: Logon.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields: *user\n    unmapped: [properties]\n\n  - name: service_principal\n    when:\n      category: ServicePrincipalSignInLogs\n    # Authentication: Logon.\n    class: { class_uid: 3002, activity_id: 1 }\n    fields:\n      user.name: properties.servicePrincipalName\n      user.uid: properties.servicePrincipalId\n      actor.app_name: properties.appDisplayName\n      actor.app_uid: properties.appId\n    unmapped: [properties]\n";
Expand description

The Microsoft Entra ID sign-in log definition shipped with this crate.