Skip to main content

More Info:

Event rules must monitor IdP-to-Group mappings. Modifying mappings allows an attacker to map standard federated users to highly privileged OCI administrator groups.

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 exact steps to configure alerting in OCI (via Events + Notifications) for IdP Group Mapping changes using the OCI Console.

1. Identify/Decide Your Target Compartment

  1. Log in to OCI Console.
  2. In the top-left, select the correct region.
  3. From the compartment selector (left side), choose the compartment where your IAM/Identity Domain resources and Events rule will live (often a central security/landing-zone compartment).

2. Create (or Reuse) a Notifications Topic

  1. Open the navigation menu → Developer ServicesNotificationsTopics.
  2. Click Create Topic.
  3. Enter:
    • Name: e.g. idp-group-mapping-changes-topic
    • Description: e.g. Alerts for IdP group mapping create/update/delete
    • Compartment: same as chosen in step 1.
  4. Click Create.

Add a Subscription (email, Slack, etc.)

  1. Click the topic you just created.
  2. Under Subscriptions, click Create Subscription.
  3. Choose a Protocol:
    • Email for simple alerts
    • HTTPS, Slack (via HTTPS), etc. as needed.
  4. Enter the endpoint (email address or webhook URL).
  5. Click Create.
  6. If you used Email, check your email and confirm the subscription (must be done once).

3. Create an Event Rule for IdP Group Mapping Changes

  1. Open the navigation menu → Observability & ManagementEvents ServiceRules.
  2. Click Create Rule.

3.1. Basic Info

  1. Name: e.g. idp-group-mapping-change-rule
  2. Description: e.g. Triggers when IdP group mappings are created, updated or deleted
  3. Compartment: same as earlier (security/central compartment).

3.2. Define the Condition (Event Pattern)

You want to match IdP group mapping changes. These are IAM / Identity events. Depending on UI version and tenancy setup you’ll see one of the following patterns.

Option A – Using Event Type Picker (Preferred if Available)

  1. Under Rule Condition, select Event Type.
  2. Service: choose Identity (or IAM, or Identity Domains, depending on your tenancy UI).
  3. Under Event Type, select all that apply for IdP Group Mappings, e.g. (names may vary slightly by region/tenant):
    • com.oraclecloud.identitycontrolplane.createidpgroupprovisioning
    • com.oraclecloud.identitycontrolplane.updateidpgroupprovisioning
    • com.oraclecloud.identitycontrolplane.deleteidpgroupprovisioning
    If the UI offers “IdP Group Mapping” as a resource type filter, select:
    • Resource Type: IdpGroupMapping (or similar)
    • Then pick the create/update/delete event types.
If you don’t see exactly those names, search for “idp”, “group mapping”, or “provisioning” in the event type dropdown and select the create/update/delete events that relate to IdP group mappings.

Option B – Using an Advanced Event Pattern (If Necessary)

  1. Change the condition type to Event Pattern (Advanced).
  2. Use a JSON pattern similar to:
Adjust eventType strings to match what’s documented/available for your tenancy (case and exact names matter).

3.3. Configure the Action

  1. Under Actions, click Add Action.
  2. Action Type: choose Notifications.
  3. Topic: select the topic you created earlier, e.g. idp-group-mapping-changes-topic.
  4. (Optional) Add a comment/description for the action.
  5. Click Add Action.

4. Enable and Save the Rule

  1. Ensure Rule State is set to Enabled.
  2. Click Create Rule (or Save).

5. Test the Alert

  1. Go to Identity & SecurityFederation / Identity Providers (or Identity Domains, depending on your setup).
  2. Perform a safe IdP group mapping change (for example, add a test mapping or modify a non-critical one).
  3. Within a short period, confirm:
    • The Events rule is listed as having triggered (Events → Rules → your rule → check metrics/logs if enabled).
    • Your notification endpoint (email inbox, Slack channel, etc.) receives the alert message.

This configuration ensures any create, update, or delete of OCI IdP Group Mappings triggers an Event Rule and sends an alert via Notifications, satisfying the “OCI Monitoring Should Have Event Rule For IDP Group Mapping Changes” requirement using the OCI Console.
Below is a minimal, CLI-only way to set up an OCI Event Rule that alerts on IdP group mapping changes.Assumptions:
  • You have oci CLI configured with a profile that can manage Identity, Events, and Notifications.
  • You know your tenancy OCID and the compartment where you want the rule to live (typically the root compartment).

1. Set environment variables (for convenience)


2. Create a Notifications topic

Capture the topic-id from the output (or extract via jq):

3. Create an email subscription on the topic

Then confirm the subscription from the email you receive.

4. Prepare the Event Rule condition JSON

Create condition.json with the relevant event types for IdP group mapping changes:
Replace <TENANCY_OR_ROOT_COMPARTMENT_OCID> with your actual COMPARTMENT_ID or tenancy OCID, then:

5. Prepare the Event Rule actions JSON

Create actions.json pointing to the Notifications topic:

6. Create the Event Rule via OCI CLI


7. (Optional) Verify the rule

This completes the monitoring/alerting setup for IdP group mapping changes via the OCI CLI.
Below is a concrete way to enforce:“OCI Monitoring should have an event rule for IdP Group Mapping changes”using Python + OCI SDK (Events + Notifications), so that any IdP Group Mapping change triggers an alert.

1. What you will create

  1. OCI Notifications Topic – target for alerts.
  2. Subscription – e.g., email/Slack/HTTPS endpoint.
  3. OCI Events Rule – listens for IdP Group Mapping changes in IAM and publishes to the topic.
You do this in a compartment (often the root compartment).

2. Prerequisites

  1. Install OCI Python SDK:
  2. Configure credentials:
    This generates ~/.oci/config with:
    • tenancy
    • user
    • fingerprint
    • key_file
    • region
  3. Keep ready:
    • COMPARTMENT_OCID – where to create the rule & topic (often root compartment).
    • A working email (or webhook) to subscribe to the topic.

3. Event Types for IdP Group Mapping

OCI IAM emits events via the Events service. For IdP group mappings, typical event types (subject to region/tenancy support) are:
  • com.oraclecloud.identitycontrolplane.createidpgroupprovider
  • com.oraclecloud.identitycontrolplane.updateidpgroupprovider
  • com.oraclecloud.identitycontrolplane.deleteidpgroupprovider
  • com.oraclecloud.identitycontrolplane.createidentityprovidergroupmapping
  • com.oraclecloud.identitycontrolplane.updateidentityprovidergroupmapping
  • com.oraclecloud.identitycontrolplane.deleteidentityprovidergroupmapping
You can filter on the eventType field.

4. Python Script: Create Topic, Subscription, and Event Rule


5. How this remediates the misconfiguration

  • Before: No monitoring rule for IdP Group Mapping changes.
  • After:
    • An Events Rule specifically matching IdP group mapping event types is enabled.
    • Rule action sends events to a Notifications Topic.
    • You receive an alert (email/webhook/etc.) whenever IdP Group Mappings are created/updated/deleted.
If you want to integrate with Monitoring alarms (metrics), you’d typically have a downstream process (e.g., Function) that converts these events into custom metrics, then create a standard Monitoring Alarm on those metrics; but for pure “alert on change,” the Events + Notifications pattern above is normally sufficient.
Replace:
  • COMPARTMENT_OCID with the target compartment OCID for the Events rule.
  • NOTIFICATIONS_TOPIC_OCID with the OCID of the Notifications topic to receive alerts.
This change does not force replacement of other resources; it either creates a new oci_events_rule or updates the existing one in place.Verification: terraform plan should show an oci_events_rule.idp_group_mapping_changes resource with is_enabled = true and a condition that includes the three *IdpGroupMapping event types, plus the configured actions block.