Skip to main content

More Info:

Event rules must monitor Identity Provider configurations. An attacker modifying SAML or IdP settings can create persistent, untraceable backdoor access to the cloud environment.

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 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
  • 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 CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • PCI
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

Below are the steps to configure an Event Rule in OCI for Identity Provider changes and wire it into alerting using the OCI Console.

1. Prerequisites

  1. You need permissions to:
    • Manage Events rules
    • Manage Notifications topics/subscriptions
    • Read IAM events
      (Typically manage events-rules, manage ons-topics, etc., in the target compartment.)
  2. Decide which compartment you want the rule to apply to (usually your IAM “home” compartment or root compartment).

2. Create / Verify a Notifications Topic

  1. In the OCI Console, open the menu and go to:
    Observability & Management → Notifications.
  2. On the Topics page, choose the correct compartment.
  3. Click Create Topic (or select an existing topic if you already have one).
  4. Enter:
    • Name: e.g., idp-change-alerts-topic
    • Description: e.g., Alerts when OCI Identity Providers are created, updated, or deleted
  5. Click Create Topic.

Add a Subscription (email / other)

  1. Open the topic you just created.
  2. Click Create Subscription.
  3. Choose Protocol (e.g., Email).
  4. Enter the Endpoint (e.g., your email address).
  5. Click Create.
  6. Check your email and confirm the subscription.

3. Create an Event Rule for Identity Provider Changes

  1. In the OCI Console, open the menu:
    Observability & Management → Events Service → Rules.
  2. Choose the compartment where you want the rule.
  3. Click Create Rule.

Configure Basic Details

  1. Name: idp-change-detection-rule
  2. Description: Triggers when Identity Providers are created, updated, or deleted
  3. Rule Status: leave as Enabled.

Set the Condition (Event Pattern)

  1. Under Rule Conditions, choose:
    • Condition Type: Event Type
  2. Select:
    • Service Name: Identity and Access Management
    • Event Types: Select all that are relevant, for example (names may be shown in your region as):
      • CreateIdentityProvider
      • UpdateIdentityProvider
      • DeleteIdentityProvider
  3. If there is a compartment scope option, ensure it covers:
    • The compartment(s) where your IdPs reside (often the tenancy root).
(If the UI presents a JSON event pattern editor, ensure the eventType list includes the IdP events, e.g. com.oraclecloud.identity.createidentityprovider, updateidentityprovider, deleteidentityprovider.)

4. Attach an Action to Send Alerts

  1. In the Actions section of the rule:
    • Choose Action Type: Notifications
  2. Select the Topic you created earlier:
    idp-change-alerts-topic
  3. Save the action.

5. Create the Rule

  1. Review all details.
  2. Click Create (or Create Rule).
The rule is now active: any Identity Provider create/update/delete operation will publish an event, which the rule forwards to the Notifications topic, which in turn sends alerts (email, PagerDuty, HTTPS, etc., depending on your subscriptions).

6. (Optional) Test the Setup

  1. Make a safe change to an Identity Provider (e.g., tweak a description) or create a test IdP.
  2. Confirm you receive the notification through your configured subscription.

This completes configuring “OCI Monitoring/Alerting” for Identity Provider changes using the Events Service + Notifications in the OCI Console.
Below are concise, step‑by‑step instructions to create an Event Rule for Identity Provider (IdP) changes and wire it into OCI Monitoring/Alerting using the OCI CLI.Assumptions:
  • You have OCI CLI configured (oci setup config already done).
  • You know your:
    • COMPARTMENT_OCID
    • TOPIC_NAME for notifications (you can create one)
    • Region/profile set in ~/.oci/config.

1. Create an OCI Notifications Topic (if you don’t already have one)

Save the output as TOPIC_OCID.

2. (Optional) Add a Subscription to the Topic

Example: email subscription
Confirm the subscription via the email you receive.

3. Build the Event Rule Condition for IdP Changes

Create a JSON file named idp-events-condition.json:
These event types cover create, update, and delete of Identity Providers.

4. Create the Event Rule with Action to Send to Notifications

Create a JSON file for actions, idp-events-actions.json:
Replace <TOPIC_OCID> with the real OCID (or use env substitution before calling).Now create the Event Rule:
This creates an Event Rule that:
  • Listens for Identity Provider create/update/delete events in the compartment.
  • Sends those events to your Notifications topic.

5. (Optional) Confirm the Rule

List rules:
Show rule details:

6. (Optional) Integrate with Monitoring Alarms (if needed)

If you want Monitoring alarms (metrics-based) in addition to Event Notifications, the common pattern is:
  1. Use Event Rule → Service Connector → Logging or Streaming.
  2. From logs/stream, derive metrics or alerts.
Most compliance checks for “Event Rule for Identity Provider Changes” are satisfied simply by the Event Rule + Notifications created above.
If you tell me your exact compartment OCID and preferred notification type (email / Slack via HTTPS / PagerDuty, etc.), I can give you the exact ready‑to‑paste CLI commands.
Below is a practical way to set up an OCI Event Rule that detects Identity Provider changes and triggers an alert using Python and the OCI SDK.

1. Prerequisites

  • OCI CLI config file (~/.oci/config) with a profile that has:
    • events-rules-manage
    • ons-topics-manage
    • ons-subscriptions-manage
    • Permissions in a policy such as:
  • Python packages:
  • Know your:
    • compartment_ocid
    • region
    • Notification target email (or HTTPS endpoint).

2. What we’re creating

  1. Notifications Topic (ONS).
  2. Subscription (e.g., email).
  3. Events Rule that matches Identity Provider changes and sends events to the topic.
Event types for Identity Provider changes (Identity Control Plane):
  • com.oraclecloud.identitycontrolplane.createidentityprovider
  • com.oraclecloud.identitycontrolplane.updateidentityprovider
  • com.oraclecloud.identitycontrolplane.deleteidentityprovider

3. Python Script


4. Verification steps

  1. Confirm email subscription from the OCI Notifications email.
  2. Perform a test Identity Provider change:
    • Create, update, or delete an IdP in IAM (Federation → Identity Providers).
  3. Check your inbox for alert emails triggered by the event rule.
This script fully automates the remediation: OCI Monitoring/Alerting for Identity Provider changes via Events + Notifications using Python.
This update is in-place; it does not force replacement of the rule, only changes its match condition and target. After applying, terraform plan should show the oci_events_rule.identity_provider_changes either being created or having its condition, is_enabled, and/or actions updated to match the above.