More Info:
Identity Provider (IdP) modifications must be strictly monitored. Attackers may attempt to add rogue identity providers to create backdoor access into the OCI tenancy.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
In OCI this is done with Events + Notifications, not a metric alarm in Monitoring. Here’s how to set up an alert for Identity Provider (IdP) changes using the OCI Console:
(Exact event types may be listed in the dropdown; select them from there for accuracy.)
With this, any Identity Provider creation, update, or deletion will trigger the Events rule, send to Notifications, and deliver an alert—covering the “Identity Provider change alarm” requirement using OCI’s alerting/monitoring tooling.
1. Verify Audit Is Enabled (usually on by default)
- In the Console, open the navigation menu.
- Go to Governance & Administration → Audit.
- Select the tenancy (root compartment) and confirm that audit is enabled (it is enabled by default and cannot be disabled, just verify logs are present).
2. Create a Notifications Topic
- Go to Developer Services → Application Integration → Notifications.
- Click Topics → Create Topic.
- Enter a name (e.g.,
idp-change-alerts) and choose the compartment. - Click Create.
Add a Subscription (email or other)
- Open the topic you just created.
- Click Create Subscription.
- Choose Protocol (e.g.,
Email). - Enter your email address (or other endpoint).
- Click Create.
- Check your email and confirm the subscription.
3. Create an Event Rule for Identity Provider Changes
- Go to Observability & Management → Events Service.
- Click Rules → Create Rule.
- Name:
IdP-Change-Events - Description:
Alert when Identity Provider is created, updated, or deleted - Compartment: choose the root or relevant compartment (IAM events are tenancy-scoped; root is typical).
- Service:
identity - Event Type / Action: include:
CreateIdentityProviderUpdateIdentityProviderDeleteIdentityProvider
- Under Rule Conditions, choose Event Type (or Service and Event Type, depending on UI version).
- Select Service =
identity. - Add event types corresponding to IdP management operations (search for
IdentityProviderand select create/update/delete variations).
4. Attach the Notifications Action
Still in the Create Rule dialog:- Under Actions, click Add Action.
- Action Type:
Notifications. - Topic: select the topic you created (
idp-change-alerts). - Click Create to save the rule.
5. (Optional) Test the Alert
- Make a non-production change to an Identity Provider (e.g., update description) or create a test IdP.
- Within a short time, you should receive an email notification (or chosen protocol) with the event details.
With this, any Identity Provider creation, update, or deletion will trigger the Events rule, send to Notifications, and deliver an alert—covering the “Identity Provider change alarm” requirement using OCI’s alerting/monitoring tooling.
Using CLI
Using CLI
Below are the minimal step‑by‑step OCI CLI instructions to set up an alarm (alert) for Identity Provider changes using Events + Notifications (this is how OCI surfaces these types of configuration-change alerts; Monitoring alarms are metric-based).You will:
Capture the topic OCID from the output:
Open the email you get and confirm the subscription.
Using CLI, first create a policy JSON file, e.g. Then create the policy:(You can skip the JSON file and use
Or, more general (any Identity Provider event):
This rule will fire whenever an Identity Provider is created, updated, or deleted in the specified compartment and send a message to your Notifications topic, which then sends email (or other protocol) alerts.
If you specifically need this in a different region/compartment layout or want a different notification channel (Slack, PagerDuty, HTTPS, etc.), indicate which and I can adjust the exact CLI commands.
- Create a Notifications topic
- Create a subscription (e.g., email)
- Add a policy so Events can publish to that topic
- Create an Events rule for Identity Provider changes pointing to that topic
0. Prerequisites
- OCI CLI configured (
oci setup config) - Tenancy OCID and compartment OCID ready
- Appropriate IAM permissions to create topics, subscriptions, policies, and events rules
<tenancy-ocid><compartment-ocid><region-identifier>(e.g.,us-ashburn-1)<email-address><topic-name>,<rule-name>
1. Create a Notifications topic
ocid1.onstopic.oc1... (call it <topic-ocid>).2. Create a subscription (email example)
3. Add IAM policy so Events can publish to the topic
Create a policy in the root compartment (tenancy level) or a compartment that matches where you created the topic.Example policy text (in root compartment):policy.json:--statements as shown.)4. Define the Events rule condition for Identity Provider changes
Identity Provider events are in the Identity service. Typical event types:com.oraclecloud.identitycontrolplane.createidentityprovidercom.oraclecloud.identitycontrolplane.updateidentityprovidercom.oraclecloud.identitycontrolplane.deleteidentityprovider
idp-change-condition.json like:5. Create the Events rule that targets the Notifications topic
6. (Optional) Verify rule and test
- List rules:
- Trigger a test (e.g., update an Identity Provider description) and confirm an email is received.
If you specifically need this in a different region/compartment layout or want a different notification channel (Slack, PagerDuty, HTTPS, etc.), indicate which and I can adjust the exact CLI commands.
Using Python
Using Python
Below is a concise, end‑to‑end way to set up an OCI Monitoring alarm (via Python) that fires whenever an Identity Provider is created, updated, or deleted, using the Audit metrics.
Update (e.g., enable/disable):
1. Prerequisites
-
You have:
ociPython SDK installed:- An OCI config file (
~/.oci/config) with a profile that can:- Read/write Monitoring
- Read Audit metrics
- Manage Notifications topics and subscriptions (if you’re sending emails, etc.)
- A Notification Topic OCID (or you can create one via SDK/Console).
-
Note/collect:
compartment_idwhere you want the alarm.notification_topic_id(OCID of the Notifications topic).
2. Metric & Query For Identity Provider Changes
Audit events are exposed as metrics in namespaceoci_audit. We’ll create an alarm using Monitoring Query Language (MQL):- This means: in a 1‑minute window, if any of those events happen, trigger the alarm.
3. Python Code To Create The Alarm
4. Optional: Verify / Update The Alarm
List alarms in the compartment:5. Test
- Perform a test Identity Provider operation (e.g., create a dummy IdP in the console).
- Wait for a minute or two.
- Confirm:
- Alarm changes to “FIRING” in Monitoring → Alarms.
- Notification is delivered via your configured topic (email, PagerDuty, etc.).
Using Terraform
Using Terraform
OCI_COMPARTMENT_OCIDwith the OCID of the compartment where you want the alarm resource.AUDIT_COMPARTMENT_OCIDwith the compartment whose audit events should be monitored (often the root/tenancy OCID).ONS_TOPIC_OCIDwith the OCID of your notification topic used for security alerts.
oci_monitoring_alarm (it updates the query and related settings but does not force replacement).After updating Terraform, terraform plan should show:- An
update in-placeon the existingoci_monitoring_alarm(orcreateif it did not exist) with the newnamespaceandqueryand any updated destinations/body.

