top of page

Audit the actions performed on Object Storage using OCI: Observability &Management – Logging Analytics : Part 2

  • Writer: aashish allumalla
    aashish allumalla
  • Apr 2, 2024
  • 3 min read

This is the continuation for part 1 where we discussed about the use case, pre-requisite creations.


Here's the link to access -



In this part we would be discussing about the actual resource creation and the exercise.


Audit actions performed on an Object Storage using Logging Analytics:


This exercise has a series of steps which needs to be followed -- 


  • Creation of Log Group

  • Creation of object storage.

  • Enable Read, Write logs for Object Storage.

  • Creation of Log Group in Logging Analytics.

  • Creation of Service Connector.

  • Creation of Entities in Logging Analytics.

  • Use Logging Explorer to explore the logs ingested into Logging Analytics – Log Groups.

  • Creation of Dashboards.


Please note that all the activities from now on will be created by the user under SuperAdmins Group.


Creation of Log Group:


A log group under Logging needs to be created to ingest the logs enabled for Object Storage. This needs to be created under LE-OnM compartment.


ree

Creation of Object Storage:


Let’s create an Object Storage as below with Emit Object Events feature enabled.


ree

Enable Read, Write logs for Object Storage:


Enable the Read Access & Write Access Events Logs available under Resources -> Logs.


ree

Hit the Not enabled Toggle to enable the Logs.

Select the Log Group which was created in the previous step for storing the access event logs.


ree

Once enabled, it would look as below –


ree

Creation of Log Group in Logging Analytics:


Steer to Logging Analytics -> Administration for creating Log Groups. Log Groups under Logging Analytics is required to ingest the Logs received from Log Groups under Logging Service.


Create a Log Group as below -



ree

Creation of Service Connector:


A service connector needs to be created for pushing the logs under Logging -> Log Groups to Logging Analytics -> Log Groups.


ree

Under Configure Service Connector section, the source would be Logging and Target would be Logging Analytics.



ree

The Logs configured for Read & Write access events of the object storage needs to be tagged as source under Configure Source section as shown above.



ree

The target would be Log Group under Logging Analytics -> Log Group -> LE-Bucket-Audit.

A policy would be created as a part of this service connector creation which needs to be created as you see in the image above.


ree

Click on Service Connector creation.

Following is the policy created as a part of service connector creation –


ree

allow any-user to {LOG_ANALYTICS_LOG_GROUP_UPLOAD_LOGS} in compartment id ocid1.compartment.oc1..****** where all {request.principal.type='serviceconnector', target.loganalytics-log-group.id='ocid1.loganalyticsloggroup.oc1.ap-hyderabad-1.******', request.principal.compartment.id='ocid1.compartment.oc1..*******'}


ree

Creation of Entities in Logging Analytics:


An Entity of type Object Storage would need to be created under Logging Analytics. Only once the entity is created, it would be available under Logging Explorer to explore the logs.


ree

Use Logging Explorer to explore the logs ingested into Logging Analytics – Log Groups:


ree

Select the appropriate Log group compartment, Region & Entity created to get the logs.

Edit the Log Explorer Query to suit our needs. In our case, I just want to display the insert or delete operations done on the object storage we created.


* and Action = PUT or DELETE | fields -Label, -'Problem Priority', -'Host Name (Server)', 'Host IP Address (Client)', Principal, Action


Select the appropriate display options for the results.


ree

Creation of Dashboards:


ree

Click on actions as shown above and Hit Save As, Use Create New Dashboard option and save it as image below –          


ree

Steer to dashboards and select the dashboard just created.


ree

Filter the date parameters as per our requirement to project data and use multiple options available under Action to download the data in csv or any format required.


ree

References:



Thanks for going through, please leave a comment in case you have any queries or if you want me to test any new scenario.



Comments


Drop Me a Line, Let Me Know What You Think

Thanks for submitting!

copyrights @letsdosometech.com

bottom of page