feat: add SQLite storage for login attempts and sessions
Adds persistent storage using modernc.org/sqlite (pure Go). Login attempts are deduplicated by (username, password, ip) with counts. Sessions and session logs are tracked with UUID IDs. Includes embedded SQL migrations, configurable retention with background pruning, and an in-memory store for tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
PLAN.md
2
PLAN.md
@@ -67,7 +67,7 @@ Goal: A working SSH honeypot that logs attempts, stores them in SQLite, and can
|
||||
- Configurable credential list that triggers "successful" login
|
||||
- Basic login realism: reject first N attempts before accepting
|
||||
|
||||
### 1.3 SQLite Storage
|
||||
### 1.3 SQLite Storage ✅
|
||||
- Schema: login_attempts table with deduplication (username, password, ip, count, first_seen, last_seen)
|
||||
- Schema: sessions table for successful logins (id, ip, username, shell_name, connected_at, disconnected_at, human_score)
|
||||
- Schema: session_logs table for command logging (session_id, timestamp, input, output)
|
||||
|
||||
Reference in New Issue
Block a user