Database

VANTAGE uses MongoDB 8 as its document store. The motor async driver is used throughout the backend.

Collections

Collection

Contents

users

User accounts — username, hashed password, role, MFA secret (AES-256 encrypted), preferences

sessions

Active sessions — JWT ID, user ID, expiry, last-seen, user agent

api_keys

API keys — SHA-256 hash, scopes, TTL, owner

audit_log

Immutable audit trail — action, actor, target, timestamp, IP

analyses

Analysis results — target, verdict, score, source data, AI report

watchlist

Watchlisted targets for background re-scan

feed_items

Ingested threat-feed articles and IOCs

Optional / upcoming extension collections

Extension-backed surfaces may create their own collections when installed. For example, future hunting or exposure integrations can persist workspace/runtime state in extension-specific collections such as hunting_sessions or exposure_assets. Those collections are not required by the public core deployment.

Indexes

Indexes are created automatically during the backend startup lifespan. Key indexes:

  • users.username — unique

  • users.email — unique

  • users.role — used by check_initialization()

  • audit_log.timestamp — range queries for log export

  • analyses.target + analyses.created_at — lookup and history queries

  • sessions.jti — session revocation lookups

Backup

Data is stored in the mongodb_data Docker volume. To back up:

# Dump to a local directory
docker compose exec mongodb mongodump \
  --username $MONGO_USER \
  --password $MONGO_PASSWORD \
  --authenticationDatabase admin \
  --out /tmp/vantage-backup

# Copy out of the container
docker cp vantage_mongo:/tmp/vantage-backup ./backup-$(date +%Y%m%d)

To restore:

docker compose exec -T mongodb mongorestore \
  --username $MONGO_USER \
  --password $MONGO_PASSWORD \
  --authenticationDatabase admin \
  /tmp/vantage-backup