refactor: standardize audit logging for ISO27001 compliance
This commit is contained in:
@@ -871,7 +871,7 @@ class MfaPolicyService:
|
||||
org_ids = [org.organization_id for org in suspended_orgs]
|
||||
|
||||
AuditService.log_action(
|
||||
action=AuditAction.USER_LOGIN,
|
||||
action=AuditAction.LOGIN_BLOCKED_COMPLIANCE,
|
||||
user_id=user.id,
|
||||
organization_id=org_ids[0] if org_ids else None,
|
||||
description=f"Login attempt while compliance suspended. Suspended orgs: {org_ids}",
|
||||
@@ -898,7 +898,7 @@ class MfaPolicyService:
|
||||
user_agent: Client user agent
|
||||
"""
|
||||
AuditService.log_action(
|
||||
action=AuditAction.USER_LOGIN, # Reusing USER_LOGIN for audit
|
||||
action=AuditAction.MFA_COMPLIANCE_BYPASS_ATTEMPT,
|
||||
user_id=user.id,
|
||||
resource_type="endpoint",
|
||||
resource_id=endpoint,
|
||||
|
||||
Reference in New Issue
Block a user