Skip to content

Commit 58b2734

Browse files
mjunaidcaclaude
andcommitted
docs(env): Add audit logging configuration with realistic volume estimates
Add comprehensive audit logging section to .env.example with: - Corrected database load estimates for various user scales - Clear distinction between Sentry (errors) vs audit logs (compliance) - When to enable: enterprise/compliance requirements - Expected DB inserts: 50-100/day per 100 users (scales linearly) Realistic estimates for 20k users: - ~10,000-15,000 audit log inserts per day - Events: registration, login, role changes, org membership, failures - NOT "10-20 queries" - that was an underestimate 🤖 Generated with Claude Code https://claude.com/claude-code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent abf47c5 commit 58b2734

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

auth-server/.env.example

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,40 @@ NEXT_PUBLIC_CONTINUE_URL=http://localhost:3000
123123
# Example: AYasASQgxxx...
124124
# REDIS_TOKEN=
125125

126+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127+
# 📋 Audit Logging (OPTIONAL - Enterprise/Compliance)
128+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
129+
# Audit logging tracks security-critical events for compliance (SOC2, ISO 27001, GDPR)
130+
# Different from error monitoring (Sentry) - audit logs are for investigations
131+
#
132+
# When to enable:
133+
# ✅ Enterprise B2B customers (compliance requirement)
134+
# ✅ SOC2, ISO 27001, HIPAA, GDPR compliance needed
135+
# ✅ Security investigations and forensics required
136+
# ❌ Early-stage products (adds DB load)
137+
# ❌ Consumer apps without compliance requirements
138+
#
139+
# Expected Database Load:
140+
# 100 users: ~50-100 inserts/day
141+
# 1,000 users: ~500-700 inserts/day
142+
# 10,000 users: ~5,000-7,000 inserts/day
143+
# 20,000 users: ~10,000-15,000 inserts/day
144+
#
145+
# Events logged (5 critical actions only):
146+
# - User registration (user.created)
147+
# - Login events (session.created)
148+
# - Role changes (role.updated)
149+
# - Organization membership changes (member.added, member.removed)
150+
# - Failed login attempts (captured by rate limiting)
151+
#
152+
# Note: This is separate from Sentry (error monitoring)
153+
# - Sentry: Track exceptions, crashes, performance issues
154+
# - Audit Logs: Track user actions for compliance and investigations
155+
# - Both should be used together in production
156+
#
157+
# Enable audit logging (set to "true" to enable)
158+
# ENABLE_AUDIT_LOGGING=false
159+
126160
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
127161
# 🔐 OAuth Client Management
128162
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0 commit comments

Comments
 (0)