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
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
- 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
Remediation
Using Console
Using Console
Below are the exact steps to configure alerting in OCI (via Events + Notifications) for IdP Group Mapping changes using the OCI Console.
Adjust eventType strings to match what’s documented/available for your tenancy (case and exact names matter).
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.
1. Identify/Decide Your Target Compartment
- Log in to OCI Console.
- In the top-left, select the correct region.
- 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
- Open the navigation menu → Developer Services → Notifications → Topics.
- Click Create Topic.
- 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.
- Name: e.g.
- Click Create.
Add a Subscription (email, Slack, etc.)
- Click the topic you just created.
- Under Subscriptions, click Create Subscription.
- Choose a Protocol:
- Email for simple alerts
- HTTPS, Slack (via HTTPS), etc. as needed.
- Enter the endpoint (email address or webhook URL).
- Click Create.
- 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
- Open the navigation menu → Observability & Management → Events Service → Rules.
- Click Create Rule.
3.1. Basic Info
- Name: e.g.
idp-group-mapping-change-rule - Description: e.g.
Triggers when IdP group mappings are created, updated or deleted - 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)
- Under Rule Condition, select Event Type.
- Service: choose Identity (or IAM, or Identity Domains, depending on your tenancy UI).
-
Under Event Type, select all that apply for IdP Group Mappings, e.g. (names may vary slightly by region/tenant):
com.oraclecloud.identitycontrolplane.createidpgroupprovisioningcom.oraclecloud.identitycontrolplane.updateidpgroupprovisioningcom.oraclecloud.identitycontrolplane.deleteidpgroupprovisioning
- 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)
- Change the condition type to Event Pattern (Advanced).
- Use a JSON pattern similar to:
3.3. Configure the Action
- Under Actions, click Add Action.
- Action Type: choose Notifications.
- Topic: select the topic you created earlier, e.g.
idp-group-mapping-changes-topic. - (Optional) Add a comment/description for the action.
- Click Add Action.
4. Enable and Save the Rule
- Ensure Rule State is set to Enabled.
- Click Create Rule (or Save).
5. Test the Alert
- Go to Identity & Security → Federation / Identity Providers (or Identity Domains, depending on your setup).
- Perform a safe IdP group mapping change (for example, add a test mapping or modify a non-critical one).
- 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.
Using CLI
Using CLI
Below is a minimal, CLI-only way to set up an OCI Event Rule that alerts on IdP group mapping changes.Assumptions:
Capture the
Then confirm the subscription from the email you receive.
Replace
This completes the monitoring/alerting setup for IdP group mapping changes via the OCI CLI.
- You have
ociCLI 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
topic-id from the output (or extract via jq):3. Create an email subscription on the topic
4. Prepare the Event Rule condition JSON
Createcondition.json with the relevant event types for IdP group mapping changes:<TENANCY_OR_ROOT_COMPARTMENT_OCID> with your actual COMPARTMENT_ID or tenancy OCID, then:5. Prepare the Event Rule actions JSON
Createactions.json pointing to the Notifications topic:6. Create the Event Rule via OCI CLI
7. (Optional) Verify the rule
Using Python
Using Python
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
- OCI Notifications Topic – target for alerts.
- Subscription – e.g., email/Slack/HTTPS endpoint.
- OCI Events Rule – listens for IdP Group Mapping changes in IAM and publishes to the topic.
2. Prerequisites
-
Install OCI Python SDK:
-
Configure credentials:
This generates
~/.oci/configwith:- tenancy
- user
- fingerprint
- key_file
- region
-
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.createidpgroupprovidercom.oraclecloud.identitycontrolplane.updateidpgroupprovidercom.oraclecloud.identitycontrolplane.deleteidpgroupprovidercom.oraclecloud.identitycontrolplane.createidentityprovidergroupmappingcom.oraclecloud.identitycontrolplane.updateidentityprovidergroupmappingcom.oraclecloud.identitycontrolplane.deleteidentityprovidergroupmapping
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.
Using Terraform
Using Terraform
COMPARTMENT_OCIDwith the target compartment OCID for the Events rule.NOTIFICATIONS_TOPIC_OCIDwith the OCID of the Notifications topic to receive alerts.
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.
