Skip to main content

More Info:

Ensure Event Rules capture IAM Group creation, updates, and deletions. Real-time event triggers for group mutation enable automated remediation pipelines to revert unauthorized privilege grants.

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 in the OCI Console to set up an Event Rule that alerts on IAM group changes (via Notifications / “alerting monitoring”).

1. Prepare a Notifications Topic (for alerts)

  1. In the OCI Console, open the Navigation Menu.
  2. Go to Developer ServicesNotificationsTopics.
  3. Click Create Topic.
    • Name: iam-group-changes-topic (or similar)
    • Description: Alerts on IAM group changes
    • Click Create.
  4. Open the topic you just created.
  5. Under Subscriptions, click Create Subscription.
    • Protocol: typically Email (or HTTPS/Slack/PagerDuty as needed)
    • Email: your alert email
    • Click Create.
  6. Confirm the subscription from the email you received.

2. Create an Event Rule for IAM Group Changes

  1. Open Navigation MenuObservability & ManagementEvents ServiceRules.
  2. Make sure you are in the correct compartment where you want the rule to live.
  3. Click Create Rule.
  4. Fill in:
    • Display name: iam-group-change-rule
    • Description: Triggers on IAM group create/update/delete and membership changes
    • Rule Conditions:
      • Condition Type: Event Type
      • Rule is matching: Any of the following.
  5. Under Condition, configure events for IAM groups. Depending on your tenancy (IDCS vs IAM/Identity Domains) you will see variants, but generally:
    • Service Name / Event Source: Identity
    • Then add event types such as (names may vary slightly by console version):
      • Group - Create
      • Group - Update
      • Group - Delete
      • Group Membership - Add User
      • Group Membership - Remove User
    If using the JSON editor, a typical pattern looks like:
    Use the console’s event type picker where possible; only use JSON if you can’t find the specific types in the UI.
  6. Under Actions, click Add Action:
    • Action Type: Notifications
    • Topic: select the topic you created earlier (e.g., iam-group-changes-topic).
    • Optionally set:
      • Action Name: SendNotificationOnIAMGroupChange.
  7. Click Create Rule (and ensure the rule is in Enabled state).

3. (Optional) Test the Configuration

  1. Make a safe IAM group change (e.g., create a test group or add/remove a test user to a test group).
  2. Confirm you receive an email (or chosen channel) alert from the Notifications topic.

This setup provides “alerting monitoring” for OCI IAM Group changes entirely via the OCI Console, using Events + Notifications.
Below is a simple end‑to‑end remediation using OCI CLI so that any IAM Group change triggers an event rule and sends an alert (e.g., email).

1. Prerequisites

Make sure:
  • OCI CLI is installed and configured (oci setup config).
  • You have:
    • COMPARTMENT_OCID where you’ll create the rule and topic (often root compartment / tenancy).
    • An email address (for the notification subscription).
Export variables for convenience:

2. Create a Notifications Topic

Capture the topic-id from the output, or:

3. Create an Email Subscription to the Topic

Then go to your email inbox and confirm the subscription.

4. Define the Event Rule Condition (IAM Group Changes)

Create a JSON file iam-group-events-condition.json:
This matches all major IAM group change events.

5. Define the Event Rule Actions (Send to Notifications)

Create a JSON file iam-group-events-actions.json:
Replace <TOPIC_OCID_PLACEHOLDER> with your real $TOPIC_OCID, or generate the file with sed:

6. Create the Event Rule via OCI CLI

This creates an Events rule in the specified compartment. Any matching IAM group event will be sent to the Notification topic, which then sends email to your subscription.

7. (Optional) Verify the Rule

List rules:
Trigger a test by creating/updating a group in the Console or via CLI (e.g., change a group description), then confirm you receive an email.
These steps implement “OCI Monitoring/Alerting for IAM Group Changes” fully via OCI CLI using Events + Notifications.
Below is a minimal, step‑by‑step way to:
  1. Detect IAM Group changes using OCI Events
  2. Send alerts via OCI Notifications (which is what Monitoring “Alerting” uses for delivery)
  3. Do it programmatically with Python (OCI SDK)

1. Prerequisites

  1. OCI Python SDK installed
  1. Config file (~/.oci/config) with a profile, e.g. DEFAULT
  2. IAM policies (in the tenancy root or relevant compartment):
If you create the topic in another compartment, adjust policy scope accordingly.

2. Create a Notifications Topic (for alerts)

Add a subscription (e.g., email):
Confirm the subscription from your email.

3. Create an Events Rule for IAM Group Changes

OCI IAM group events (non‑exhaustive) typically look like:
  • com.oraclecloud.identitycontrolplane.creategroup
  • com.oraclecloud.identitycontrolplane.updategroup
  • com.oraclecloud.identitycontrolplane.deletegroup
  • com.oraclecloud.identitycontrolplane.adduserstogroup
  • com.oraclecloud.identitycontrolplane.removeusersfromgroup
We’ll create a rule that matches all of these and sends the event to the Notifications topic.
This rule will:
  • Listen for any of the IAM group change events in the tenancy/compartment scope
  • Push a message to the Notifications topic you created
  • Notifications will then send email (or other channels you configure)

4. (Optional) Tie in Monitoring Alarms

If you specifically want Monitoring Alarm objects to send alerts (rather than directly from Events):
  1. You still use the Notifications topic for alarm delivery.
  2. You create a custom metric and a Monitoring Alarm on that metric.
  3. Your Events Rule target would be a Function or Streaming that increments a custom metric, and then the alarm fires.
That is more complex; for most “IAM group change alert” use cases, Events → Notifications is the standard pattern and is what OCI’s “alerting” usually refers to for control-plane events.
If you share your tenancy region and whether you use IAM domains, I can adjust the exact eventType values and pattern for your environment.
This change is additive (new rule/topic) and does not force replacement of existing resources unless you bind this rule to an existing oci_events_rule by renaming/importing. After updating Terraform, terraform plan should show one new oci_events_rule (and oci_ons_notification_topic if added) being created with the condition listing the three IAM group event types.