More Info:
Event Rules must trigger on Cloud Guard Problem Detected signals. Connecting Cloud Guard problems to Event Rules allows for automated, serverless remediation of identified vulnerabilities.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- 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
- HITRUST CSF
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are the exact steps in the OCI Console to create an Event Rule for Cloud Guard problems and connect it to alerting (via Notifications). This is what most security benchmarks are checking for.
Prerequisites
-
Cloud Guard is enabled
- Go to: Navigation Menu → Identity & Security → Cloud Guard
- If Cloud Guard is not enabled:
- Click Enable Cloud Guard
- Choose Target (e.g., root compartment/tenant)
- Save
-
Notification Topic & Subscription exist (for email/Slack/etc.)
- Go to: Navigation Menu → Developer Services → Notifications (ONS)
- Click Create Topic
- Name: e.g.,
cloudguard-problems-alerts - Description: e.g.,
Alerts for Cloud Guard problems - Compartment: choose correctly
- Click Create
- Name: e.g.,
- Open the topic → Create Subscription
- Protocol: e.g., Email
- Endpoint: your email address
- Click Create
- Go to your email and confirm the subscription.
Step 1 – Create an Event Rule for Cloud Guard Problems
-
In OCI Console, go to:
Navigation Menu → Observability & Management → Events Service → Rules - Click Create Rule.
-
Basic Information
- Name: e.g.,
cloudguard-problems-events-rule - Description:
Trigger notifications when Cloud Guard problems are created/updated - Compartment: pick the compartment where you want the rule to live (typically root or security compartment).
- Name: e.g.,
-
Rule Conditions
- In “Rule Conditions,” choose:
- Rule Type: Event Type
- Service Name: select Cloud Guard
- Event Type: add the relevant ones, for example:
com.oraclecloud.cloudguard.problem.createcom.oraclecloud.cloudguard.problem.update- (Optionally)
com.oraclecloud.cloudguard.problem.stateChange
- You can add multiple event types to the same rule.
- In “Rule Conditions,” choose:
-
Actions
- Under Actions, click Add Action.
- Action Type: Notifications
- Topic: select the topic you created earlier (e.g.,
cloudguard-problems-alerts). - Click Add Action.
- Click Create Rule.
Step 2 – (Optional) Tie into Monitoring/Alarms
If your requirement is to route through Monitoring/Alarms (for metrics-based alerting dashboards):- Typically, Cloud Guard problems are event-based, not metric-based. Monitoring Alarms mainly work off metrics.
- Recommended pattern:
- Keep the Event Rule → Notifications you just created for immediate alerts.
- If you have custom metrics or a log-based metric about Cloud Guard problems, you can:
- Create a Monitoring Alarm on that metric.
- Configure the alarm to send notifications to the same Notifications topic.
Validation
- In Cloud Guard → Problems, create or simulate a problem (if possible) or trigger a known rule.
- Confirm:
- The Event Rule shows as Active.
- The subscription endpoint (email, etc.) receives an alert when a problem is created or updated.
Using CLI
Using CLI
Below is a minimal, end‑to‑end way to create an Event Rule for Cloud Guard Problems and wire it into OCI Alerting (Notifications / Monitoring) using OCI CLI.Assumptions:
Get the topic OCID:
Confirm the email subscription from your inbox.
Adjust compartment IDs as needed.
You can relax the filter by removing the
(Adjust the namespace/query to match your Cloud Guard metric configuration; they can vary by region/tenant and feature set.)
After this:
- You already have
ociCLI configured. - You have permissions to create policies, topics, and event rules.
1. (Optional) Enable Cloud Guard
If Cloud Guard isn’t already enabled:2. Create an OCI Notifications Topic
3. Add a Subscription (for Email Alerting)
4. Create IAM Policy for Events to Publish to ONS
In the compartment (or tenancy) that holds the topic, create a policy like:5. Create the Cloud Guard Problems Event Rule (via CLI)
5.1 Define the Rule Condition
Typical event types for Cloud Guard problems:com.oraclecloud.cloudguard.problemdetectedcom.oraclecloud.cloudguard.problemresolvedcom.oraclecloud.cloudguard.problemupdated(optional)
riskLevel block if you want all problems.5.2 Define the Actions (Send to the ONS Topic)
5.3 Create the Event Rule
6. (Optional) Tie into Monitoring Alarms
If you want Monitoring Alarms (e.g., metrics-based) to also notify on the same topic:After this:
- New / updated / resolved Cloud Guard problems that match your rule condition will trigger the Event Rule.
- The Event Rule publishes to the Notifications topic, which sends alert emails (and can be reused by Monitoring alarms).
Using Python
Using Python
Below is a step‑by‑step remediation using Python and the OCI SDK to ensure OCI Events has a rule for Cloud Guard problems and routes them to alerting (Notifications / Monitoring).
Confirm the email when OCI sends the verification email.
(Adjust
This completes remediation: OCI Monitoring / alerting is now wired via an Events rule listening for Cloud Guard problems and publishing to a Notifications topic using Python.
1. Prerequisites
-
Install OCI Python SDK:
-
Ensure you have an OCI config file at
~/.oci/configwith: - Cloud Guard must already be enabled in the tenancy.
2. Create a Notifications Topic (for Alerts)
You will use Notifications as the alerting backend which Monitoring alarms can also publish to.3. (Optional) Add a Subscription to the Topic
Add an email subscription so people receive alerts.4. Create an Events Rule for Cloud Guard Problems
The rule listens for Cloud Guard problem events and sends them to the Notifications topic.Common Cloud Guard event types include:com.oraclecloud.cloudguard.problemdetectedcom.oraclecloud.cloudguard.problemupdatedcom.oraclecloud.cloudguard.problemresolved
5. (Optional) Create Monitoring Alarm That Publishes to Same Topic
If you also want a traditional Monitoring alarm (metrics‑based) to publish to the same topic:namespace and query to match your actual Cloud Guard metrics if you use a metrics‑based alarm.)6. Validate
-
In OCI Console:
- Go to Developer Services → Events: confirm the rule exists and is enabled.
- Go to Notifications → Topics: confirm the topic and subscription.
- (If created) Go to Monitoring → Alarms: confirm alarm exists and uses the topic.
- Trigger a test Cloud Guard problem (or use an existing one) and verify an email/notification is received.
This completes remediation: OCI Monitoring / alerting is now wired via an Events rule listening for Cloud Guard problems and publishing to a Notifications topic using Python.
Using Terraform
Using Terraform
condition and is_enabled on oci_events_rule is an in‑place change and does not force replacement of the rule.To verify, terraform plan should show an update to the existing oci_events_rule (or creation of a new one) where condition now includes eventType = ["com.oraclecloud.cloudguard.problemdetected"] and the rule is is_enabled = true, along with any configured actions.
