More Info:
Object Storage buckets should have object-level logging enabled. Logging is critical for monitoring access patterns, investigating potential security incidents, and meeting rigorous compliance auditing requirements.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS AWS
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- FedRAMP
- GDPR
- HIPAA
- HITRUST CSF
- ISO 27001
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To enable write‑level logging for OCI Object Storage buckets using the OCI Console:
-
Sign in & choose compartment
- Log in to the OCI Console.
- In the top-left, select the Compartment where the bucket resides (or where you want the log group to live).
-
Create (or select) a Log Group
- Open the navigation menu → Observability & Management → Logging → Log Groups.
- Choose the correct compartment.
- Either:
- Select an existing Log Group, or
- Click Create Log Group, give it a name and (optionally) description, and click Create.
-
Create a Write‑Level Object Storage Log
- Within the chosen Log Group, click Create Log.
- Configure:
- Log Name: e.g.,
object-storage-write-logs. - Service: select Object Storage.
- Resource:
- Choose Bucket, then pick the specific Bucket you want to monitor.
- Log Category / Log Type: select Write (or Object Storage - Write, depending on UI wording).
- Log Name: e.g.,
- Leave other options (retention, etc.) as needed for your policy.
- Click Create (or Enable).
-
Verify Logging Is Enabled
- On the bucket details page:
- Navigate to Storage → Buckets.
- Open the bucket, then look for Logging or Logs section.
- Confirm a Write log is attached (or confirm from the Logging → Logs page that the log is
Active).
- Optionally, view recent log entries under Logging → Logs → select your log → Log Explorer to confirm write operations (PUT/DELETE, etc.) are recorded.
- On the bucket details page:
-
Repeat for All Relevant Buckets
- Repeat steps 3–4 for each bucket that must comply with the requirement.
Using CLI
Using CLI
Below is a minimal step‑by‑step using OCI CLI to enable write‑level logging for an Object Storage bucket (i.e., to send write operations to OCI Logging for monitoring).Assumptions:
Save the output as:
Save the output as:(If reusing an existing group, get its OCID with
This configures a service log for Object Storage with the write category, bound to the specific bucket OCID.
You should see
- You already have OCI CLI configured (
oci setup configcompleted). - You know the compartment OCID and bucket name.
1. Get the bucket OCID
2. Create (or reuse) a Log Group
If you already have a log group, skip to step 3.oci logging log-group list.)3. Create a write‑level service log for the bucket
4. Verify the log is enabled
"is-enabled": true and "configuration.source.category": "write".That’s all that is required to remediate: the bucket now has write‑level logging enabled via OCI Logging, using OCI CLI.Using Python
Using Python
Below is a minimal, end‑to‑end way to enable write‑level (DATA_WRITE) logging for an OCI Object Storage bucket using Python and the OCI SDK.
To satisfy “write‑level logging”, you must enable the
1. Prerequisites
- Install OCI SDK:
-
Configure your OCI credentials (tenancy, user, key, region, etc.) via:
~/.oci/config(default profile), or- Environment variables / instance principal / resource principal.
-
Collect:
- Compartment OCID where the bucket lives.
- Bucket OCID (not just name). You can get this via Console or SDK:
- In the Console: Object Storage → Bucket → Bucket details → OCID.
2. Get or Create a Log Group
You need a Log Group in the same compartment to hold the bucket logs.3. Create/Enable a Write‑Level Log for the Bucket
In the Logging service, Object Storage has categories such aswrite and read.To satisfy “write‑level logging”, you must enable the
write category for the bucket.4. (Optional) Send Logs to Monitoring / Metrics
If by “Storage Monitoring” you also want metrics or alarms:- Create a Service Connector (Console or SDK) with:
- Source: Logging (your log group/log).
- Target: Monitoring / Logging Analytics / Object Storage.
- Build Monitoring queries/alarms on those logs/derived metrics.
Using Terraform
Using Terraform
terraform plan should show + (create) for oci_logging_log_group.OBJECTSTORAGE_LOG_GROUP and oci_logging_log.OBJECTSTORAGE_WRITE_LOG, with is_enabled = true, service = "objectstorage", category = "write", and resource set to the bucket OCID.
