ExESDBGater.Messages.SecurityMessages (ex_esdb_gater v0.8.0)

Message definitions and helpers for the :ex_esdb_security PubSub instance.

Handles security events, authentication, authorization, and access violations.

Common Topics

  • "auth_events" - Authentication and authorization events
  • "access_violations" - Unauthorized access attempts
  • "security_alerts" - Security-related alerts
  • "session_events" - Session management events

Summary

Functions

Create an AccessViolation payload with current timestamp

Create an AuthEvent payload with current timestamp

Broadcast an access violation

Broadcast an authentication event

Broadcast a security alert

Broadcast a session event

Create a SecurityAlert payload with current timestamp

Create a SessionEvent payload with current timestamp

Validate and extract a secure message

Functions

access_violation(violation_type, resource, action, opts \\ [])

Create an AccessViolation payload with current timestamp

auth_event(user_id, event_type, auth_method, opts \\ [])

Create an AuthEvent payload with current timestamp

broadcast_access_violation(topic, payload)

Broadcast an access violation

broadcast_auth_event(topic, payload)

Broadcast an authentication event

broadcast_security_alert(topic, payload)

Broadcast a security alert

broadcast_session_event(topic, payload)

Broadcast a session event

secure_broadcast(topic, message)

security_alert(alert_type, severity, description, opts \\ [])

Create a SecurityAlert payload with current timestamp

session_event(session_id, user_id, event_type, opts \\ [])

Create a SessionEvent payload with current timestamp

validate_secure_message(arg1)

Validate and extract a secure message