-
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
base: master
Are you sure you want to change the base?
[AI-5153] DDS: Mac Audit Logs Integration v1.0.0 #19989
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Created DOCS-10537 for Docs Team editorial review. |
…into mac-audit-logs-v1.0.0
Hi @tirthrajchaudhari-crest, just a quick update - I’m working on the review and discussing some aspects with the team, I'll share as soon as it's ready! |
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.
Setting the time zone in the backend is inconvenient for the customer, and it would cause complications if there are clients in different time zones. Could you please modify the integration so that timezones are handled automatically?
You can read the time zone with, for eg., the date "+%z"
command. Then you can
convert the timestamp and send the log data with the send_log
function:
from datadog_checks.base import AgentCheck
from datadog_checks.base.utils.time import get_timestamp
class HelloCheck(AgentCheck):
def check(self, instance):
data = dict()
data['timestamp'] = get_timestamp()
data['message'] = "this is a custom log message!"
data['ddtags'] = "env:dev,bar:foo"
self.send_log(data)
You also need to change the type entry in logs section to integration
, for eg:
logs:
- type: integration
source: my_source
service: my_service
Octopus Deploy and SAP HANA have usages of send_log
that can be used as examples.
You can parse the XML in the logs with Python code. You should use the lxml library for that, instead of the built-in Python xml library, which has security issues. The IBM WAS integration has an example of lxml usage.
mac_audit_logs/README.md
Outdated
- **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 Log Explorer. It also helps monitor and respond to security threats with ready-to-use Cloud SIEM detection rules. |
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.
This integration collects mac audit logs and sends them to Datadog for analysis, providing visual insights through out-of-the-box dashboards and Log Explorer. It also helps monitor and respond to security threats with ready-to-use Cloud SIEM detection rules. | |
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. |
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
### Configuration | ||
|
||
#### Configure BSM Auditing on Mac | ||
|
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.
**Note**: The following steps are required for the Mac version >=14. | |
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
mac_audit_logs/README.md
Outdated
|
||
4. Restart the Mac. | ||
|
||
**Note**: The above steps are needed for the mac version >=14. |
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.
Recommend moving this note to the beginning of the configuration.
**Note**: The above steps are needed for the mac version >=14. |
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
mac_audit_logs/README.md
Outdated
|
||
2. Enter "Mac Audit Logs" in the **Filter Pipelines** search box. | ||
|
||
3. Hover over the Mac Audit Logs pipeline and click on the **clone** button. This will create an editable clone of the Mac Audit Logs pipeline. |
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.
3. Hover over the Mac Audit Logs pipeline and click on the **clone** button. This will create an editable clone of the Mac Audit Logs pipeline. | |
3. Hover over the Mac Audit Logs pipeline and click **clone**. This creates an editable clone of the Mac Audit Logs pipeline. |
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.
Timezone support has been added in code itself. Hence, Removed this section.
mac_audit_logs/README.md
Outdated
|
||
3. Hover over the Mac Audit Logs pipeline and click on the **clone** button. This will create an editable clone of the Mac Audit Logs pipeline. | ||
|
||
4. Edit the Grok Parser using the below steps: |
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.
4. Edit the Grok Parser using the below steps: | |
4. Edit the Grok Parser by following these steps: |
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.
Timezone support has been added in code itself. Hence, Removed this section.
mac_audit_logs/README.md
Outdated
4. Edit the Grok Parser using the below steps: | ||
- In the cloned pipeline, find a processor with the name "Grok Parser: Parse \`record.time\` attribute" and click on the `Edit` button by hovering over the pipeline. | ||
- Under **Define parsing rules**, | ||
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. |
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.
Recommend consistent capitalization of Mac, unless this is all caps for a reason.
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. | |
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your Mac machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. |
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.
Timezone support has been added in code itself. Hence, Removed this section.
mac_audit_logs/README.md
Outdated
- In the cloned pipeline, find a processor with the name "Grok Parser: Parse \`record.time\` attribute" and click on the `Edit` button by hovering over the pipeline. | ||
- Under **Define parsing rules**, | ||
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. | ||
- Click the **update** button. |
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.
- Click the **update** button. | |
- Click **Update**. |
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.
To confirm, is the button lowercase?
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.
Timezone support has been added in code itself. Hence, Removed this section.
mac_audit_logs/README.md
Outdated
4. Edit the Grok Parser using the below steps: | ||
- In the cloned pipeline, find a processor with the name "Grok Parser: Parse \`record.time\` attribute" and click on the `Edit` button by hovering over the pipeline. | ||
- Under **Define parsing rules**, | ||
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. |
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.
To confirm, did you intend to send the reader into the logs pipelines page or to a reference for TZ identifier? If you meant to link to the logs pipeline page, it seems redundant since the user is directed there in step 1.
- Change the string `UTC` to the [TZ identifier][9] of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. | |
- Change the string `UTC` to the TZ identifier of the time zone of your MAC machine. For example, if your timezone is IST, you would change the value to`Asia/Calcutta`. |
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.
Timezone support has been added in code itself. Hence, Removed this section.
Hey @nubtron , Thank you for the feedback. We are currently discussing this internally and will get back to you soon. |
Hi @estherk15, I'll do the suggested changes for README along with this change. |
Hey @nubtron, We have made the necessary changes as per your recommendations. |
Hi @tirthrajchaudhari-crest, there is an issue with how the main check function is blocked by the praudit process, I'm looking into what could be a good alternative. |
What does this PR do?
This is an initial release PR of Mac Audit Logs integration including all the required assets. This is agent based integration.
Additional Notes
Review checklist (to be filled by reviewers)
qa/skip-qa
label if the PR doesn't need to be tested during QA.backport/<branch-name>
label to the PR and it will automatically open a backport PR once this one is merged