Event rule monitoring local OCI user authentication has notification actions configured
OCI Events rules targeting com.oraclecloud.identitysignon.interactivelogin are assessed for configured notification actions to monitor local user interactive sign-ins. Rules are compartment-scoped and can cover child compartments.
Risk
Without alerts on local sign-ins, account takeovers and brute-force attempts can go unnoticed. Attackers with local access can exfiltrate data (confidentiality), change configurations (integrity), and disrupt services (availability), delaying detection and response.
Run this check with Prowler
Run in Prowler Cloudprowler oraclecloud --checks events_rule_local_user_authenticationRecommendation
Create an Events rule for com.oraclecloud.identitysignon.interactivelogin with notification actions delivering real-time alerts to monitored channels or workflows. Integrate with a SIEM, tune filters to reduce noise, and apply least privilege and defense in depth to limit local account exposure.
Remediation
CLI
oci events rule create --display-name <example_resource_name> --is-enabled true --condition '{"eventType":["com.oraclecloud.identitysignon.interactivelogin"]}' --compartment-id <example_resource_id> --actions '{"actions":[{"actionType":"ONS","isEnabled":true,"topicId":"<example_resource_id>"}]}'Terraform
resource "oci_events_rule" "example" {
display_name = "<example_resource_name>"
is_enabled = true
compartment_id = "<example_resource_id>"
# Critical: filter for local OCI user authentication events
condition = jsonencode({ eventType = ["com.oraclecloud.identitysignon.interactivelogin"] })
actions {
actions {
# Critical: ONS notification action to a topic
action_type = "ONS"
is_enabled = true
topic_id = "<example_resource_id>"
}
}
}Other
Check Code
"""Check Ensure a notification is configured for Local OCI User Authentication."""
from prowler.lib.check.models import Check, Check_Report_OCI
from prowler.providers.oraclecloud.services.events.events_client import events_client
from prowler.providers.oraclecloud.services.events.lib.helpers import (
check_event_rule_has_notification_actions,
filter_rules_by_event_types,
)
class events_rule_local_user_authentication(Check):
"""Check Ensure a notification is configured for Local OCI User Authentication."""
def execute(self) -> Check_Report_OCI:
"""Execute the events_rule_local_user_authentication check."""
findings = []
# Required event type for user authentication
required_event_types = ["com.oraclecloud.identitysignon.interactivelogin"]
# Filter rules that monitor user authentication
matching_rules = filter_rules_by_event_types(
events_client.rules, required_event_types
)
# Create findings for each matching rule
for rule, _ in matching_rules:
report = Check_Report_OCI(
metadata=self.metadata(),
resource=rule,
region=rule.region,
resource_name=rule.name,
resource_id=rule.id,
compartment_id=rule.compartment_id,
)
# Check if the rule has notification actions
if check_event_rule_has_notification_actions(rule):
report.status = "PASS"
report.status_extended = f"Event rule '{rule.name}' is configured to monitor local OCI user authentication with notifications."
else:
report.status = "FAIL"
report.status_extended = f"Event rule '{rule.name}' monitors local OCI user authentication but does not have notification actions configured."
findings.append(report)
# If no matching rules found, create a single FAIL finding
if not findings:
report = Check_Report_OCI(
metadata=self.metadata(),
resource={},
region="global",
resource_name="Local User Authentication Event Rule",
resource_id=events_client.audited_tenancy,
compartment_id=events_client.audited_tenancy,
)
report.status = "FAIL"
report.status_extended = (
"No event rules configured to monitor local OCI user authentication."
)
findings.append(report)
return findings