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

OCI split data in different tables #11499

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft

Conversation

v-sabiraj
Copy link
Contributor

Required items, please complete

Change(s):

  • See guidance below

Reason for Change(s):

  • See guidance below

Version Updated:

  • Required only for Detections/Analytic Rule templates
  • See guidance below

Testing Completed:

  • See guidance below

Checked that the validations are passing and have addressed any issues that are present:

  • See guidance below

Guidance <- remove section before submitting


Before submitting this PR please ensure that you have read the following sections and filled out the changes, reason for change and testing complete sections:

Thank you for your contribution to the Microsoft Sentinel Github repo.

Details of the code changes in your submitted PR. Providing descriptions for pull requests ensures there is context to changes being made and greatly enhances the code review process. Providing associated Issues that this resolves also easily connects the reason.

Change(s):

  • Updated syntax for XYZ.yaml

Reason for Change(s):

Version updated:

  • Yes
  • Detections/Analytic Rule templates are required to have the version updated

The code should have been tested in a Microsoft Sentinel environment that does not have any custom parsers, functions or tables, so that you validate no incorrect syntax and execution functions properly. If your submission requires a custom parser or function, it must be submitted with the PR.

Testing Completed:

  • Yes/No/Need Help

Note: If updating a detection, you must update the version field.

Before the submission has been made, please look at running the KQL and Yaml Validation Checks locally.
https://github.com/Azure/Azure-Sentinel#run-kql-validation-locally

Checked that the validations are passing and have addressed any issues that are present:

  • Yes/No/Need Help

Note: Let us know if you have tried fixing the validation error and need help.

References:


@v-sabiraj v-sabiraj requested review from a team as code owners November 27, 2024 13:31
@v-atulyadav v-atulyadav added Connector Connector specialty review needed Solution Solution specialty review needed labels Nov 28, 2024
@v-prasadboke v-prasadboke marked this pull request as draft November 28, 2024 11:25
Comment on lines +64 to +65
# elif event_type == "com.oraclecloud.loadbalancer.error":
# return "OCI_LoadBalancerLogs"

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
# return "OCI_LoadBalancerLogs"
if event["type"] == "com.oraclecloud.Audit.ListEvents":
return "OCI_AuditLogs"
if event["type"] == "com.oraclecloud.vcn.flowlogs.DataEvent" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.NoData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcn" or event["type"] == "com.oraclecloud.virtualNetwork.ListVcns" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.SkipData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcnDnsResolverAssociation":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would change this to use contains so we won't miss any data types

@@ -65,7 +65,15 @@ def determine_log_type(event):
# return "OCI_LoadBalancerLogs"
if event["type"] == "com.oraclecloud.Audit.ListEvents":
return "OCI_AuditLogs"
if event["type"] == "com.oraclecloud.vcn.flowlogs.DataEvent" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.NoData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcn" or event["type"] == "com.oraclecloud.virtualNetwork.ListVcns" or event["type"] == "com.oraclecloud.vcn.flowlogs.QualityEvent.SkipData" or event["type"] == "com.oraclecloud.virtualNetwork.GetVcnDnsResolverAssociation":
if event["type"] == "com.oraclecloud.computeApi.ListVolumeAttachments" or event["type"] == "com.oraclecloud.computeApi.ListVnicAttachments" or event["type"] == "com.oraclecloud.computeApi.ListBootVolumeAttachments" or event["type"] == "com.oraclecloud.computeApi.GetInstance":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As i said before we should do a contains in order to classifiy each log type instead of parssing each type,

reason:
in the future there is an option that it may be a new event data type for example :
com.oraclecloud.vcn.newqtype

because we are using == instead of in this log will be sent to the defualt talbe and not to the relevant one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Connector Connector specialty review needed Solution Solution specialty review needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants