Skip to main content

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

Medium

Address

Compliance, Security

Compliance 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

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

  1. Sign in to the OCI Console.
  2. From the left menu, go to Observability & Management → Alarms.
  3. 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

  1. In the Console, go to Developer Services → Application Integration → Notifications
    (in some UIs: Application Integration → Notifications directly).
  2. Ensure the correct Compartment is selected.
  3. Click Topics.
  4. Locate and click the Topic used by your alarm (by name or OCID).

3. Create a Subscription for the Topic

  1. Inside the Topic details page, go to the Subscriptions tab.
  2. Click Create Subscription.
  3. Choose a Protocol, for example:
    • Email
    • PagerDuty
    • Slack
    • HTTPS (custom webhook)
    • Function (OCI Functions)
  4. Enter the appropriate endpoint:
    • Email: the email address that should receive alerts.
    • HTTPS: the webhook URL.
    • Slack/PagerDuty: the integration endpoint.
  5. Click Create.

4. Confirm/Activate the Subscription

The subscription must be confirmed for it to be considered active.For Email:
  1. The specified address receives a confirmation email from OCI.
  2. Open the email and click the Confirm subscription link.
  3. After confirmation, go back to the Topic → Subscriptions tab and verify the Status is Active.
For HTTPS/Slack/PagerDuty:
  1. Ensure the endpoint correctly responds to OCI’s confirmation/handshake (if required).
  2. 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

  1. From the Topic page, click Publish Message (or Publish to Topic) if available.
  2. 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.
Below are concise, CLI-focused steps to identify and remediate “OCI Monitoring Notification Topics Should Have Active Subscriptions” using the OCI CLI.

1. Prerequisites

  • OCI CLI installed and configured (oci setup config done).
  • OCID of the compartment where topics exist.
  • Appropriate IAM permissions for Notifications and Monitoring.
Assume:

2. Find Notification Topics

This shows all topics and their OCIDs.

3. Check Topics for Active Subscriptions

For each topic, check subscriptions and their lifecycle state:
Look at lifecycle-state:
  • PENDING – not confirmed (email/SMS not activated).
  • ACTIVE – good.
  • No subscriptions or none ACTIVEnon-compliant.
To find non-compliant topics programmatically:

4. Create a Subscription (Remediation)

4.1 Email Subscription Example

Notes:
  • 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 ACTIVE only works once the confirmation is done; otherwise it will time out.
If you prefer not to wait:

4.2 Other Protocols (e.g., HTTPS)


5. Confirm Subscription Is Active

After confirming (via email or endpoint), check status:
Ensure at least one subscription shows 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:
Ensure each 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.
To remediate “OCI Monitoring Notification Topics Should Have Active Subscriptions” using Python, you essentially need to:
  1. Find notification topics used by Monitoring (Alarm) rules.
  2. Check each topic’s subscriptions for at least one ACTIVE subscription.
  3. For topics with no active subscriptions, create a new subscription (e.g., email or HTTPS).
Below is a concise step‑by‑step guide and example Python script using the OCI Python SDK.

1. Prerequisites

  1. Python and SDK
  2. OCI Config
    • Have ~/.oci/config configured with:
      • tenancy
      • user
      • fingerprint
      • key_file
      • region
    • Or use instance principal / resource principal if running on OCI.
  3. Permissions The principal (user or instance) must have policies that allow:

2. High-Level Logic

  1. List all alarms (or alarms in a specific compartment).
  2. Extract the destinations (OCIDs of notification topics) from each alarm.
  3. For each topic:
    • List subscriptions.
    • Check if any subscription has lifecycle_state == "ACTIVE".
  4. If no active subscription:
    • Create a new subscription with:
      • protocol: e.g., "EMAIL" or "HTTPS".
      • endpoint: your email or webhook URL.
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 the CONFIG section to your environment.

4. How to Use

  1. Replace:
    • COMPARTMENT_OCID
    • REGION
    • DEFAULT_SUB_PROTOCOL
    • DEFAULT_SUB_ENDPOINT
  2. Ensure your OCI config/policies are correct.
  3. Run:
This will:
  • 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).
Substitute:
  • var.COMPARTMENT_OCID with your compartment OCID (or a literal OCID string).
  • SECURITY_TEAM_EMAIL@example.com with the real email (or HTTPS/Slack/PagerDuty endpoint).
  • Adjust the alarm’s namespace and query to match your actual Monitoring configuration.
No existing topics are destroyed; adding 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_subscription resources attached to each oci_ons_notification_topic that previously had no subscriptions, and
  • No planned destruction or recreation of the existing oci_ons_notification_topic resources.