Ctrl K
ring2all.com

Security Logs Module Documentation

Table of Contents

  1. Module Overview (Technical)
  2. Module Overview (Commercial/Business)
  3. Module Overview (End User/Administrator)
  4. Security Event Reference
  5. Common Scenarios & Examples
  6. Limitations & Important Notes
  7. Troubleshooting Tips
  8. Glossary

---

1. Module Overview (Technical)

What Are Security Logs?

Security Logs is a security monitoring module that tracks authentication and access control events. Unlike general Audit Logs, Security Logs focuses specifically on security-relevant events: logins, logout, failed login attempts, password changes, MFA configuration, and permission modifications.

Architecture

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│                 Security Logs Architecture                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Security Events                                                │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Authentication System                             │   │
│  │                                                          │   │
│  │  ├─ User logs in → LOGIN                                │   │
│  │  ├─ Wrong password → LOGIN_FAILED                       │   │
│  │  ├─ User logs out → LOGOUT                              │   │
│  │  ├─ Password changed → PASSWORD_CHANGE                   │   │
│  │  ├─ Password reset → PASSWORD_RESET                      │   │
│  │  ├─ MFA enabled → MFA_ENABLED                           │   │
│  │  ├─ MFA disabled → MFA_DISABLED                         │   │
│  │  └─ Role/permission change → PERMISSION_CHANGE           │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Logged with context                                    │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        public.security_logs                              │   │
│  │                                                          │   │
│  │  | event | user | ip_address | user_agent | timestamp | │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│       │                                                         │
│       ▼ Displayed in Viewer                                     │
│  ┌──────────────────────────────────────────────────────────┐   │
│  │        Security Logs Page                                │   │
│  │                                                          │   │
│  │  ┌─────────────────────────────────────────────────────┐ │   │
│  │  │Time   │Event       │User  │IP Address │Details    │ │   │
│  │  ├───────┼────────────┼──────┼───────────┼───────────┤ │   │
│  │  │10:30  │Login       │admin │192.168.1.1│ [👁️]      │ │   │
│  │  │10:28  │Login Failed│john  │10.0.0.5   │ [👁️]      │ │   │
│  │  │10:25  │MFA Enabled │admin │192.168.1.1│ [👁️]      │ │   │
│  │  └─────────────────────────────────────────────────────┘ │   │
│  │                                                          │   │
│  └──────────────────────────────────────────────────────────┘   │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Key Tables

TablePurpose
public.security_logsSecurity event records

Key Files

FileDescription
modules/securityLogs/Frontend module
modules/securityLogs/api/securityLogApi.tsAPI calls
modules/securityLogs/types/securityLog.types.tsType definitions
---

2. Module Overview (Commercial/Business)

Business Value

Security Logs provides security visibility:

Without Security LogsWith Security Logs
Unknown accessLogin tracking
Hidden attacksFailed login alerts
No MFA trackingMFA event history
Permission blindPermission change log

Use Cases

  1. Intrusion Detection
- Track failed logins

- Identify brute force attacks

  1. Access Auditing
- View login history

- Track session patterns

  1. Compliance
- SOC 2 requirements

- Security audit trail

  1. Incident Response
- Investigate breaches

- Forensic analysis

Feature Highlights

FeatureBenefit
Login TrackingWho accessed system
Failed LoginsAttack detection
Password EventsCredential changes
MFA Events2FA configuration
Permission ChangesAccess control audit
IP TrackingLocation awareness
---

3. Module Overview (End User/Administrator)

What Can You Do?

  • View all security events
  • Track login/logout activity
  • Monitor failed login attempts
  • Review password changes
  • Track MFA configuration
  • Monitor permission changes
  • Filter by event type and user

Security Logs Interface

Plaintext
┌─────────────────────────────────────────────────────────────────┐
│              Security Logs                                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Filters:                                                       │
│  ├─ Range: [7 Days ▼]                                          │
│  ├─ Event Type: [All Events ▼]                                 │
│  ├─ User: [All Users ▼]                                        │
│  └─ [🔄 Refresh] [Clear Filters]                               │
│                                                                 │
│  🔍 [Search by action, user, or IP address...            ]     │
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │ Timestamp    │ Event          │ User   │ IP Address  │👁️│  │
│  ├──────────────┼────────────────┼────────┼─────────────┼──┤  │
│  │ 01/16 10:30  │ 🟢 Login       │ admin  │ 192.168.1.1 │👁️│  │
│  │ 01/16 10:28  │ 🔴 Login Failed│ john   │ 10.0.0.5    │👁️│  │
│  │ 01/16 10:27  │ 🔴 Login Failed│ john   │ 10.0.0.5    │👁️│  │
│  │ 01/16 10:26  │ 🔴 Login Failed│ john   │ 10.0.0.5    │👁️│  │
│  │ 01/16 10:00  │ 🔒 MFA Enabled │ admin  │ 192.168.1.1 │👁️│  │
│  │ 01/15 18:30  │ 🚪 Logout      │ admin  │ 192.168.1.1 │👁️│  │
│  │ 01/15 17:00  │ 🔑 Pass Change │ jane   │ 192.168.1.2 │👁️│  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
│  ⚠️ Alert: 3 failed login attempts for 'john' in last hour     │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

Quick Tips

TIP
Failed Logins: Multiple failed attempts may indicate an attack.
TIP
Unusual IPs: Watch for logins from unexpected locations.
CAUTION
MFA Disabled: Review any MFA disable events immediately.

---

4. Security Event Reference

Event Types

EventIconDescription
Login🟢Successful authentication
Logout🚪User session ended
Login Failed🔴Failed authentication attempt
Password Change🔑User changed password
Password Reset🔄Password was reset
MFA Enabled🔒Two-factor authentication enabled
MFA Disabled🔓Two-factor authentication disabled
Permission Change👥User role/permissions modified

Event Details

FieldDescription
TimestampWhen event occurred
UserAffected user account
IP AddressSource IP address
User AgentBrowser/client info
ResourceRelated resource type
MetadataAdditional context

Severity Levels

EventSeverityAction Needed
LoginInfoNormal activity
LogoutInfoNormal activity
Login FailedWarningMonitor for patterns
Password ChangeInfoExpected activity
Password ResetMediumVerify authorization
MFA EnabledInfoSecurity improvement
MFA DisabledHighInvestigate immediately
Permission ChangeMediumVerify authorization
---

5. Common Scenarios & Examples

Scenario 1: Detect Brute Force Attack

  1. Filter by "Login Failed"
  2. Look for same user/IP with multiple failures
  3. Check timestamp clustering
  4. Block IP if attack confirmed

Scenario 2: Audit Login History

  1. Set date range for period
  2. Filter by specific user
  3. Review all login events
  4. Check for unusual IPs

Scenario 3: Investigate MFA Change

  1. Filter by "MFA Disabled"
  2. Identify who disabled MFA
  3. Check if authorized
  4. Re-enable if needed

Scenario 4: Permission Audit

  1. Filter by "Permission Change"
  2. Review who made changes
  3. Verify proper authorization
  4. Document for compliance

---

6. Limitations & Important Notes

Technical Notes

NOTE
Security Focus: Only security events, not data changes.
NOTE
Real-time: Events logged immediately.
WARNING
Failed Logins: May contain attempted usernames (could be typos).

Best Practices

  1. Daily Review: Check failed logins daily
  2. Alert Setup: Configure alerts for patterns
  3. IP Monitoring: Watch for unusual locations
  4. MFA Enforcement: Monitor MFA disable events
  5. Permission Reviews: Audit permission changes regularly

Common Attack Patterns

PatternIndicatorResponse
Brute ForceMany failures, same userLock account, block IP
Credential StuffingMany users, same IPBlock IP range
Insider ThreatOff-hours accessInvestigate user
Account TakeoverPassword changed + MFA disabledLock account immediately
---

7. Troubleshooting Tips

Common Issues

SymptomPossible CauseSolution
No recordsToo restrictive filterClear filters
Missing loginsEvents not loggedCheck logging configuration
Unknown IPVPN or proxyCheck user's network
Many failuresAttack or typosInvestigate pattern
Slow loadingLarge date rangeReduce date range

Diagnostic SQL

Recent security events:

Sql
SELECT 
  timestamp,
  event,
  user_email,
  ip_address,
  user_agent
FROM public.security_logs
ORDER BY timestamp DESC
LIMIT 50;

Failed login summary:

Sql
SELECT 
  user_email,
  ip_address,
  COUNT(*) as failed_attempts
FROM public.security_logs
WHERE event = 'LOGIN_FAILED'
  AND timestamp >= NOW() - INTERVAL '24 hours'
GROUP BY user_email, ip_address
ORDER BY failed_attempts DESC;

Login locations:

Sql
SELECT 
  user_email,
  ip_address,
  COUNT(*) as logins,
  MAX(timestamp) as last_login
FROM public.security_logs
WHERE event = 'LOGIN'
GROUP BY user_email, ip_address
ORDER BY last_login DESC;

---

8. Glossary

TermDefinition
MFAMulti-Factor Authentication
Brute ForceRepeated login attempts
Credential StuffingTesting stolen credentials
SessionAuthenticated user period
User AgentBrowser/client identification
Failed LoginIncorrect credentials
---

Lua Script Status ℹ️

No Lua Handler Required

ComponentStatus
Security Logsℹ️ Backend-logged - recorded by authentication system
Security Logs is a frontend reporting module. Security events are logged automatically by the backend authentication middleware. No Lua handlers are used.

---

Documentation last updated: January 2026
AI Assistant

👋 Hello! I'm your Ring2All documentation assistant. I can help you find information about configuring and using the Ring2All PBX platform.

How can I help you today?