Database¶
VANTAGE uses MongoDB 8 as its document store.
The motor async driver is used throughout the backend.
Collections¶
Collection |
Contents |
|---|---|
|
User accounts — username, hashed password, role, MFA secret (AES-256 encrypted), preferences |
|
Active sessions — JWT ID, user ID, expiry, last-seen, user agent |
|
API keys — SHA-256 hash, scopes, TTL, owner |
|
Immutable audit trail — action, actor, target, timestamp, IP |
|
Analysis results — target, verdict, score, source data, AI report |
|
Watchlisted targets for background re-scan |
|
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— uniqueusers.email— uniqueusers.role— used bycheck_initialization()audit_log.timestamp— range queries for log exportanalyses.target+analyses.created_at— lookup and history queriessessions.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