유대선

진행 중 · 2026년 3월 24일

DocVault

소규모 팀용 자체 호스팅 내부자 위협 이벤트 수집·조회 도구. osquery와 자체 클립보드 에이전트가 Go/PostgreSQL 서버로 들어오고, 변조 감지 감사 로그와 운영자 AI 어시스턴트를 붙였다.

Postgres-trigger audit chain · 17,783 LOC · 23 tables · 102 routes · 일회용 설치 토큰

역할
Solo (Claude Code 페어 프로그래밍)
스택
Go 1.26.1 · PostgreSQL 16 · chi · pgx · htmx · osquery · AES-256-GCM · Docker · Caddy
DocVault

DocVault는 자체 호스팅 내부자 위협·엔드포인트 감사 플랫폼이다. osquery와 자체 Windows 클립보드 에이전트가 엔드포인트 활동을 Go 서버로 보내고, PostgreSQL이 DB 트리거 해시 체인 뒤에서 이벤트 스트림을 저장해 감사 로그 변조를 감지 가능하게 하며, htmx 기반 웹 UI가 감사·엔드포인트·알림·파일 vault·운영자 워크플로를 보여준다. Windows 에이전트는 일회용 설치 토큰으로 온보딩되고, 호스트-사용자 매핑과 하트비트 체크가 자동으로 붙는다.

서비스는 docvault.daeseon.ai에서 운영 중이고, 소스는 Daeseon-AI-Factory/docvault에 있다.

무엇을 하는가

목표는 작은 팀을 위한 현실적인 가시성이지, 완성형 SIEM, DRM, 법적 증거 시스템, ML 기반 UEBA 제품이 아니다. 핵심 제품 표면은 더 좁다. 회사 엔드포인트 활동이 들어오는지 보고, 의심스러운 행동을 확인하고, 더 무거운 엔터프라이즈 도구를 쓰기 전 감사 가능한 흔적을 남기는 것이다.

짚을 만한 엔지니어링 포인트

현재 한계

DocVault를 hardened public-internet security product로 포장하지 않는다. 현재 handoff 기준으로도 실제 데스크톱 clipboard capture, osquery end-to-end 검증, 공격자가 영향을 줄 수 있는 tool output 필드에 대한 prompt-injection hardening, recovery code 처리, off-host backup 검증, 첫 실제 고객 PC 설치는 더 많은 증거가 필요한 영역으로 남아 있다.

프로젝트 로그

이 프로젝트를 만들면서 남긴 트러블슈팅 · 회고 · 업데이트의 시간순 기록.

22 로그됨
마지막 업데이트: 2026년 7월 9일
필터
2026년 7월 6일 주1 · 1 트러블슈팅
  1. Moved DocVault from the NCP box to Vultr — containers were healthy, the URL was dead

    트러블슈팅

    2026년 7월 9일 · 2

    The NCP server was shut down and DocVault moved to a shared Vultr box. Prod and demo containers were already running and healthy there, but both public URLs failed the TLS handshake — the shared edge Caddy had no docvault vhost. Wired the vhosts, retargeted the deploy script, redeployed latest main, verified everything (including the co-hosted apps) at 200.

2026년 6월 15일 주9 · 3 업데이트 · 3 기술 회고 · 3 사용성 회고
  1. A portfolio demo should show the whole product — make it read-only, not lower-privilege

    기술 회고

    2026년 6월 21일 · 2

    The demo had been made a non-admin for safety, which hid the AI assistant and admin screens — so it looked like a different, crippled product. Fixed by making the demo a full admin but enforcing read-only at the middleware and in the AI engine.

  2. Making the AI assistant guide a non-technical admin (lightweight RAG, not a vector DB)

    업데이트

    2026년 6월 20일 · 2

    The operator found the UI hard and wanted the AI to guide them. Added a doc-grounded help_docs tool so the assistant answers how-to/install questions strictly from a curated usage guide — lightweight RAG, no vector DB needed at this scale.

  3. Email alerts + a daily digest — so the admin learns about issues without logging in

    업데이트

    2026년 6월 20일 · 2

    Alerts were pull-only (dashboard) and the Slack notifier was unconfigured, so a non-technical admin who didn't log in never found out. Added SMTP email for high/critical alerts plus a daily Korean digest, with an on-demand send.

  4. Adversarially reviewing the AI teammate's work — and hardening the demo login

    기술 회고

    2026년 6월 19일 · 3

    A second AI assistant (Codex) shipped 22 commits while I was away. I reviewed the diff adversarially, confirmed it was solid, then fixed two real holes — a passwordless-admin footgun in the demo login and a missing code-signing pipeline — and a deploy bug my own verification caught.

  5. One in-app page for agent install (download + visual guide together)

    사용성 회고

    2026년 6월 17일 · 1

    The installer download and the install guide were scattered (download buried in Agent Status, guide a separate static page in a new tab). Consolidated into a single in-app /admin/install page reachable from the sidebar.

  6. Honest retro: shipping the agent onboarding (what went wrong, both sides)

    기술 회고

    2026년 6월 17일 · 5

    Candid post-mortem of building the one-click Windows installer + guides + in-app install page: the assistant's mistakes, the environment dead-ends, the real-world gotchas, and the process friction. No sugarcoating.

  7. Idiot-proof visual install guide (and why a one-click .bat still isn't enough)

    사용성 회고

    2026년 6월 16일 · 2

    Shipping a one-click installer wasn't enough for a non-technical user: SmartScreen hides its Run button and email blocks .bat files. Rewrote the install page into a visual, dialog-by-dialog guide and added transfer guidance for the admin.

  8. Team management + an AI assistant that acts (with rollback)

    업데이트

    2026년 6월 16일 · 2

    Added host→employee assignment, CSV bulk user import, an AI security briefing, and a tool-use AI assistant that can both query live data and perform actions (create user, assign host, ack alert) — every action logged and one-click rollback-able.

  9. One-click Windows agent installer for non-technical end users

    사용성 회고

    2026년 6월 16일 · 2

    A non-technical user installing the agent opened Docker by mistake and got stuck on the PSK placeholder. Replaced the copy-paste PowerShell install with an admin-only, secret-baked, self-elevating .bat they just double-click.

2026년 6월 8일 주3 · 2 트러블슈팅 · 1 기술 회고
  1. Made the agents production-grade: osquery TLS protocol and reliable clipboard delivery

    기술 회고

    2026년 6월 10일 · 3

    To actually deploy DocVault for a remote user, I implemented the real osquery TLS wire protocol on the server (enroll_secret → node_key) so a stock osquery node can connect, and rewrote the clipboard agent around a bounded retry queue with periodic re-enrollment so events survive network outages. Plus a one-command Compose deploy and a full deployment guide.

  2. Hardened DocVault access controls, agent auth, and CSV exports

    트러블슈팅

    2026년 6월 9일 · 2

    A full repository review found missing admin and folder authorization checks, fail-open agent PSK behavior, fragile CSV export generation, and incomplete audit coverage. Commits e0d498d, 6df4c71, and 9f81995 close those gaps and add regression tests.

  3. Closed an API 2FA bypass and shipped a one-command production deploy

    트러블슈팅

    2026년 6월 9일 · 3

    After verifying a separate batch of access-control fixes, I closed the remaining auth gaps — an API-login 2FA bypass with no brute-force limit, example/weak secrets accepted at startup, and a hardcoded admin password — then added a Docker Compose + Caddy stack that auto-migrates and auto-issues TLS for both a dedicated server and an all-in-one install.

2026년 5월 25일 주1 · 1 트러블슈팅
  1. Replaced AES-CTR with chunked AES-GCM after finding the file body had no MAC

    트러블슈팅

    2026년 5월 27일 · 2

    A documentation audit revealed README claimed AES-256-GCM but the actual cipher on file bodies was CTR with no authentication tag. Rewrote encryption.go as chunked GCM with truncation and reorder defenses, and fixed a concurrent-INSERT race in the hash chain triggers in the same commit.

2026년 4월 6일 주2 · 2 업데이트
  1. CI/CD, release automation, and one-command deploy scripts

    업데이트

    2026년 4월 8일 · 1

    Added GitHub Actions CI + a release workflow, plus deploy scripts for the server and the Windows agents — turning ad-hoc builds into a repeatable pipeline.

  2. Hash-based file tracking — catch a sensitive file even after it's renamed

    업데이트

    2026년 4월 8일 · 1

    Register sensitive files by SHA-256; the server matches incoming endpoint file events against those hashes (cached in memory) and records detections — so a tracked file is caught even if it's renamed.

2026년 3월 30일 주4 · 4 업데이트
  1. Two-factor authentication (TOTP) with recovery codes

    업데이트

    2026년 4월 1일 · 1

    Added TOTP-based 2FA implemented from the RFC primitives (HMAC-based one-time codes), a QR setup flow, a second login step, and recovery codes.

  2. Behavior risk scoring (rule-based UEBA), with per-user baselines

    업데이트

    2026년 4월 1일 · 1

    Added a risk-scoring engine that compares each event against a per-user behavioral baseline (work hours, weekends, known IPs, …) and accumulates weighted anomaly scores. Threshold-rule based — deliberately not ML.

  3. A macOS clipboard agent, and splitting the agent cross-platform

    업데이트

    2026년 3월 31일 · 1

    Added a macOS clipboard agent and refactored the single 397-line main into clean per-platform files (Windows/macOS) with a shared core and a launchd service.

  4. Real-time dashboard updates with Server-Sent Events

    업데이트

    2026년 3월 31일 · 1

    Added a Server-Sent Events hub so the dashboard updates live as endpoint events arrive — no polling, no WebSocket complexity.

2026년 3월 23일 주2 · 2 기술 회고
  1. Moved audit-log tamper detection from app code to PostgreSQL triggers

    기술 회고

    2026년 3월 25일 · 1

    Added a SHA-256 hash chain on audit_logs and endpoint_events via DB triggers, plus UPDATE/DELETE prevention. Chose DB-level enforcement so any insert path — including ad-hoc psql — is forced through the chain.

  2. AI-scaffolded the full DocVault skeleton in a single 92-file commit

    기술 회고

    2026년 3월 24일 · 1

    Ran the 8-phase implementation plan from CLAUDE.md to a working end-to-end skeleton in one commit, with AI assistance. Surface coverage was wide but depth was thin — the interesting parts came later.