Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend MS-Graph integration - MDM Intune integration #86

Merged
merged 13 commits into from
Aug 19, 2024

Conversation

TomasTurina
Copy link
Member

Related issue
wazuh/wazuh#24498

Description

This PR includes the following changes:

Configuration options

  <ms-graph>
    <enabled>yes</enabled>
    <only_future_events>yes</only_future_events>
    <curl_max_size>10M</curl_max_size>
    <run_on_start>yes</run_on_start>
    <interval>10s</interval>
    <version>v1.0</version>
    <api_auth>
      <tenant_id>xxxxx</tenant_id>
      <client_id>xxxxxx</client_id>
      <secret_value>xxxxxx</secret_value>
      <api_type>global</api_type>
    </api_auth>
    <resource>
      <name>deviceManagement</name>
      <relationship>auditEvents</relationship>
      <relationship>managedDevices</relationship>
      <relationship>detectedApps</relationship>
    </resource>
  </ms-graph>

Logs/Alerts example

2024/08/09 14:56:42 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:82 at wm_ms_graph_main(): INFO: Scanning tenant '0fea4e03-8146-453b-b889-54b4bd11565b'
2024/08/09 14:56:45 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:296 at wm_ms_graph_scan_relationships(): DEBUG: Microsoft Graph API Log URL: 'https://graph.microsoft.com/v1.0/deviceManagement/auditEvents?$top=100&$filter=activityDateTime+ge+2024-08-09T14:56:34Z+and+activityDateTime+lt+2024-08-09T14:56:45Z'
2024/08/09 14:56:46 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:343 at wm_ms_graph_scan_relationships(): DEBUG: No new logs received.
2024/08/09 14:56:46 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:373 at wm_ms_graph_scan_relationships(): DEBUG: Bookmark updated to '2024-08-09T14:56:45Z' for tenant '0fea4e03-8146-453b-b889-54b4bd11565b' resource 'deviceManagement' and relationship 'auditEvents', waiting '10' seconds to run next scan.
2024/08/09 14:56:46 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:296 at wm_ms_graph_scan_relationships(): DEBUG: Microsoft Graph API Log URL: 'https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=100'
2024/08/09 14:56:47 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:343 at wm_ms_graph_scan_relationships(): DEBUG: No new logs received.
2024/08/09 14:56:47 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:296 at wm_ms_graph_scan_relationships(): DEBUG: Microsoft Graph API Log URL: 'https://graph.microsoft.com/v1.0/deviceManagement/detectedApps?$top=100&$expand=managedDevices($select=id)'
2024/08/09 14:56:48 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:343 at wm_ms_graph_scan_relationships(): DEBUG: No new logs received.
2024/08/09 14:56:48 wazuh-modulesd:ms-graph[1302] wm_ms_graph.c:68 at wm_ms_graph_main(): DEBUG: Waiting until: 2024/08/09 14:56:52

Tests

  • Compilation without warnings in every supported platform
    • Linux
    • Windows
    • MAC OS X
  • Source installation
  • Package installation
  • Source upgrade
  • Package upgrade
  • Memory tests for Linux
    • Scan-build report
    • Valgrind (memcheck and descriptor leaks check)
  • Added unit tests (for new features)

@TomasTurina TomasTurina self-assigned this Aug 16, 2024
@TomasTurina TomasTurina linked an issue Aug 16, 2024 that may be closed by this pull request
5 tasks
@vikman90 vikman90 merged commit a8e7478 into master Aug 19, 2024
4 checks passed
@vikman90 vikman90 deleted the 24498/feat-mdm-intune-integration branch August 19, 2024 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MDM Intune integration
3 participants