Skip to main content
The Events service collects and persists user and organization events for audit logging, compliance reporting, and security monitoring.

Overview

The Events service provides:
  • Event Collection: Client-side event submission endpoint
  • Event Storage: Persisting events to database and Azure Table Storage
  • Event Types: User actions, cipher operations, organization activities
  • Compliance Support: Audit trails for regulatory requirements
  • Security Monitoring: Track suspicious activities and access patterns

Architecture

Configuration

From src/Events/Startup.cs:26:
Service Configuration

Event Collection

Collect Endpoint

From src/Events/Controllers/CollectController.cs:16:
Collect Controller
Endpoint: POST /collect Authentication: Required (Bearer token) Request Body:

Event Types

User Events

Login/Logout

User authentication events

Vault Export

Vault data export operations

Settings Changes

User profile and settings modifications

2FA Events

Two-factor authentication changes

Cipher Events

From src/Events/Controllers/CollectController.cs:80:
Cipher Event Types
These events track vault item interactions:
  • Viewing credentials
  • Auto-filling forms
  • Copying sensitive data
  • Revealing hidden fields

Organization Events

Organization Event Types

Administrative Events

  • User invitations
  • Policy changes
  • Collection modifications
  • Group management
  • Permission changes

Event Validation

The service validates event submissions:
1

Authentication

Verify user is authenticated via Bearer token
2

Authorization

Check user has access to referenced resources (ciphers, organizations)
3

Batching

Group cipher events for efficient processing (50 per batch)
4

Storage

Persist events to database and Azure Table Storage

Application Cache

From src/Events/Startup.cs:56: The Events service uses application cache for organization abilities:
Cache Configuration
Cache synchronization via:
  • Azure Service Bus: Multi-instance deployments
  • In-Memory: Single instance deployments
From src/Events/Startup.cs:80:
Cache Hosted Service

Event Integrations

The service supports event-driven integrations via RabbitMQ: From src/Events/Startup.cs:86:
Event Integrations
Integrations include:
  • Slack: Organization event notifications
  • Microsoft Teams: Webhook notifications
  • Custom Webhooks: User-defined integrations

Middleware Pipeline

From src/Events/Startup.cs:90:
Request Pipeline

Event Storage

Events are stored in two locations:

SQL Database

Primary event storage with relational queries:
Event Table

Azure Table Storage

Scalable event storage for high-volume events:
Table Storage
Benefits:
  • High throughput
  • Cost-effective storage
  • Efficient time-range queries

Client Integration

JavaScript Example

Mobile Example (C#)

Deployment

Environment Variables

Docker

Performance Considerations

Batch Processing

Cipher events processed in batches of 50 for efficiency

Async Operations

Non-blocking event persistence

Table Storage

Azure Table for high-volume event storage

Cache Sync

Service Bus for distributed cache invalidation

Security Considerations

Event data contains sensitive information. Ensure proper access controls and encryption.
  • Authentication: All requests require valid Bearer tokens
  • Authorization: Users can only log events for resources they access
  • Validation: Cipher and organization access validated before logging
  • IP Tracking: Client IP addresses captured for security analysis
  • Audit Trail: Events are immutable once stored

Compliance Support

The Events service supports compliance requirements:
  • GDPR: User activity tracking and data access logs
  • SOC 2: Audit trails for security controls
  • HIPAA: Access logging for protected health information
  • ISO 27001: Information security event management

Querying Events

Organization administrators can query events via the API service:
Query parameters:
  • start: Start date (ISO 8601)
  • end: End date (ISO 8601)
  • actingUserId: Filter by user
  • itemId: Filter by resource (cipher, collection, etc.)