-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[AI-5153] DDS: Mac Audit Logs Integration v1.0.0 #19989
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
Open
tirthrajchaudhari-crest
wants to merge
15
commits into
DataDog:master
Choose a base branch
from
bhargavnariyanicrest:mac-audit-logs-v1.0.0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f911566
Add mac audit logs integration
tirthrajchaudhari-crest 2102d19
Add test results and unit test case
tirthrajchaudhari-crest eafb8fd
Resolve lint issue
tirthrajchaudhari-crest 6507012
Add images and resolve CI sync failure
tirthrajchaudhari-crest 9de0d14
Update spec name and ci sync
tirthrajchaudhari-crest dd7717f
Merge branch 'master' of https://github.com/DataDog/integrations-core…
tirthrajchaudhari-crest ecb42b2
Resolve CI sync
tirthrajchaudhari-crest 24e2bd7
Update cloud siem panels
tirthrajchaudhari-crest 240fc8d
update source type name
akaila-crest de285c4
update manifest.json
akaila-crest 247eebf
Update test-all.yml
akaila-crest ea36267
Update constants.py
akaila-crest db06d1b
Add support for timezone
tirthrajchaudhari-crest 4e0a6e8
Update test samples
tirthrajchaudhari-crest 39b8924
Update test results
tirthrajchaudhari-crest File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# CHANGELOG - mac_audit_logs | ||
|
||
<!-- towncrier release notes start --> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
## Overview | ||
|
||
[Mac Audit Logs][1] captures detailed information about system events, user actions, network and security-related activities. These logs are crucial for monitoring system integrity, identifying unauthorized access, and ensuring adherence to security policies and regulations. | ||
|
||
This integration provides enrichment and visualization for various log types, including: | ||
|
||
- **Authentication and Authorization** events | ||
- **Administrative** activities | ||
- **Network** events | ||
- **File Access** activities | ||
- **Input/Output Control** | ||
- **IPC (Inter-Process Communication)** | ||
|
||
This integration collects Mac audit logs and sends them to Datadog for analysis, providing visual insights through out-of-the-box dashboards and the Log Explorer. It also helps monitor and respond to security threats with ready-to-use Cloud SIEM detection rules. | ||
|
||
* [Log Explorer][2] | ||
* [Cloud SIEM][3] | ||
|
||
## Setup | ||
|
||
### Installation | ||
|
||
To install the Mac Audit Logs integration, run the following Agent installation command and follow the steps below. For more information, see the [Integration Management][4] documentation. | ||
|
||
**Note**: This step is not necessary for Agent versions >= 7.66.0 | ||
|
||
For Mac, run: | ||
```shell | ||
sudo datadog-agent integration install datadog-mac-audit-logs==1.0.0 | ||
``` | ||
|
||
|
||
### Configuration | ||
|
||
#### Configure BSM Auditing on Mac | ||
**Note**: The following steps are required for the Mac version >=14. | ||
|
||
1. Copy the configurations from `audit_control.example` to `audit_control` | ||
```shell | ||
cp /etc/security/audit_control.example /etc/security/audit_control | ||
``` | ||
|
||
2. Update the configuration to specify the event types that should be audited. Execute the command below to audit all event types: | ||
```shell | ||
sudo sed -i '' 's/^flags:.*/flags:all/' /etc/security/audit_control && \ | ||
sudo sed -i '' 's/^naflags:.*/naflags:all/' /etc/security/audit_control | ||
``` | ||
3. Restart `auditd` service: | ||
```shell | ||
/bin/launchctl enable system/com.apple.auditd | ||
``` | ||
|
||
4. Restart the Mac. | ||
|
||
### Validation | ||
|
||
[Run the Agent's status subcommand][5] and look for `mac_audit_logs` under the Checks section. | ||
|
||
## Data Collected | ||
|
||
### Metrics | ||
|
||
The Mac Audit Logs integration does not include any metrics. | ||
|
||
### Log Collection | ||
|
||
1. Collecting logs is disabled by default in the Datadog Agent. Enable it in the `datadog.yaml` file: | ||
|
||
```yaml | ||
logs_enabled: true | ||
``` | ||
|
||
2. Configure `mac_audit_logs.d/conf.yaml` file to start collecting Mac audit logs. | ||
|
||
See the [sample mac_audit_logs.d/conf.yaml][6] for available configuration options. | ||
|
||
```yaml | ||
init_config: | ||
instances: | ||
- MONITOR: true | ||
min_collection_interval: 15 | ||
logs: | ||
- type: integration | ||
service: mac-audit-logs | ||
source: mac-audit-logs | ||
``` | ||
|
||
**Note**: | ||
- Do not change the `service` and `source` values, as they are essential for proper log pipeline processing. | ||
|
||
3. [Restart the Agent][7]. | ||
|
||
### Events | ||
|
||
The Mac Audit Logs integration does not include any events. | ||
|
||
## Troubleshooting | ||
|
||
Need help? Contact [Datadog support][8]. | ||
|
||
|
||
[1]: https://www.apple.com/mac/ | ||
[2]: https://docs.datadoghq.com/logs/explorer/ | ||
[3]: https://www.datadoghq.com/product/cloud-siem/ | ||
[4]: https://docs.datadoghq.com/agent/guide/integration-management/?tab=linux#install | ||
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information | ||
[6]: https://github.com/DataDog/integrations-core/blob/master/mac_audit_logs/datadog_checks/mac_audit_logs/data/conf.yaml.example | ||
[7]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent | ||
[8]: https://docs.datadoghq.com/help/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Mac Audit Logs | ||
files: | ||
- name: mac_audit_logs.yaml | ||
options: | ||
- template: init_config | ||
options: | ||
- template: init_config/default | ||
- template: instances | ||
options: | ||
- name: MONITOR | ||
required: true | ||
description: "Flag indicating Mac audit log collection status. Set to true to enable collection." | ||
value: | ||
type: boolean | ||
example: true | ||
- template: instances/default | ||
overrides: | ||
min_collection_interval.required: true | ||
min_collection_interval.value.example: 15 | ||
min_collection_interval.value.minimum: 1 | ||
min_collection_interval.value.maximum: 64800 | ||
service.hidden: true | ||
empty_default_hostname.hidden: true | ||
metric_patterns.hidden: true | ||
- template: logs | ||
example: | ||
- type: integration | ||
service: mac-audit-logs | ||
source: mac-audit-logs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done