More Info:
Notification topics must have at least one active subscription (e.g., Email, Slack, PagerDuty). An un-subscribed topic creates a black hole where critical security alerts are dropped.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Well Architected Framework
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate “Monitoring Notification Topics Should Have Active Subscriptions” in OCI Alerting using the OCI Console, you need to add and confirm at least one active subscription to each Notification Topic used by alarms.
1. Identify the affected Notification Topics
- Sign in to the OCI Console.
- From the left menu, go to Observability & Management → Alarms.
- Check your alarms and note the Notification Topic (OCID or name) used in each alarm that is flagged in your scan/report.
2. Open the Notification Topic
- In the Console, go to Developer Services → Application Integration → Notifications
(in some UIs: Application Integration → Notifications directly). - Ensure the correct Compartment is selected.
- Click Topics.
- Locate and click the Topic used by your alarm (by name or OCID).
3. Create a Subscription for the Topic
- Inside the Topic details page, go to the Subscriptions tab.
- Click Create Subscription.
- Choose a Protocol, for example:
- PagerDuty
- Slack
- HTTPS (custom webhook)
- Function (OCI Functions)
- Enter the appropriate endpoint:
- Email: the email address that should receive alerts.
- HTTPS: the webhook URL.
- Slack/PagerDuty: the integration endpoint.
- Click Create.
4. Confirm/Activate the Subscription
The subscription must be confirmed for it to be considered active.For Email:- The specified address receives a confirmation email from OCI.
- Open the email and click the Confirm subscription link.
- After confirmation, go back to the Topic → Subscriptions tab and verify the Status is Active.
- Ensure the endpoint correctly responds to OCI’s confirmation/handshake (if required).
- Check that the subscription status in OCI moves from Pending to Active.
- If it remains Pending, verify networking, SSL certificates, and endpoint behavior.
5. (Optional) Test the Alert Path
- From the Topic page, click Publish Message (or Publish to Topic) if available.
- Send a test message and confirm it reaches the configured endpoint (email, webhook, etc.).
6. Re‑run Compliance/Scan
Re-run your security/compliance tool or check after its next cycle to verify the finding is cleared: the topic now has at least one Active subscription.Using CLI
Using CLI
Below are concise, CLI-focused steps to identify and remediate “OCI Monitoring Notification Topics Should Have Active Subscriptions” using the OCI CLI.
This shows all topics and their OCIDs.
Look at
Notes:
Ensure at least one subscription shows
Ensure each
These steps will remediate the policy “Notification Topics Should Have Active Subscriptions” for OCI Monitoring Alerting using the OCI CLI.
1. Prerequisites
- OCI CLI installed and configured (
oci setup configdone). - OCID of the compartment where topics exist.
- Appropriate IAM permissions for Notifications and Monitoring.
2. Find Notification Topics
3. Check Topics for Active Subscriptions
For each topic, check subscriptions and their lifecycle state:lifecycle-state:PENDING– not confirmed (email/SMS not activated).ACTIVE– good.- No subscriptions or none
ACTIVE– non-compliant.
4. Create a Subscription (Remediation)
4.1 Email Subscription Example
- The subscription will initially be
PENDING. - The recipient must click the confirmation link in the email for it to become
ACTIVE. - Using
--wait-for-state ACTIVEonly works once the confirmation is done; otherwise it will time out.
4.2 Other Protocols (e.g., HTTPS)
5. Confirm Subscription Is Active
After confirming (via email or endpoint), check status:state: ACTIVE.6. (Optional) Bulk Remediation: Add a Standard Email to All Non-Compliant Topics
7. Validate Monitoring Alarms Use These Topics
List alarms and their destinations:topic OCID has at least one ACTIVE subscription as verified above.These steps will remediate the policy “Notification Topics Should Have Active Subscriptions” for OCI Monitoring Alerting using the OCI CLI.
Using Python
Using Python
To remediate “OCI Monitoring Notification Topics Should Have Active Subscriptions” using Python, you essentially need to:
- Find notification topics used by Monitoring (Alarm) rules.
- Check each topic’s subscriptions for at least one
ACTIVEsubscription. - For topics with no active subscriptions, create a new subscription (e.g., email or HTTPS).
1. Prerequisites
-
Python and SDK
-
OCI Config
- Have
~/.oci/configconfigured with:- tenancy
- user
- fingerprint
- key_file
- region
- Or use instance principal / resource principal if running on OCI.
- Have
-
Permissions
The principal (user or instance) must have policies that allow:
2. High-Level Logic
- List all alarms (or alarms in a specific compartment).
- Extract the
destinations(OCIDs of notification topics) from each alarm. - For each topic:
- List subscriptions.
- Check if any subscription has
lifecycle_state == "ACTIVE".
- If no active subscription:
- Create a new subscription with:
protocol: e.g.,"EMAIL"or"HTTPS".endpoint: your email or webhook URL.
- Create a new subscription with:
Note: Email subscriptions require manual confirmation via the email link. Programmatically you can only create them; activation happens when the user clicks the link.
3. Example Python Script
Adjust the values in theCONFIG section to your environment.4. How to Use
- Replace:
COMPARTMENT_OCIDREGIONDEFAULT_SUB_PROTOCOLDEFAULT_SUB_ENDPOINT
- Ensure your OCI config/policies are correct.
- Run:
- Inspect all active alarms in the specified compartment.
- Identify their notification topics.
- Ensure each of those topics has at least one ACTIVE subscription (or at least a newly created one waiting for confirmation if email).
Using Terraform
Using Terraform
var.COMPARTMENT_OCIDwith your compartment OCID (or a literal OCID string).SECURITY_TEAM_EMAIL@example.comwith the real email (or HTTPS/Slack/PagerDuty endpoint).- Adjust the alarm’s
namespaceandqueryto match your actual Monitoring configuration.
oci_ons_subscription is non‑destructive and does not force replacement of the topic or alarms.For verification, terraform plan should show:- Creation of one or more
oci_ons_subscriptionresources attached to eachoci_ons_notification_topicthat previously had no subscriptions, and - No planned destruction or recreation of the existing
oci_ons_notification_topicresources.

